From patchwork Sat Aug 5 20:52:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 109493 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp991843qge; Sat, 5 Aug 2017 13:53:42 -0700 (PDT) X-Received: by 10.98.106.6 with SMTP id f6mr6925956pfc.53.1501966422365; Sat, 05 Aug 2017 13:53:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966422; cv=none; d=google.com; s=arc-20160816; b=DpyllSTAsXQRQJ0ScnXh8D7EBGalNy2CWuOPWd2xif+HPpboYb0kXUx3Tbhd/1uDuG Kaq+3IWd4kHB81VYIP5BZhrlIfxJWoPHgAs9eHwZ5A70+nHtS0qSLCfs+GGL7ogejgBQ biIXNeHnqBIDVQCj+azzH/Q/OjM7cl/XpkTKzsG5whUvU+w+Fx9MFu0bcS/mBL/cJStZ lf5bZpSLHTo2DdGySMnFim+DyRN54DlJyCKagug2xLxOa+dl2teT/DMtYeEBjyAIZQX8 8UzJt89T/DDUStysdnhqxdWSroxW0qOqF0B+SaiRjHIBsXce2GEi9U4aPYVnkKIEsH0U IEzA== 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=vyTgIPPo3W+ESUP0vaCpBGKNOud8gbGF4YqVQol8imE=; b=hDTycfPqa2sM1GVFgmt4ZbovIZDLStZpjI76mTnghI+hA4n89xsA7a6inLt/yPFEhi IhfxbqYwSUluEIl40v7RwwLOrTTHztIWrBhamAUypTmGQ7AXS6R+VJnCrrWakPruys+6 BjbS+Fc9D2aWfqNxx3FrU+a9e83xawu6LoOFI8bzVsdLWmWStPrxXtL80euQkyCZWsM/ lxxArCCU5xbiHwEDgnR6ns6SoZnPZbGyvh7rD15r0L2cRFj4SwbtuStFqlDlCvqsk+rZ C/mztIOHkY1yJiOqNKH4Rf8sGVaCNZFwfpL2di9KuA/2oYGghVCUVBoAYY89Zb3Q7Udi zs9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=CvL9zWh3; 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.53.42; Sat, 05 Aug 2017 13:53:42 -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=CvL9zWh3; 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 S1752713AbdHEUx2 (ORCPT + 3 others); Sat, 5 Aug 2017 16:53:28 -0400 Received: from mail-wr0-f172.google.com ([209.85.128.172]:34060 "EHLO mail-wr0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751519AbdHEUxV (ORCPT ); Sat, 5 Aug 2017 16:53:21 -0400 Received: by mail-wr0-f172.google.com with SMTP id 12so27171838wrb.1 for ; Sat, 05 Aug 2017 13:53:21 -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=smB7+/ftor91JOGfrg55i5EDQc5Fj3QoDW7QAxSNp94=; b=CvL9zWh3Z+N/BHL7Bk1jeDxYxAhZfS4ac/wJ1sPuDmCQAhGpMpcTIufFVpHzfTAeQr QFAynJbhh6baayr4TEcPbSErRi3P9kGRl28mCUtF3FJ3lLrF57HJGXfVZeUC+Dcs1rp8 nOcCeJlrpZKIe59Tqb+MRDEAqFteHQnolaT7U= 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=smB7+/ftor91JOGfrg55i5EDQc5Fj3QoDW7QAxSNp94=; b=ckyjgXYD49rjuRL6pJlFPBylrmBUyHAN78/Diir8ZDzMFPOEQdw+wUOLnCaMuedxKi II/hBY4ldQxvXyG6udq+Rg2EVpvYw7Q/obe5gQE9w2ahShED2WtB3cd7fpvcK1HfRpcI O8OlhT9+jpdkUmHeZ45m64XnvBvIt608170VG3KlFS/ZxG9bFnai8KrGp1Td6LwLutLz iOVuwD1Zfw3fEfDvlIjUGSzE7OE21JKO0MmiJZjfIyB6G1jez6EtYlfFJA4XigcLiZ8a vvq/7wIvXOeDd3OpPZ6JJFCiddw4eXasZRyEJpZUxXHJehwJFTami0g0FAwsKurerHv0 e6WA== X-Gm-Message-State: AIVw111HI71qBIZiVW98oyVpjr8xsQY9pG6UUjAUCiC8l8bHbyJCvBRx lQ4d+Dd31BA5lTtu X-Received: by 10.223.134.26 with SMTP id 26mr5064482wrv.268.1501966400685; Sat, 05 Aug 2017 13:53:20 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:19 -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 04/15] ARM: head.S: use PC-relative insn sequence for secondary_data Date: Sat, 5 Aug 2017 21:52:11 +0100 Message-Id: <20170805205222.19868-5-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 Replace the open coded PC relative offset calculations with adr_l and ldr_l invocations. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/head.S | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 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/kernel/head.S b/arch/arm/kernel/head.S index 0a98aec0e39d..6e9df3663a57 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -386,10 +386,8 @@ ENTRY(secondary_startup) /* * Use the page tables supplied from __cpu_up. */ - adr r4, __secondary_data - ldmia r4, {r5, r7, r12} @ address to jump to after - sub lr, r4, r5 @ mmu has been enabled - add r3, r7, lr + adr_l r3, secondary_data + mov_l r12, __secondary_switched ldrd r4, [r3, #0] @ get secondary_data.pgdir ARM_BE8(eor r4, r4, r5) @ Swap r5 and r4 in BE: ARM_BE8(eor r5, r4, r5) @ it can be done in 3 steps @@ -404,22 +402,13 @@ ARM_BE8(eor r4, r4, r5) @ without using a temp reg. ENDPROC(secondary_startup) ENDPROC(secondary_startup_arm) - /* - * r6 = &secondary_data - */ ENTRY(__secondary_switched) - ldr sp, [r7, #12] @ get secondary_data.stack + ldr_l r7, secondary_data + 12 @ get secondary_data.stack + mov sp, r7 mov fp, #0 b secondary_start_kernel ENDPROC(__secondary_switched) - .align - - .type __secondary_data, %object -__secondary_data: - .long . - .long secondary_data - .long __secondary_switched #endif /* defined(CONFIG_SMP) */