From: Kevin Hilman <khilman@kernel.org>
To: stable@vger.kernel.org
Cc: Nicolas Pitre <nico@linaro.org>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Russell King <rmk+kernel@arm.linux.org.uk>,
Kevin Hilman <khilman@linaro.org>
Subject: [PATCH stable/4.0.y] ARM: 8325/1: exynos: move resume code to .text section
Date: Tue, 2 Jun 2015 19:42:59 -0700 [thread overview]
Message-ID: <1433299379-18183-1-git-send-email-khilman@kernel.org> (raw)
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
This code calls cpu_resume() using a straight branch (b), so
now that we have moved cpu_resume() back to .text, this should
be moved there as well. Any direct references to symbols that will
remain in the .data section are replaced with explicit PC-relative
references.
Acked-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
(cherry picked from commit 12833bacf5d904c2dac0c3f52b2ebde5f2c5a2bc)
Cc: <stable@vger.kernel.org> # v4.0+
Signed-off-by: Kevin Hilman <khilman@linaro.org>
---
This fixes compile errors on stable/linux-4.0.y when building for ARM
using multi_v7_defconfig + CONFIG_THUMB2_KERNEL=y:
../arch/arm/mach-exynos/sleep.S:72: Error: invalid immediate for address calculation (value = 0x00000004)
../arch/arm/mach-exynos/sleep.S:74: Error: invalid immediate for address calculation (value = 0x00000004)
arch/arm/mach-exynos/sleep.S | 31 ++++++++++++++++---------------
1 file changed, 16 insertions(+), 15 deletions(-)
diff --git a/arch/arm/mach-exynos/sleep.S b/arch/arm/mach-exynos/sleep.S
index 31d25834b9c4..cf950790fbdc 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,14 +113,20 @@ skip_l2x0:
skip_cp15:
b cpu_resume
ENDPROC(exynos_cpu_resume_ns)
+
+ .align
+_cp15_save_power:
+ .long cp15_save_power - .
+_cp15_save_diag:
+ .long cp15_save_diag - .
+#ifdef CONFIG_CACHE_L2X0
+1: .long l2x0_saved_regs - .
+#endif /* CONFIG_CACHE_L2X0 */
+
+ .data
.globl cp15_save_diag
cp15_save_diag:
.long 0 @ cp15 diagnostic
.globl cp15_save_power
cp15_save_power:
.long 0 @ cp15 power control
-
-#ifdef CONFIG_CACHE_L2X0
- .align
-1: .long l2x0_saved_regs - .
-#endif /* CONFIG_CACHE_L2X0 */
--
2.3.1
next reply other threads:[~2015-06-03 2:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-03 2:42 Kevin Hilman [this message]
2015-06-14 23:13 ` [PATCH stable/4.0.y] ARM: 8325/1: exynos: move resume code to .text section Ben Hutchings
2015-06-15 7:04 ` Ard Biesheuvel
2015-06-15 11:08 ` Russell King - ARM Linux
2015-06-15 14:20 ` Ard Biesheuvel
2015-06-15 22:17 ` Kevin Hilman
2015-06-15 22:59 ` Russell King - ARM Linux
2015-06-16 10:09 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1433299379-18183-1-git-send-email-khilman@kernel.org \
--to=khilman@kernel.org \
--cc=ard.biesheuvel@linaro.org \
--cc=khilman@linaro.org \
--cc=nico@linaro.org \
--cc=rmk+kernel@arm.linux.org.uk \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.