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: 9883313 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 83CB960392 for ; Sat, 5 Aug 2017 20:53:27 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76490286CC for ; Sat, 5 Aug 2017 20:53:27 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6AE6A287B9; Sat, 5 Aug 2017 20:53:27 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EF898286CC for ; Sat, 5 Aug 2017 20:53:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751900AbdHEUxW (ORCPT ); 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 X-Virus-Scanned: ClamAV using ClamSMTP 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(-) 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