From patchwork Wed Aug 3 15:38:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73213 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp923316qga; Wed, 3 Aug 2016 08:41:18 -0700 (PDT) X-Received: by 10.98.95.129 with SMTP id t123mr11919009pfb.148.1470238878649; Wed, 03 Aug 2016 08:41:18 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id k62si9363546pfb.69.2016.08.03.08.41.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 08:41:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) client-ip=2001:1868:205::9; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:1868:205::9 as permitted sender) smtp.mailfrom=linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUyHF-0005r4-7r; Wed, 03 Aug 2016 15:40:13 +0000 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUyGQ-000542-In for linux-arm-kernel@lists.infradead.org; Wed, 03 Aug 2016 15:39:26 +0000 Received: by mail-wm0-x22d.google.com with SMTP id f65so452989542wmi.0 for ; Wed, 03 Aug 2016 08:39:02 -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=B/Wx2/ksfiem7Rc7S7mQ9xm8Udw66d311fEDy7JqTPE=; b=XHpgMDT6oMO/qC2D/oH0FcIVr7NDhu7491oQmoVbyA6e/brHP6ZSCk4IH/J05xAdkl yIXPqJ+QBrQDimaKO2SRrdzCFkKj7x1oSLWXp2qKvscsjShrjWZa3hPRs/iUwcc09BOK wQHPjboI/JvFzdK7VrxPqCisCeSGTVrXfat4Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=B/Wx2/ksfiem7Rc7S7mQ9xm8Udw66d311fEDy7JqTPE=; b=IIkdcRL1OQl7jbzSke0gvO7f2F0C6+5045nm2b/NWy0v16db8THuFj7Yyts2BsvC11 +bJP3c4IAkfq4aUKdBrs3db3rnbcXQUUFydUt7Z4Dohi8JnB1RM1ALwqVk/2DOeMmFbE YrvnvmF+c2KiQ+T8YgreCDkGt+ZNhkprLgHwg5t35dHUVDnUF1kFOp/R+OziZbXyAZER WArlduw9VvLs9EorKCgs/wpFGmBMHOY69zJnMOu7fDqPSHbLy4AxMUiI5uW0YNlKEzWY E/Iu9m4Rft+XjWiJ1DuYG8/hBQwpuBd5KRiiL+OYRrKjNenPMzWUoAcpZcnmA4RGVNsq blYQ== X-Gm-Message-State: AEkooutFChSE/DygOsxUo4hTMcqleHZyB0IzOqQYsSy9wBbq6rS2yfwe9w6z2rJzu6IiJEUY X-Received: by 10.194.83.98 with SMTP id p2mr61350687wjy.134.1470238740777; Wed, 03 Aug 2016 08:39:00 -0700 (PDT) Received: from localhost.localdomain (3.red-81-34-118.dynamicip.rima-tde.net. [81.34.118.3]) by smtp.gmail.com with ESMTPSA id uo4sm8291402wjc.36.2016.08.03.08.38.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 08:39:00 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, linux@arm.linux.org.uk, nico@linaro.org, arnd@arndb.de, dave.martin@arm.com Subject: [PATCH 3/8] ARM: head-common.S: use PC-relative insn sequence for __turn_mmu_on Date: Wed, 3 Aug 2016 17:38:45 +0200 Message-Id: <1470238730-30038-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1470238730-30038-1-git-send-email-ard.biesheuvel@linaro.org> References: <1470238730-30038-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160803_083922_825419_632F7925 X-CRM114-Status: UNSURE ( 9.71 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.7 (--) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-2.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [2a00:1450:400c:c09:0:0:0:22d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org Replace the open coded PC relative offset calculations with adr_l invocations. Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/head.S | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel diff --git a/arch/arm/kernel/head.S b/arch/arm/kernel/head.S index 04286fd9e09c..f99360e5b004 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 @ phys __turn_mmu_on + adr_l r6, __turn_mmu_on_end @ phys __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