From patchwork Wed Aug 3 15:38:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73212 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp923148qga; Wed, 3 Aug 2016 08:40:58 -0700 (PDT) X-Received: by 10.66.237.7 with SMTP id uy7mr81785049pac.152.1470238858568; Wed, 03 Aug 2016 08:40:58 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id i129si9355343pfc.174.2016.08.03.08.40.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 08:40:58 -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 1bUyGv-0005Pj-9q; Wed, 03 Aug 2016 15:39:53 +0000 Received: from mail-wm0-x233.google.com ([2a00:1450:400c:c09::233]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUyGP-00053e-2X for linux-arm-kernel@lists.infradead.org; Wed, 03 Aug 2016 15:39:25 +0000 Received: by mail-wm0-x233.google.com with SMTP id f65so452988720wmi.0 for ; Wed, 03 Aug 2016 08:39:00 -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=WS6ZeCH4RUXIudEzUmgVvwNdm24ZL7ZgW4SwtshWrHk=; b=KD+5UI1Ytu0IUydpy+mDVKrZP8hbp+7JhEynrc/PkwGAM1rEfa4lfWRFDJc+8Uj29k eQKSKbiuGxCEpF+K+K9VM4OfTQgjWjhIOsvFI0ho4AAwivoH6hlBAxeX0EBcE2s5bFBo 62IE9B033twlMlZoiZOt45fkTRi7HNf1Q+ymI= 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=WS6ZeCH4RUXIudEzUmgVvwNdm24ZL7ZgW4SwtshWrHk=; b=hiZVdwUClg62xIiDr5xlITgbkP4o933WOIoCVRqom26NfkDM3ZUOk+N9iHMWEU2oB3 5xlkfrohbnn9SgpPgd7NxRM+02lcjPn+HLXeGGSj2R7Y0rBW4kUgvUBr88j9su3KVSqt RYx8eafvOxzGXGcuxAGzozgVdPA+007YhvX0exccFW/vp/8SWUjw3xH/Vhkr2KMjhw54 gvwB9Ottz37538WbJj2nNpBCvujTO5EeIauE4xLSQPLDcIxLy47p3LCm3AW3muArvpe+ 4Sck/sM2YBAWELpVA30wUOFc0EQyHiMXTq61yVnFN7PYAYmooYxJfZt7fwk+aysQE9iF 3U+A== X-Gm-Message-State: AEkoouvouELensnAaCUSkBka7IXYoIq0TJDxp3sFJE+pwL/fHF0p6z8DHBNWmZ+uVotfloXN X-Received: by 10.28.103.6 with SMTP id b6mr71196846wmc.89.1470238739218; Wed, 03 Aug 2016 08:38:59 -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.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 08:38:58 -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 2/8] ARM: head-common.S: use PC-relative insn sequence for __proc_info Date: Wed, 3 Aug 2016 17:38:44 +0200 Message-Id: <1470238730-30038-3-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_083921_359378_7107A6D4 X-CRM114-Status: GOOD ( 10.73 ) 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:233 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-common.S | 22 ++++++-------------- 1 file changed, 6 insertions(+), 16 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-common.S b/arch/arm/kernel/head-common.S index 8733012d231f..5e0cedd870a5 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 @ __pa(__proc_info_begin) + adr_l r6, __proc_info_end @ __pa(__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