Commit 12833bac authored by Ard Biesheuvel's avatar Ard Biesheuvel Committed by Russell King

ARM: 8325/1: exynos: move resume code to .text section

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: default avatarNicolas Pitre <nico@linaro.org>
Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent d0776aff
...@@ -23,14 +23,7 @@ ...@@ -23,14 +23,7 @@
#define CPU_MASK 0xff0ffff0 #define CPU_MASK 0xff0ffff0
#define CPU_CORTEX_A9 0x410fc090 #define CPU_CORTEX_A9 0x410fc090
/* .text
* 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
.align .align
/* /*
...@@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns) ...@@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns)
cmp r0, r1 cmp r0, r1
bne skip_cp15 bne skip_cp15
adr r0, cp15_save_power adr r0, _cp15_save_power
ldr r1, [r0] ldr r1, [r0]
adr r0, cp15_save_diag ldr r1, [r0, r1]
adr r0, _cp15_save_diag
ldr r2, [r0] ldr r2, [r0]
ldr r2, [r0, r2]
mov r0, #SMC_CMD_C15RESUME mov r0, #SMC_CMD_C15RESUME
dsb dsb
smc #0 smc #0
...@@ -118,14 +113,20 @@ skip_l2x0: ...@@ -118,14 +113,20 @@ skip_l2x0:
skip_cp15: skip_cp15:
b cpu_resume b cpu_resume
ENDPROC(exynos_cpu_resume_ns) 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 .globl cp15_save_diag
cp15_save_diag: cp15_save_diag:
.long 0 @ cp15 diagnostic .long 0 @ cp15 diagnostic
.globl cp15_save_power .globl cp15_save_power
cp15_save_power: cp15_save_power:
.long 0 @ cp15 power control .long 0 @ cp15 power control
#ifdef CONFIG_CACHE_L2X0
.align
1: .long l2x0_saved_regs - .
#endif /* CONFIG_CACHE_L2X0 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment