From patchwork Sat Aug 5 20:52:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 109500 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp992216qge; Sat, 5 Aug 2017 13:54:14 -0700 (PDT) X-Received: by 10.99.44.10 with SMTP id s10mr6559549pgs.116.1501966453870; Sat, 05 Aug 2017 13:54:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966453; cv=none; d=google.com; s=arc-20160816; b=PwIMQOwl72/a3G5DulF/esYl5CNu1orwvWJgWmU9ZlARpnGo1bdfp+76WzVJ3UuUIV NBuCDPf9dZBDkp7gj5ZNUqb9/2hsOMerjdwyGyXFP48+QIPlvtXb5G2E2aW8MRjMZZHL XuRZzRrAdLciizby4V/a+s+MYzrD8sxKHz9iw8htGyd3SwYn+VNdAr6/UXVFE3XEC3sM j6JmFlzOiSJq0YGQBHWQrvo5DPTVEJqhA6EwGcT3KA+UlyAzfcas3/uuajhnFiHGpbZQ /HcuqgEWjK/MsL5UC+y3tOziiM9IAH4UoXS/6Lw56uUzXyloJIq8i/MDh9BjWYyavLbs fbwQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:arc-authentication-results; bh=bdDto/obCG/gBgUNRyeEkSHviAXjgrnreSPYvucE9dg=; b=m8aBtNLWtNErZCU19DQXjYQhIxvnGIY6+6ghQdpGx4IsPw77ww+d0OPDuEebj4TAH5 QTJU074EgUpdQWnGlGo2D8NQvLWLNAgdX4jlai4EKwlsbsf0tnucVmwtcH9Wmvaa4b6k X5mTScc5ZflriiS9pY2FvPzswxXlwfwXYXaznVQxMRfC80SYLiSVm6fIPSUHPADZyLbm U99DHVD5vEX3O2Zx0WcvlG+sie7VFaP0xgfMo1rORTZ0/2095dqQ77Sm1YtwuoyZ7KZ/ W7z5AkL1/pqwifh0vTYRiTL5Gj2TbR21rmvA9Cgrbu5Nm1l7IAwiKVsCyt8443NNU6ci VZVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=aSi3DI8V; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si3018685plk.487.2017.08.05.13.54.13; Sat, 05 Aug 2017 13:54:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=aSi3DI8V; spf=pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-omap-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752802AbdHEUyG (ORCPT + 3 others); Sat, 5 Aug 2017 16:54:06 -0400 Received: from mail-wm0-f42.google.com ([74.125.82.42]:35113 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752863AbdHEUxx (ORCPT ); Sat, 5 Aug 2017 16:53:53 -0400 Received: by mail-wm0-f42.google.com with SMTP id m85so42483267wma.0 for ; Sat, 05 Aug 2017 13:53:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=74NmevsJMIrPT9ZeoMsM1IJHz3SOXbrLKfcHj8sa8k0=; b=aSi3DI8VxF8vdyaFBxqnqB0IwrbLo51k9BA6262w6d3gH/6SbAyA2qzwxcdgzC8PsV OUSK3VyVTPRVEts32xsRJ8E5028DzvDgf+Yg5t2AvRhBqIG6Mi2OculohpwSxFN+If3Z PqnDgc8tR9ri0Bib4UNni1AXv9h4wwDtVMOAw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=74NmevsJMIrPT9ZeoMsM1IJHz3SOXbrLKfcHj8sa8k0=; b=ssLbs4FR4XZDOJ2ZMGJ9Q4hxPnXR0lKxRkmfgCOtWl5bUgPxEWrHm7HBNeE27wbjcf c8eMWdWruFZye9zfZ/VSfMlUGA4MYnnu7AcwrKStNnIuDHGKQ8Om1iSOv4uEIrFYbEYq Dz+mHlG+nTa1e15/3ap1kZV3G+2j61D7Hkwul7WV4bq18NsVF5Gx39CAlb0zeNqy1Ohg RbMSNw/cOhZuTJbbpYN3Zeb35/yma+1O32fJsTVz2N2LTsXVwHVjYd5xZMIJm5tmt+8U 0K2QjSwUACcxtkwv72ZWcvXUQjqYNW8EtEVeHQpxmcJJIaddXjCK5/7p/fxYBpk0hlVl zOuw== X-Gm-Message-State: AHYfb5iUGdnIaKB/XbPD3TzGdXuvuYWQI00Jl80rNdwE68vsa5YnFB47 MebQpB8BAo8kDcJE X-Received: by 10.28.100.136 with SMTP id y130mr4574673wmb.60.1501966431977; Sat, 05 Aug 2017 13:53:51 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:51 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux@armlinux.org.uk, linux-omap@vger.kernel.org, kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, krzk@kernel.org, jason@lakedaemon.net, arm@kernel.org, andrew@lunn.ch, gregory.clement@free-electrons.com, sebastian.hesselbarth@gmail.com, tony@atomide.com, baohua@kernel.org, horms@verge.net.au, magnus.damm@gmail.com, vireshk@kernel.org, shiraz.linux.kernel@gmail.com, patrice.chotard@st.com, nico@linaro.org, dave.martin@arm.com, marc.zyngier@arm.com Cc: Ard Biesheuvel Subject: [PATCH 13/15] arm-soc: various: replace open coded VA->PA calculation of pen_release Date: Sat, 5 Aug 2017 21:52:20 +0100 Message-Id: <20170805205222.19868-14-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170805205222.19868-1-ard.biesheuvel@linaro.org> References: <20170805205222.19868-1-ard.biesheuvel@linaro.org> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This replaces a few copies of the open coded calculations of the physical address of 'pen_release' in the secondary startup code of a couple of platforms. Signed-off-by: Ard Biesheuvel --- arch/arm/mach-prima2/headsmp.S | 11 +++-------- arch/arm/mach-spear/headsmp.S | 11 +++-------- arch/arm/mach-sti/headsmp.S | 10 +++------- arch/arm/plat-versatile/headsmp.S | 9 +-------- 4 files changed, 10 insertions(+), 31 deletions(-) -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/mach-prima2/headsmp.S b/arch/arm/mach-prima2/headsmp.S index 209d9fc5c16c..070df700bb38 100644 --- a/arch/arm/mach-prima2/headsmp.S +++ b/arch/arm/mach-prima2/headsmp.S @@ -9,6 +9,8 @@ #include #include +#include + /* * SIRFSOC specific entry point for secondary CPUs. This provides * a "holding pen" into which all secondary cores are held until we're @@ -17,10 +19,7 @@ ENTRY(sirfsoc_secondary_startup) mrc p15, 0, r0, c0, c0, 5 and r0, r0, #15 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 + adr_l r6, pen_release pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -31,7 +30,3 @@ pen: ldr r7, [r6] */ b secondary_startup ENDPROC(sirfsoc_secondary_startup) - - .align -1: .long . - .long pen_release diff --git a/arch/arm/mach-spear/headsmp.S b/arch/arm/mach-spear/headsmp.S index c52192dc3d9f..4da01b103f33 100644 --- a/arch/arm/mach-spear/headsmp.S +++ b/arch/arm/mach-spear/headsmp.S @@ -13,6 +13,8 @@ #include #include +#include + __INIT /* @@ -23,10 +25,7 @@ ENTRY(spear13xx_secondary_startup) mrc p15, 0, r0, c0, c0, 5 and r0, r0, #15 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 + adr_l r6, pen_release pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -40,8 +39,4 @@ pen: ldr r7, [r6] * should now contain the SVC stack for this core */ b secondary_startup - - .align -1: .long . - .long pen_release ENDPROC(spear13xx_secondary_startup) diff --git a/arch/arm/mach-sti/headsmp.S b/arch/arm/mach-sti/headsmp.S index e0ad451700d5..cdf3442f397b 100644 --- a/arch/arm/mach-sti/headsmp.S +++ b/arch/arm/mach-sti/headsmp.S @@ -16,6 +16,8 @@ #include #include +#include + /* * ST specific entry point for secondary CPUs. This provides * a "holding pen" into which all secondary cores are held until we're @@ -24,10 +26,7 @@ ENTRY(sti_secondary_startup) mrc p15, 0, r0, c0, c0, 5 and r0, r0, #15 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 + adr_l r6, pen_release pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -38,6 +37,3 @@ pen: ldr r7, [r6] */ b secondary_startup ENDPROC(sti_secondary_startup) - -1: .long . - .long pen_release diff --git a/arch/arm/plat-versatile/headsmp.S b/arch/arm/plat-versatile/headsmp.S index 40f27e52de75..0f2a5eddac5a 100644 --- a/arch/arm/plat-versatile/headsmp.S +++ b/arch/arm/plat-versatile/headsmp.S @@ -21,10 +21,7 @@ ENTRY(versatile_secondary_startup) ARM_BE8(setend be) mrc p15, 0, r0, c0, c0, 5 bic r0, #0xff000000 - adr r4, 1f - ldmia r4, {r5, r6} - sub r4, r4, r5 - add r6, r6, r4 + adr_l r6, pen_release pen: ldr r7, [r6] cmp r7, r0 bne pen @@ -34,8 +31,4 @@ pen: ldr r7, [r6] * should now contain the SVC stack for this core */ b secondary_startup - - .align -1: .long . - .long pen_release ENDPROC(versatile_secondary_startup)