From patchwork Tue Mar 24 17:52:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 46277 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f199.google.com (mail-wi0-f199.google.com [209.85.212.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BC221214B0 for ; Tue, 24 Mar 2015 17:55:50 +0000 (UTC) Received: by widex7 with SMTP id ex7sf784804wid.2 for ; Tue, 24 Mar 2015 10:55:50 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=e8dPGjBbw+r9xuq/hWsl3RoZEgpO/jlz+SjaiNG6cH0=; b=OxaNlQ/t3YRqvcg7TTrvGc97zPrh+pxO8aYElTaQiQNEkFPIgnMv3E/LWfgtPCpvmi qi0VS8S/VpZGeR7eL38q70vv9Q0vbq59hc4+m16Cv+QXgzcGY9NfKubDaA8cjsC7HhIT bAMrXTVmXC2eXN9UibUOYPUR3gSoERAGJdg6MDQl44WFvBuUq065KAPqf3VePE1nAJHa jxB6UthRu06oeO8zQVdqFtrUnXP4zbEMEyLdy8Ro9mCXU0Wkq3kTpoIilRipC9XxdABB sFgyGFw9cEBBviYCKz9n+IGLY8nhMd74g792NZxmW4L1C+BEF6KVqhqoH851UQCmT8mI /D/Q== X-Gm-Message-State: ALoCoQkDOirY8supoP/P6dvAmD4GwrhGS+7SbHeKSg5X1L4QTLqF9cVVEEnfmLhpYvsYmLybOFCW X-Received: by 10.181.12.74 with SMTP id eo10mr3374301wid.2.1427219750081; Tue, 24 Mar 2015 10:55:50 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.7.135 with SMTP id j7ls256822laa.66.gmail; Tue, 24 Mar 2015 10:55:49 -0700 (PDT) X-Received: by 10.152.198.203 with SMTP id je11mr4624237lac.85.1427219749736; Tue, 24 Mar 2015 10:55:49 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id rh2si3488018lbb.141.2015.03.24.10.55.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 10:55:49 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by lagg8 with SMTP id g8so402061lag.1 for ; Tue, 24 Mar 2015 10:55:49 -0700 (PDT) X-Received: by 10.152.5.194 with SMTP id u2mr4835725lau.88.1427219749477; Tue, 24 Mar 2015 10:55:49 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.57.201 with SMTP id k9csp1606755lbq; Tue, 24 Mar 2015 10:55:48 -0700 (PDT) X-Received: by 10.70.108.232 with SMTP id hn8mr9801062pdb.68.1427219743626; Tue, 24 Mar 2015 10:55:43 -0700 (PDT) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r8si6685920pap.44.2015.03.24.10.55.42 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Mar 2015 10:55:43 -0700 (PDT) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YaT1i-0002q4-Nt; Tue, 24 Mar 2015 17:54:06 +0000 Received: from mail-we0-f170.google.com ([74.125.82.170]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YaT0o-0002Ol-9b for linux-arm-kernel@lists.infradead.org; Tue, 24 Mar 2015 17:53:11 +0000 Received: by weoy45 with SMTP id y45so336794weo.2 for ; Tue, 24 Mar 2015 10:52:48 -0700 (PDT) X-Received: by 10.194.192.65 with SMTP id he1mr10466991wjc.118.1427219568170; Tue, 24 Mar 2015 10:52:48 -0700 (PDT) Received: from ards-macbook-pro.local ([90.174.5.112]) by mx.google.com with ESMTPSA id ge8sm7064903wjc.32.2015.03.24.10.52.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 24 Mar 2015 10:52:47 -0700 (PDT) From: Ard Biesheuvel To: linux-arm-kernel@lists.infradead.org, nico@linaro.org, linux@arm.linux.org.uk, dave.martin@arm.com, arnd@arndb.de Subject: [PATCH v2 3/4] ARM: exynos: move resume code to .text section Date: Tue, 24 Mar 2015 18:52:29 +0100 Message-Id: <1427219550-21636-4-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1427219550-21636-1-git-send-email-ard.biesheuvel@linaro.org> References: <1427219550-21636-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150324_105310_538156_FF67ABDF X-CRM114-Status: GOOD ( 10.04 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.170 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.170 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This code calls cpu_resume() using a straight branch (b), so it has no business being in the .data section, especially now we moved cpu_resume() back to .text as well. Signed-off-by: Ard Biesheuvel --- arch/arm/mach-exynos/sleep.S | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S index 31d25834b9c4..fe5d9ed24ac2 100644 --- a/arch/arm/mach-exynos/sleep.S +++ b/arch/arm/mach-exynos/sleep.S @@ -23,14 +23,7 @@ #define CPU_MASK 0xff0ffff0 #define CPU_CORTEX_A9 0x410fc090 - /* - * The following code is located into the .data section. This is to - * allow l2x0_regs_phys to be accessed with a relative load while we - * can't rely on any MMU translation. We could have put l2x0_regs_phys - * in the .text section as well, but some setups might insist on it to - * be truly read-only. (Reference from: arch/arm/kernel/sleep.S) - */ - .data + .text .align /* @@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns) cmp r0, r1 bne skip_cp15 - adr r0, cp15_save_power + adr r0, _cp15_save_power ldr r1, [r0] - adr r0, cp15_save_diag + ldr r1, [r0, r1] + adr r0, _cp15_save_diag ldr r2, [r0] + ldr r2, [r0, r2] mov r0, #SMC_CMD_C15RESUME dsb smc #0 @@ -118,6 +113,13 @@ skip_l2x0: skip_cp15: b cpu_resume ENDPROC(exynos_cpu_resume_ns) + +_cp15_save_power: + .long cp15_save_power - . +_cp15_save_diag: + .long cp15_save_diag - . + + .data .globl cp15_save_diag cp15_save_diag: .long 0 @ cp15 diagnostic @@ -126,6 +128,7 @@ cp15_save_power: .long 0 @ cp15 power control #ifdef CONFIG_CACHE_L2X0 + .text .align 1: .long l2x0_saved_regs - . #endif /* CONFIG_CACHE_L2X0 */