diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-13 08:39:44 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2011-06-24 03:47:20 -0400 |
commit | 6b5f6ab0e1c33beaed828271f13c03ed02ee3c15 (patch) | |
tree | d945a765d69fb9f60f6f359735aab9883998f7a9 /arch/arm/kernel/sleep.S | |
parent | 3125af241cdb5a2421aad9f710b2744228a79084 (diff) |
ARM: pm: make MULTI_CPU and !MULTI_CPU resume paths the same
Eliminate the differences between MULTI_CPU and non-MULTI_CPU resume
paths, making the saved structure identical irrespective of the way
the kernel was configured.
Acked-by: Frank Hofmann <frank.hofmann@tomtom.com>
Tested-by: Kevin Hilman <khilman@ti.com>
Acked-by: Jean Pihet <j-pihet@ti.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/sleep.S')
-rw-r--r-- | arch/arm/kernel/sleep.S | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/arch/arm/kernel/sleep.S b/arch/arm/kernel/sleep.S index 6398ead9d1c..97a6577aa61 100644 --- a/arch/arm/kernel/sleep.S +++ b/arch/arm/kernel/sleep.S | |||
@@ -40,9 +40,11 @@ ENTRY(cpu_suspend) | |||
40 | #else | 40 | #else |
41 | mov r2, sp @ current virtual SP | 41 | mov r2, sp @ current virtual SP |
42 | ldr r0, =cpu_suspend_size | 42 | ldr r0, =cpu_suspend_size |
43 | ldr ip, =cpu_do_resume | ||
43 | sub sp, sp, r0 @ allocate CPU state on stack | 44 | sub sp, sp, r0 @ allocate CPU state on stack |
44 | mov r0, sp @ save pointer | 45 | mov r0, sp @ save pointer |
45 | stmfd sp!, {r1, r2, r3} @ save v:p, virt SP, return fn | 46 | add ip, ip, r1 @ convert resume fn to phys |
47 | stmfd sp!, {r1, r2, r3, ip} @ save v:p, virt SP, retfn, phys resume fn | ||
46 | ldr r3, =sleep_save_sp | 48 | ldr r3, =sleep_save_sp |
47 | add r2, sp, r1 @ convert SP to phys | 49 | add r2, sp, r1 @ convert SP to phys |
48 | #ifdef CONFIG_SMP | 50 | #ifdef CONFIG_SMP |
@@ -120,20 +122,12 @@ ENTRY(cpu_resume) | |||
120 | ldr r0, sleep_save_sp @ stack phys addr | 122 | ldr r0, sleep_save_sp @ stack phys addr |
121 | #endif | 123 | #endif |
122 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off | 124 | setmode PSR_I_BIT | PSR_F_BIT | SVC_MODE, r1 @ set SVC, irqs off |
123 | #ifdef MULTI_CPU | ||
124 | @ load v:p, stack, return fn, resume fn | 125 | @ load v:p, stack, return fn, resume fn |
125 | ARM( ldmia r0!, {r1, sp, lr, pc} ) | 126 | ARM( ldmia r0!, {r1, sp, lr, pc} ) |
126 | THUMB( ldmia r0!, {r1, r2, r3, r4} ) | 127 | THUMB( ldmia r0!, {r1, r2, r3, r4} ) |
127 | THUMB( mov sp, r2 ) | 128 | THUMB( mov sp, r2 ) |
128 | THUMB( mov lr, r3 ) | 129 | THUMB( mov lr, r3 ) |
129 | THUMB( bx r4 ) | 130 | THUMB( bx r4 ) |
130 | #else | ||
131 | @ load v:p, stack, return fn | ||
132 | ARM( ldmia r0!, {r1, sp, lr} ) | ||
133 | THUMB( ldmia r0!, {r1, r2, lr} ) | ||
134 | THUMB( mov sp, r2 ) | ||
135 | b cpu_do_resume | ||
136 | #endif | ||
137 | ENDPROC(cpu_resume) | 131 | ENDPROC(cpu_resume) |
138 | 132 | ||
139 | sleep_save_sp: | 133 | sleep_save_sp: |