From patchwork Wed Aug 3 15:38:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 73215 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp923665qga; Wed, 3 Aug 2016 08:41:59 -0700 (PDT) X-Received: by 10.98.206.129 with SMTP id y123mr117033554pfg.7.1470238919248; Wed, 03 Aug 2016 08:41:59 -0700 (PDT) Return-Path: Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id p1si9360105paw.148.2016.08.03.08.41.59 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Aug 2016 08:41:59 -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 1bUyHv-0007E7-RH; Wed, 03 Aug 2016 15:40:55 +0000 Received: from mail-wm0-x22b.google.com ([2a00:1450:400c:c09::22b]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bUyGV-00054y-HS for linux-arm-kernel@lists.infradead.org; Wed, 03 Aug 2016 15:39:30 +0000 Received: by mail-wm0-x22b.google.com with SMTP id f65so452992656wmi.0 for ; Wed, 03 Aug 2016 08:39:07 -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=mOFhGG9Xcq6BFwmW2OPJ1wu1VUGQjZ9PHfAELBb043U=; b=LXijhgidXtzEH1G2z5QRPxeWs98MZbPI6kI9V3qbCdQJMjIFF3qsguVR4yUc2mnnxM xOavRmLOQ7vEVdrumj1n1JGmWauVpuIbznjlX0fL0Ancm1Xw7GVJqWOVToj85yzGe8vy DdxLci3Bj4/2gcbsEWQb6DGo0jjrf3VvuIP1A= 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=mOFhGG9Xcq6BFwmW2OPJ1wu1VUGQjZ9PHfAELBb043U=; b=ZwKG9TksFba8iR9rpkKNjfCviNb37ZwJknPjJoDg73i90AjUrxfuqIGWAor25+v+LY r4JBUk+DMslbWIkeQdzS9aYXqSQciflSWwQleniXBJoBINVtmFRol9+sIqHrn81oZhPs syplGym1MYZ9kc70Krse0bP7ntYjekoklBZPeLiognnkYerbFRIC6ZXyl1HMz717d69j MRxPFFfCZ06xVI0EJBqFUk87PUG8QiCtob6Cf0qKCwrzniKdebmRzbooZGTJDFTXh1LI mFLFqi/Em53Fz+8i0WCxMjf9TJ58OP+40X8o+Fgb5sxlctOTDWVJAsZrAFPrObr2jUzW iJHg== X-Gm-Message-State: AEkoouvEptDwHINejOqoju1TutwETg3faWUVOqGG/er2isDHFxhm01Kz3aQuYnm17mh22No9 X-Received: by 10.194.175.201 with SMTP id cc9mr61588872wjc.38.1470238745802; Wed, 03 Aug 2016 08:39:05 -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.39.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 03 Aug 2016 08:39:05 -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 6/8] ARM: sleep.S: use PC-relative insn sequence for sleep_save_sp/mpidr_hash Date: Wed, 3 Aug 2016 17:38:48 +0200 Message-Id: <1470238730-30038-7-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_083927_862370_8E5ACA24 X-CRM114-Status: UNSURE ( 9.93 ) 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:22b 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/sleep.S | 15 +++------------ 1 file changed, 3 insertions(+), 12 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/sleep.S b/arch/arm/kernel/sleep.S index 0f6c1000582c..445011af9162 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S @@ -137,9 +137,8 @@ ARM_BE8(setend be) @ ensure we are in BE mode mov r1, #0 ALT_SMP(mrc p15, 0, r0, c0, c0, 5) ALT_UP_B(1f) - adr r2, mpidr_hash_ptr - ldr r3, [r2] - add r2, r2, r3 @ r2 = struct mpidr_hash phys address + adr_l r2, mpidr_hash @ r2 = struct mpidr_hash phys address + /* * This ldmia relies on the memory layout of the mpidr_hash * struct mpidr_hash. @@ -147,9 +146,7 @@ ARM_BE8(setend be) @ ensure we are in BE mode ldmia r2, { r3-r6 } @ r3 = mpidr mask (r4,r5,r6) = l[0,1,2] shifts compute_mpidr_hash r1, r4, r5, r6, r0, r3 1: - adr r0, _sleep_save_sp - ldr r2, [r0] - add r0, r0, r2 + adr_l r0, sleep_save_sp ldr r0, [r0, #SLEEP_SAVE_SP_PHYS] ldr r0, [r0, r1, lsl #2] @@ -164,12 +161,6 @@ ENDPROC(cpu_resume) ENDPROC(cpu_resume_arm) #endif - .align 2 -_sleep_save_sp: - .long sleep_save_sp - . -mpidr_hash_ptr: - .long mpidr_hash - . @ mpidr_hash struct offset - .data .type sleep_save_sp, #object ENTRY(sleep_save_sp)