From patchwork Tue Sep 5 21:19:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 111752 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp3374355qge; Tue, 5 Sep 2017 14:20:23 -0700 (PDT) X-Google-Smtp-Source: ADKCNb6kTgtmcXtQ036tWbZia5ZtjLJH+LA0hIBLYB1KZcPjzacrMDzgZZDyN9zYVxYyzlocmnVi X-Received: by 10.98.130.200 with SMTP id w191mr5175481pfd.204.1504646423579; Tue, 05 Sep 2017 14:20:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504646423; cv=none; d=google.com; s=arc-20160816; b=RodFFAQmVKLFCQn5Fqt5h+IZ8pX7leW1Rd7mWED6FrdDJjR83CxAOhXVRmljKu0phj ZMuUQ29GEEvRgEfGBGk4OQW9TGLjkDJXpL9sKWZoKt/6p2j6XzhwlcWt7j7D2qFGMXw3 rGZ7j1x4mYzdTqj02ksfX5oUQVptM3jzCDIqQ4dyVU2dEbA00IQcvjTPznZDd/26cl2E EQXZJ9qz5Do8MRcabiz1fyl3jpe18ksUuweJRckjN1CQTusUhJ2ptWatMilmDy48VikF JLIPUul89XtZO9qAlN4/hTaJGwhQEO0FW+r61kDY3bNnQzz7TNMiRFK+L2ctxErDJvBE F+SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ED5cl5GiO7lWn2GRnWK9nXuyaIJ4SI0pXCQwLht2EwU=; b=dPnvBYe0XXNJySH6sRr9zpt6CUr4JytDoMIQ8DzN11yCqZH7wgylVHBvL5PinUMtVy nhIHbDEvEUENszdkWgSEcFcuTnKbHi6uK8ZRkM0id0WXbNtQU96fQkKOZZekmfYExahu Z7hNHIveW2F3wOf8dKDFuX885gWc1kMk2ANcD8eBodC3lWToaBWkolTp8yLyphBDV/oC GjVMt9iAj2q32Ses6psVrkLnIWXMQ8fSK8WSaKj3mujFjqAyQurzNtiYsgqrG9hngO/s ggzx8F7ZvE+x9kMr3DCY/AOM2c+/V43b0OK4vYoQya7TAmm2yJfpD10fFCZhtRHXrRU6 Oa1w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si892858pgf.552.2017.09.05.14.20.23; Tue, 05 Sep 2017 14:20:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753357AbdIEVUU (ORCPT + 26 others); Tue, 5 Sep 2017 17:20:20 -0400 Received: from mx2.suse.de ([195.135.220.15]:34015 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752742AbdIEVUM (ORCPT ); Tue, 5 Sep 2017 17:20:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 65E53AE54; Tue, 5 Sep 2017 21:20:11 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Cc: Thomas Liau , =?utf-8?b?5byg5Lic6aOO?= , =?utf-8?b?5YiY54Kc?= , =?utf-8?b?5byg5aSp55uK?= , =?utf-8?b?5qKF5Yip?= , 96boards@ucrobotics.com, support@lemaker.org, support@cubietech.com, lee@cubietech.com, Ioan B , Florian Fainelli , linux-kernel@vger.kernel.org, Russell King Subject: [PATCH v2 1/2] ARM: owl: smp: Use __pa_symbol() Date: Tue, 5 Sep 2017 23:19:59 +0200 Message-Id: <20170905212000.7009-2-afaerber@suse.de> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170905212000.7009-1-afaerber@suse.de> References: <20170905212000.7009-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Replace an occurrence of virt_to_phys() with __pa_symbol() macro. See 64fc2a947a9873700929ec0ef02b4654a04e0476 ("ARM: 8641/1: treewide: Replace uses of virt_to_phys with __pa_symbol"). Fixes: 172067e0bc87 ("ARM: owl: Implement CPU enable-method for S500") Reported-by: Florian Fainelli Signed-off-by: Andreas Färber --- v1 -> v2: New arch/arm/mach-actions/platsmp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.13.5 diff --git a/arch/arm/mach-actions/platsmp.c b/arch/arm/mach-actions/platsmp.c index 12a9e331b432..7238926ab015 100644 --- a/arch/arm/mach-actions/platsmp.c +++ b/arch/arm/mach-actions/platsmp.c @@ -71,7 +71,7 @@ static int s500_wakeup_secondary(unsigned int cpu) /* wait for CPUx to run to WFE instruction */ udelay(200); - writel(virt_to_phys(owl_secondary_startup), + writel(__pa_symbol(owl_secondary_startup), timer_base_addr + OWL_CPU1_ADDR + (cpu - 1) * 4); writel(OWL_CPUx_FLAG_BOOT, timer_base_addr + OWL_CPU1_FLAG + (cpu - 1) * 4); From patchwork Tue Sep 5 21:20:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Andreas_F=C3=A4rber?= X-Patchwork-Id: 111753 Delivered-To: patch@linaro.org Received: by 10.140.94.166 with SMTP id g35csp3374384qge; Tue, 5 Sep 2017 14:20:25 -0700 (PDT) X-Google-Smtp-Source: ADKCNb4B7OOwUt/4so8M38v4hi10MKq25nvILw+trh1RHx+nf289RaSHc/vWjKQV07odjFOeSRC0 X-Received: by 10.98.36.214 with SMTP id k83mr5003016pfk.174.1504646425538; Tue, 05 Sep 2017 14:20:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1504646425; cv=none; d=google.com; s=arc-20160816; b=Suv3sf3Liutx+ay74K43FvQnsdOkZbbZB0JLRJaHxkWSPZqgghoxPLwho/+lKJNIi3 r0WxaWUMVauEovSmOmFgwRnpz5pj4hF751v+QGt+CwdctC9CEYXDFjXhNeqxQARY3axj rOvDnU24ugmB0p5OqCO0AWy5MBu4YoKU8fcSilX10oejMkHfXivpy6V88D+32KZWzWVx XCpCZuUymdwJY2BcvL0csIV0adq8HaYERHtzUxfAPj0wxMbtfJiEPGxYOlazk7Brs8Sb aMGucxFXX2lpc0wOWUJjMORJyeZwxRq3I67pmT/049o/NbJYOoTMSR64UbzeCd7l5bBO SB0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=yR+jjpFKnwMUedn6SQiqURIVK+zRmt9FslOJDjwqOyM=; b=u+8hY29ika/awEpriegFuLQR9h5vroGMlMs0GjuXTHGzvOTm5VqffiO5148KwAmmWG wIiqlUDiVr0DAyLoWcmshf7rpHWgM0YDy+/svvHp+QDAluYBa67aoakULLJhKCxgnPIK 8TubkM8dgvsSZ28D+MGOw/yr8lR3GuX1VOjfR7ZRJei1lJcpxOz5x1ZR6k1FeyR/2Hcs 7WyV+I5Hd/69w5cs27lLYgw4xpb0oSAC9Q2dhLdRZu53HYSHrYcVVWf4rUX9lcnFWHGh Awrg9siABdZTbqvY+mZHsz4MLAiKvEFQuaOghQDlDHIqsNlvn6C1CChOhxqN4o4I83EP TgHA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l8si892858pgf.552.2017.09.05.14.20.25; Tue, 05 Sep 2017 14:20:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753389AbdIEVUX (ORCPT + 26 others); Tue, 5 Sep 2017 17:20:23 -0400 Received: from mx2.suse.de ([195.135.220.15]:34009 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752248AbdIEVUM (ORCPT ); Tue, 5 Sep 2017 17:20:12 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 658D3AE53; Tue, 5 Sep 2017 21:20:11 +0000 (UTC) From: =?utf-8?q?Andreas_F=C3=A4rber?= To: =?utf-8?q?Andreas_F=C3=A4rber?= , linux-arm-kernel@lists.infradead.org Cc: Thomas Liau , =?utf-8?b?5byg5Lic6aOO?= , =?utf-8?b?5YiY54Kc?= , =?utf-8?b?5byg5aSp55uK?= , =?utf-8?b?5qKF5Yip?= , 96boards@ucrobotics.com, support@lemaker.org, support@cubietech.com, lee@cubietech.com, Ioan B , Florian Fainelli , linux-kernel@vger.kernel.org, Russell King Subject: [PATCH v2 2/2] ARM: owl: smp: Drop owl_secondary_boot() Date: Tue, 5 Sep 2017 23:20:00 +0200 Message-Id: <20170905212000.7009-3-afaerber@suse.de> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170905212000.7009-1-afaerber@suse.de> References: <20170905212000.7009-1-afaerber@suse.de> MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 18cfd9429d8a82c49add8f3ca9d366599bfcac45 simplified the S500 SMP code by removing a loop for pen_release in owl_secondary_boot(). Since then it is only calling owl_v7_invalidate_l1() before branching to secondary_startup(). The owl_v7_invalidate_l1() assembler function is superfluous, too. Therefore drop owl_secondary_boot() and use secondary_boot() directly. Fixes: 18cfd9429d8a ("ARM: owl: smp: Drop bogus holding pen") Cc: David Liu Signed-off-by: Andreas Färber --- v1 -> v2: * Rebased onto __pa_symbol() * Tweaked commit message arch/arm/mach-actions/Makefile | 4 +--- arch/arm/mach-actions/headsmp.S | 52 ----------------------------------------- arch/arm/mach-actions/platsmp.c | 2 +- 3 files changed, 2 insertions(+), 56 deletions(-) delete mode 100644 arch/arm/mach-actions/headsmp.S -- 2.13.5 diff --git a/arch/arm/mach-actions/Makefile b/arch/arm/mach-actions/Makefile index c0f116241da7..13831037d8cd 100644 --- a/arch/arm/mach-actions/Makefile +++ b/arch/arm/mach-actions/Makefile @@ -1,3 +1 @@ -obj-${CONFIG_SMP} += platsmp.o headsmp.o - -AFLAGS_headsmp.o := -Wa,-march=armv7-a +obj-${CONFIG_SMP} += platsmp.o diff --git a/arch/arm/mach-actions/headsmp.S b/arch/arm/mach-actions/headsmp.S deleted file mode 100644 index 65f53bdb69e7..000000000000 --- a/arch/arm/mach-actions/headsmp.S +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright 2012 Actions Semi Inc. - * Author: Actions Semi, Inc. - * - * Copyright (c) 2017 Andreas Färber - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by the - * Free Software Foundation; either version 2 of the License, or (at your - * option) any later version. - */ - -#include -#include - -ENTRY(owl_v7_invalidate_l1) - mov r0, #0 - mcr p15, 0, r0, c7, c5, 0 @ invalidate I cache - mcr p15, 2, r0, c0, c0, 0 - mrc p15, 1, r0, c0, c0, 0 - - ldr r1, =0x7fff - and r2, r1, r0, lsr #13 - - ldr r1, =0x3ff - - and r3, r1, r0, lsr #3 @ NumWays - 1 - add r2, r2, #1 @ NumSets - - and r0, r0, #0x7 - add r0, r0, #4 @ SetShift - - clz r1, r3 @ WayShift - add r4, r3, #1 @ NumWays -1: sub r2, r2, #1 @ NumSets-- - mov r3, r4 @ Temp = NumWays -2: subs r3, r3, #1 @ Temp-- - mov r5, r3, lsl r1 - mov r6, r2, lsl r0 - orr r5, r5, r6 @ Reg = (Temp<