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: 109489 Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp991615qge; Sat, 5 Aug 2017 13:53:22 -0700 (PDT) X-Received: by 10.98.211.73 with SMTP id q70mr6741871pfg.285.1501966402703; Sat, 05 Aug 2017 13:53:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966402; cv=none; d=google.com; s=arc-20160816; b=FaXgc/SaCEvdrHGB1yeNkZw0hjjAHiCC1J4BwbVn6HfeoTUGYtOxmfwiL8KaUKoyTX Xn3Mg/S1Lc2+mpHhbnILjfEuenLjsrjjHpXRznqNYeRvqEqbaM7JD+MX/PkhK8v6enTJ AkaxDEiqG3SsskWqG9/Ym+fR2GnP/fyOiiWxTFs7IHQ76l+NhRZS7LyBRR5+yMaBv8Tr U6v/H5buVTeJ1GraBiCptsjBj5rJapurvc7qVYBI5MNOtKFRv3fqz+6/2+hg8hBb6Asw gqLJSQDp9ST7XlbOaz90L1LloC9K4KSQufWvytFfHcY3DIXG26FkEwflQdkAxCKCSZhV S8CQ== 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=g47jTa0w7nYudYNqb2keVrxaays+CqTCfErehCtzlv4=; b=T7EKRuDZzeLGogJHhWn7XhqSJPmx3aSO5W8MPwdOCL0+MiSHz8mSuKLa+hXqfGlrvM u/EyObFNizcTosscgvUoLbK86BFpA8HizMNUHl4GMNT4XbjThAWHyhKpngBDeV2NvLRM eRcOkcFjN+n1OpcXCbPY46OR9Hq1R/T3CvO4ldmvm0uQE+YJLT4Gc4P7B1XUiYBOJ6N+ hGQC1A1wC5M1DVma4T5+D5bhoQlz37useVOrO9Y+N/+BYcVUXjbjP1pJe8dWyZ3NruVn WrzH3RHWVZx3+FeMgTJoqUVwW549KElvT4vHGoAJjq1rJ6TZdwxm6OhXalPTb2hhl3j8 wSRg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=Ge48/yWd; 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 t11si2480065pgo.694.2017.08.05.13.53.22; Sat, 05 Aug 2017 13:53:22 -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=Ge48/yWd; 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 S1752643AbdHEUxR (ORCPT + 3 others); 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 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(-) -- 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-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