Message ID | 20170805205222.19868-9-ard.biesheuvel@linaro.org |
---|---|
State | New |
Headers | show
Delivered-To: patch@linaro.org Received: by 10.140.101.6 with SMTP id t6csp991959qge; Sat, 5 Aug 2017 13:53:52 -0700 (PDT) X-Received: by 10.98.104.133 with SMTP id d127mr6915407pfc.193.1501966432098; Sat, 05 Aug 2017 13:53:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1501966432; cv=none; d=google.com; s=arc-20160816; b=W6EeWKnyvT8Ctha5bJUrfzgR+VMkX+IDRWVk/y/T6jvClDmqAoRTG8D25x44zcmQI9 Kq+PVQj8wcSpS+0k4d8o+FJCU1oQj/Hc0hK/Wso26NLFpGwg6ewgyJDL4Aibb59NUFTn ODwNd8o/pWmnE23n/1ZV3z+jXXR9/vqrQeBuuEXf12G+A4yGKg6bajolc1iOL5OG1gIc knxrX2K5nMKN/CuO7uUNdVABpEJrBVQiTM3t5VmSo1ToW1R0ZuWQvNVCC+J1LPuhkwqL X+EAZYn7By8tdBifXClSuheHYXAbMp+DtBYOHMDsqgJlXRaNISSAPjZz13tOUDFWrWsC 3/xQ== 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=vbSCR3670snehtbQ612A6S/1eDls28nFMiu3SqsGUro=; b=z4iHR8kj4+sY/EjLs8LkjsX4a3TTFjtpCRgPq4nl1e0oHOsFUUYtHS8Hjk6I3fG0KT qKdadlMqzwhsnf03OWjJZcr/RselCkl5UKRocSpGpb+Ev6s5CRH5aGS5z3za9hc+xYh2 16dZErJUHzi6s6XFqqP4KkH9ZHC/2mCO9a+BtMEmFxOWOR5fSqYFcQZvxWTF5CI7Z1Yb Cgt+LIruCj/dZ4tSEEmqgrBgBT8gisYKsHhxi5debuEH/0txKKk5nUkRoMZ4sfc+nuRO fbshOdTwPnNZHDgfiVFgOl0V+6z0HHtrjsrjUiKqy90G+TuNYZi9Wnj6O3kp80fkkVdJ uSWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.b=AzNI/lXk; 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: <linux-omap-owner@vger.kernel.org> 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.51; Sat, 05 Aug 2017 13:53:52 -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=AzNI/lXk; 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 S1752790AbdHEUxs (ORCPT <rfc822;ivan.khoronzhuk@linaro.org> + 3 others); Sat, 5 Aug 2017 16:53:48 -0400 Received: from mail-wm0-f46.google.com ([74.125.82.46]:35070 "EHLO mail-wm0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752761AbdHEUxf (ORCPT <rfc822; linux-omap@vger.kernel.org>); Sat, 5 Aug 2017 16:53:35 -0400 Received: by mail-wm0-f46.google.com with SMTP id m85so42480804wma.0 for <linux-omap@vger.kernel.org>; Sat, 05 Aug 2017 13:53:35 -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=5WQyT0WG5y7rV9xMOfN/zzzm++0D2SfRBebqJRnq+2g=; b=AzNI/lXkhN3bBVYoUgoq6xCjWG7+uhNT4iuVu3dHqOm6FrxYoP+/ndrWwt4l4CclLQ +GHkB98NdzgRtUiJChGRPsfklH/+6nCt3S3ZeCuV2C8U2bc/eJpkaBP71kLcX/WrgAhU 3jrlh4rVaO4jBs53gIebS/FBKNqK0U10sqjWQ= 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=5WQyT0WG5y7rV9xMOfN/zzzm++0D2SfRBebqJRnq+2g=; b=qYgvaN1Vg9L200CW5nlhFITW8OnlJ+Xana3SZHEFWj/5l5rb8aEyWuaVRK67d/5N/Y 155lOA/K88rT+vh8FNoOUqrfwSN6vameqc6nWvb/bCRepVgg6rk0HhhoBLkK02sDxRy4 zurWsfxcXSUvrHo1mLVD5XZmPuu8FeELzIlo4AKqrvCuQU58xLGAG0TLv1WkR9nfXoqY SDh9IEDratnR1mkTd0DObCHl6GVju6w94RZztCtfp3f5JpP4noZFtjACiXEwmPyll2wQ /tPsnKO61hquzej/fgfGDWUDpd0f2Wti/OhfcNab91PchYL6y/maGtfFFZ5xAr3k9OHn qmhQ== X-Gm-Message-State: AHYfb5griZDnT2QtqaGer/z7+zRgKlFOySVXgziRPLKSRQjZWxjiWW7P WMJFILD4KcQ7tBzlbvzd8Q== X-Received: by 10.28.180.8 with SMTP id d8mr4167339wmf.161.1501966414539; Sat, 05 Aug 2017 13:53:34 -0700 (PDT) Received: from localhost.localdomain ([160.77.147.147]) by smtp.gmail.com with ESMTPSA id v62sm2601775wmd.2.2017.08.05.13.53.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Aug 2017 13:53:33 -0700 (PDT) From: Ard Biesheuvel <ard.biesheuvel@linaro.org> 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 <ard.biesheuvel@linaro.org> Subject: [PATCH 08/15] ARM: head.S: use PC relative insn sequence to calculate PHYS_OFFSET Date: Sat, 5 Aug 2017 21:52:15 +0100 Message-Id: <20170805205222.19868-9-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: <linux-omap.vger.kernel.org> X-Mailing-List: linux-omap@vger.kernel.org |
Series |
ARM: add and use convenience macros for PC relative references
|
expand
|
diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 939543e73874..e08a4623a980 100644 --- a/arch/arm/kernel/head.S +++ b/arch/arm/kernel/head.S @@ -106,10 +106,8 @@ ENTRY(stext) #endif #ifndef CONFIG_XIP_KERNEL - adr r3, 2f - ldmia r3, {r4, r8} - sub r4, r3, r4 @ (PHYS_OFFSET - PAGE_OFFSET) - add r8, r8, r4 @ PHYS_OFFSET + adr_l r8, _text @ __pa(_text) + sub r8, r8, #TEXT_OFFSET @ PHYS_OFFSET #else ldr r8, =PLAT_PHYS_OFFSET @ always constant in this case #endif @@ -161,10 +159,6 @@ ENTRY(stext) 1: b __enable_mmu ENDPROC(stext) .ltorg -#ifndef CONFIG_XIP_KERNEL -2: .long . - .long PAGE_OFFSET -#endif /* * Setup the initial page tables. We only setup the barest
Replace the open coded arithmetic with a simple adr_l/sub pair. Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> --- arch/arm/kernel/head.S | 10 ++-------- 1 file changed, 2 insertions(+), 8 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