From patchwork Sat Aug 5 20:52:10 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 109490 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp991667qge; Sat, 5 Aug 2017 13:53:26 -0700 (PDT) X-Received: by 10.84.231.143 with SMTP id g15mr7821733plk.157.1501966406530; Sat, 05 Aug 2017 13:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966406; cv=none; d=google.com; s=arc-20160816; b=trh68y4e7vCnazjuNts9zyzVXYSPJ7B+Ka4Fj3dL+zQaH3IdtixfaLCSRqXxDk8sam o0jVvCpcm0hj086dTbKuMr1rvzJE14i08v5uP+Gv/QCtbqW4Ei3/EaUjCLOOa+Uokfw/ wdM83pnYCRxl/NFZvbDt+eF/emLmMbcwnI8H7ZQLZd6KrdowsJNLSct9mRwimIqcoPF5 xxe+ZW6QrixEft7A25HG/mkVCunkWVaf12nhOiGEUfrvW/AjKA6pcjEKAXTW22c9c7iw jS53AAjVPyWS+GKdJMmzTJhSL9R85JkK8c4VH7HTImPrOxyW4OS08s5JnsbB+IkUkx/M cxVg== 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=oYM6hjboCniIka/Jjse2hAbLCIS4WiOywxNirSO+ylw=; b=viyZckLcN/gvXW54FjtTG++TRuYg4xeoSrUSUEgXQjeH4H1kC5ru09NlqivkiNcGf2 xMZn1SSfJ0cZ6PqONtTELRc5hDmUl340zBfsOQ+wGRdwfRNYd0L96qyI3EVJs8EieRtW 3fqsuAVfqO+ud5rPKcnmUkhdI8qEUFUJReZv794RMgzZjzuzIyLbvVgo2h5aee4xxFHv dwGboKJaw6Rmrj3/3RENBZruX4+uZ8ghBUqBw1FTDFl235RnWo9KWuNidtLDdWGCXGpN b7G/UO9x8n3EdHSFddIfdzVhXknc0AdcPU8rsmOhZrmgQuhSZDx//QoohI6PdIi60skB ZOUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Oq6tPsih; 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 d6si2666264pfb.409.2017.08.05.13.53.26; Sat, 05 Aug 2017 13:53:26 -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=Oq6tPsih; 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 S1751900AbdHEUxW (ORCPT + 3 others); Sat, 5 Aug 2017 16:53:22 -0400 Received: from mail-wr0-f176.google.com ([209.85.128.176]:33012 "EHLO mail-wr0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752661AbdHEUxS (ORCPT ); Sat, 5 Aug 2017 16:53:18 -0400 Received: by mail-wr0-f176.google.com with SMTP id v105so27162921wrb.0 for ; Sat, 05 Aug 2017 13:53:17 -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=UjP01tbr0+U785R7Y/bWJ4Ge/bnZSzS/dsXQg2oOd7g=; b=Oq6tPsih7wDXmHZr39rBllBoYIPyGCDr/HHAvcTRlmIaxA2jkkUW3qm39k5Ib2V+Jn ADGifVvUgfCor6SeZQy2Gio9kd69ARO+ujKxwELP7PzbjF75cPl+wNgAV2Eq2N3VYQh/ cZ0hVIndrJ1Rk+O2C338qHLwBc+W59yqIRt74= 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=UjP01tbr0+U785R7Y/bWJ4Ge/bnZSzS/dsXQg2oOd7g=; b=s+7URLY5WJBQgwaGdL/mD19XgFZrv8YZPASMooX2VZT/5UEFOjR8eKlmkg45fR8tR3 yHIEKJn1W0AzAaxBaqfTglbN9J3J51P07nex1HWK54IX2nrjR/xsGMnYO7mcMW4o6FBl CA2b78JDOQsPerCQy9hypaqbV6cd7scmgbHxhLtx9mCquw36+E2lwZtO2MejPQGxPPXn okZTEyCGZfZYa70uHyv42syH1wldVnwfTzYsaCMAkiN02GfBwoDwzuwWpe2HDoE+X5L4 mr0X9OqmxIjWjK6+0f8DMAa1YA8Mvj+gkogAvksYgOzkzL9Bj+z4q4G/0XG4OdffuMXa xovQ== X-Gm-Message-State: AIVw110kse2CusFil9B8daS+hX+Ca55fokYkrXVlZjaPWCGK2xr3uKKO os8W89TK8KPc9FMr X-Received: by 10.223.172.230 with SMTP id o93mr5071030wrc.273.1501966397092; Sat, 05 Aug 2017 13:53:17 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:16 -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 03/15] ARM: head-common.S: use PC-relative insn sequence for __turn_mmu_on Date: Sat, 5 Aug 2017 21:52:10 +0100 Message-Id: <20170805205222.19868-4-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 a pair of adr_l invocations. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/head.S | 12 ++---------- 1 file changed, 2 insertions(+), 10 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 04286fd9e09c..0a98aec0e39d 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -227,11 +227,8 @@ __create_page_tables: * Create identity mapping to cater for __enable_mmu. * This identity mapping will be removed by paging_init(). */ - adr r0, __turn_mmu_on_loc - ldmia r0, {r3, r5, r6} - sub r0, r0, r3 @ virt->phys offset - add r5, r5, r0 @ phys __turn_mmu_on - add r6, r6, r0 @ phys __turn_mmu_on_end + adr_l r5, __turn_mmu_on @ _pa(__turn_mmu_on) + adr_l r6, __turn_mmu_on_end @ _pa(__turn_mmu_on_end) mov r5, r5, lsr #SECTION_SHIFT mov r6, r6, lsr #SECTION_SHIFT @@ -354,11 +351,6 @@ __create_page_tables: ret lr ENDPROC(__create_page_tables) .ltorg - .align -__turn_mmu_on_loc: - .long . - .long __turn_mmu_on - .long __turn_mmu_on_end #if defined(CONFIG_SMP) .text