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: 810291 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="mOO9pOEt"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xn04Y1gHJz9t2W for ; Wed, 6 Sep 2017 07:20:45 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=yu9KcY635wAvCH72OLBTMNNSSN4TpWP9EIqlrJvLomQ=; b=mOO9pOEtax+4EZ IHDyNIaBiHOdeiWO+ZtzQsWevTG+JgckTquSjkqaO31RfVwTiYjEW4fWXpdumuKyf5KBYa5dGCOCp b6V17r0ZIhPuc5oF1SH6to1uNI2I5qHHTEpnaWOxK8l5fj0B43BocWeMgGkV2A9sMuj5aX+wXGray RStYH72wnFWyE3VQbjdjvOsXlWTifDioZqoYyNtXHgGnq8Vs6brmHNDkarbzAwhUU8OgqF5lWOpeT Kh+WEu4WoxCts2rKMGliGleod5bo3LfwX4FdxZNfkfpcKI809zZS0Xe4oZvK9nnDBylQyxhudBzT/ ziZNk5Dv4bB5r7OLNzPg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dpLGy-0007st-4D; Tue, 05 Sep 2017 21:20:40 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dpLGt-0007pg-NH for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2017 21:20:37 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170905_142035_924263_5A065906 X-CRM114-Status: UNSURE ( 9.33 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: support@lemaker.org, =?utf-8?b?5byg5aSp55uK?= , Florian Fainelli , =?utf-8?b?5qKF5Yip?= , =?utf-8?b?5YiY54Kc?= , linux-kernel@vger.kernel.org, Thomas Liau , Russell King , support@cubietech.com, lee@cubietech.com, =?utf-8?b?5byg5Lic6aOO?= , 96boards@ucrobotics.com, Ioan B Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.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(-) 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: 810293 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tS1+ItmP"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3xn05C3QNxz9t2W for ; Wed, 6 Sep 2017 07:21:19 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=QmRk8PKt+1w7AvD+X8Mc8M2tfBULlP8xPu6JG05wUk8=; b=tS1+ItmPCaT2mO dAp4URla8/vFBgw3g7ATy4MEhb5zxo9zRn4Twj0eURAsYRfpfZK9wLsf5IbiDCQ/oXEuhm0gA2AZz vwH2U8KkRXRa2UCeCivRHbks0qNS9YuOkoLDvYdZ+hhPbY3MMzVyrATgjSLI6FsCGeLpDTESiPr+n uI+ne7h8gl17m5Z6QvbvFwgDufjlCGr3vebpzIb1p6wWWPO5p6Ll+FM5PtQMZ+t/wIAE3KeOtcRoR +Fy3DKIV1mFt7ujrbb+CbPihufYyF+IvjY3y7vo5YBRiE5OqEIed7gWmxJxpMpMSLMInqB3loH5uM 7+ICG/6xv4F12DMBlUwA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dpLHY-0008Pr-4A; Tue, 05 Sep 2017 21:21:16 +0000 Received: from mx2.suse.de ([195.135.220.15] helo=mx1.suse.de) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dpLGt-0007pe-Mt for linux-arm-kernel@lists.infradead.org; Tue, 05 Sep 2017 21:20:39 +0000 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 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170905_142036_101541_F4FAF749 X-CRM114-Status: GOOD ( 14.69 ) X-Spam-Score: -4.2 (----) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-4.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [195.135.220.15 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: support@lemaker.org, =?utf-8?b?5byg5aSp55uK?= , Florian Fainelli , =?utf-8?b?5qKF5Yip?= , =?utf-8?b?5YiY54Kc?= , linux-kernel@vger.kernel.org, Thomas Liau , Russell King , support@cubietech.com, lee@cubietech.com, =?utf-8?b?5byg5Lic6aOO?= , 96boards@ucrobotics.com, Ioan B Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.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 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<