From patchwork Sat Aug 5 20:52:09 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 9883303 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 56F7F603F4 for ; Sat, 5 Aug 2017 20:53:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48B50287EE for ; Sat, 5 Aug 2017 20:53:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3D24828824; Sat, 5 Aug 2017 20:53:22 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 B5AD6287EE for ; Sat, 5 Aug 2017 20:53:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752643AbdHEUxR (ORCPT ); Sat, 5 Aug 2017 16:53:17 -0400 Received: from mail-wm0-f44.google.com ([74.125.82.44]:35024 "EHLO mail-wm0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbdHEUxP (ORCPT ); Sat, 5 Aug 2017 16:53:15 -0400 Received: by mail-wm0-f44.google.com with SMTP id m85so42478120wma.0 for ; Sat, 05 Aug 2017 13:53:14 -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=Z+7fZrLjEl5NG/5VHI+5wY5OrhioWvkA34hARviywqA=; b=Ge48/yWdSBVbBrFyV6ri9e8CTmulOYAWFO7FrN7TYayda/VrITedwkGlz32spdataE yisyQLy5x6hKgIuq2z3kZKcgL3Vhp58zHrjG9EBbflMPk3SQ/PJL03KDGcT9jlz2jco6 8vqA9LBT8kbbp8hYRDn8pgig6pahT0eG2CAK4= 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=Z+7fZrLjEl5NG/5VHI+5wY5OrhioWvkA34hARviywqA=; b=mS2liSyy4/AIvosNBUVAv1C4CxEv0roZw/VGZl9+2ZGiJb5qjM+P+L69fukVjYBVFk KsUPTNJ4SWG+E446AiTklcWIw4vZ389XLC8hX35gyEmpAB5L11mjfRGnqn9ftfHl/ZNI vqPeNM3z+nVh8kWm3jS5J8+tyKvRDkSKUbIowJLLUZdm26FGMUUlJ2MawNTySxR0oAYf 3nHgcLdym5bveeQahFJo2apekGik3SDBGfNyne4R2VM73GvmhnDXu6HFHXV6H1sYsKep tA0fGd+OCYulhJOoiVkfm8JEoKpVnrmEtkJVS0K2bA30uIrJ6bHvXxV26GWZ39LGsXaK f9vg== X-Gm-Message-State: AHYfb5jxoIuKGyXRWc8eSVrcCRKphn7pWnsvTqX8ix8cdSZDZfu/OuKq XzPsArbkNxAWrx23 X-Received: by 10.28.71.206 with SMTP id m75mr4292198wmi.13.1501966393903; Sat, 05 Aug 2017 13:53:13 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:13 -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 02/15] ARM: head-common.S: use PC-relative insn sequence for __proc_info Date: Sat, 5 Aug 2017 21:52:09 +0100 Message-Id: <20170805205222.19868-3-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-common.S | 22 ++++++-------------- 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S index 8733012d231f..06035488130c 100644 --- a/arch/arm/kernel/head-common.S +++ b/arch/arm/kernel/head-common.S @@ -150,11 +150,12 @@ ENDPROC(lookup_processor_type) * r9 = cpuid (preserved) */ __lookup_processor_type: - adr r3, __lookup_processor_type_data - ldmia r3, {r4 - r6} - sub r3, r3, r4 @ get offset between virt&phys - add r5, r5, r3 @ convert virt addresses to - add r6, r6, r3 @ physical address space + /* + * Look in for information about the __proc_info + * structure. + */ + adr_l r5, __proc_info_begin + adr_l r6, __proc_info_end 1: ldmia r5, {r3, r4} @ value, mask and r4, r4, r9 @ mask wanted bits teq r3, r4 @@ -166,17 +167,6 @@ __lookup_processor_type: 2: ret lr ENDPROC(__lookup_processor_type) -/* - * Look in for information about the __proc_info structure. - */ - .align 2 - .type __lookup_processor_type_data, %object -__lookup_processor_type_data: - .long . - .long __proc_info_begin - .long __proc_info_end - .size __lookup_processor_type_data, . - __lookup_processor_type_data - __error_lpae: #ifdef CONFIG_DEBUG_LL adr r0, str_lpae