aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-03-25 02:41:43 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2015-03-29 18:11:57 -0400
commit12833bacf5d904c2dac0c3f52b2ebde5f2c5a2bc (patch)
treeef1b7a775119b17f328f75877c56e3c4ea98082c
parentd0776aff9a38b1390cc06ffc2c4dcf6ece7c05b9 (diff)
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: 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>
-rw-r--r--arch/arm/mach-exynos/sleep.S31
1 files 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 @@
23#define CPU_MASK 0xff0ffff0 23#define CPU_MASK 0xff0ffff0
24#define CPU_CORTEX_A9 0x410fc090 24#define CPU_CORTEX_A9 0x410fc090
25 25
26 /* 26 .text
27 * The following code is located into the .data section. This is to
28 * allow l2x0_regs_phys to be accessed with a relative load while we
29 * can't rely on any MMU translation. We could have put l2x0_regs_phys
30 * in the .text section as well, but some setups might insist on it to
31 * be truly read-only. (Reference from: arch/arm/kernel/sleep.S)
32 */
33 .data
34 .align 27 .align
35 28
36 /* 29 /*
@@ -69,10 +62,12 @@ ENTRY(exynos_cpu_resume_ns)
69 cmp r0, r1 62 cmp r0, r1
70 bne skip_cp15 63 bne skip_cp15
71 64
72 adr r0, cp15_save_power 65 adr r0, _cp15_save_power
73 ldr r1, [r0] 66 ldr r1, [r0]
74 adr r0, cp15_save_diag 67 ldr r1, [r0, r1]
68 adr r0, _cp15_save_diag
75 ldr r2, [r0] 69 ldr r2, [r0]
70 ldr r2, [r0, r2]
76 mov r0, #SMC_CMD_C15RESUME 71 mov r0, #SMC_CMD_C15RESUME
77 dsb 72 dsb
78 smc #0 73 smc #0
@@ -118,14 +113,20 @@ skip_l2x0:
118skip_cp15: 113skip_cp15:
119 b cpu_resume 114 b cpu_resume
120ENDPROC(exynos_cpu_resume_ns) 115ENDPROC(exynos_cpu_resume_ns)
116
117 .align
118_cp15_save_power:
119 .long cp15_save_power - .
120_cp15_save_diag:
121 .long cp15_save_diag - .
122#ifdef CONFIG_CACHE_L2X0
1231: .long l2x0_saved_regs - .
124#endif /* CONFIG_CACHE_L2X0 */
125
126 .data
121 .globl cp15_save_diag 127 .globl cp15_save_diag
122cp15_save_diag: 128cp15_save_diag:
123 .long 0 @ cp15 diagnostic 129 .long 0 @ cp15 diagnostic
124 .globl cp15_save_power 130 .globl cp15_save_power
125cp15_save_power: 131cp15_save_power:
126 .long 0 @ cp15 power control 132 .long 0 @ cp15 power control
127
128#ifdef CONFIG_CACHE_L2X0
129 .align
1301: .long l2x0_saved_regs - .
131#endif /* CONFIG_CACHE_L2X0 */