diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2008-01-11 07:23:58 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2008-01-20 05:09:59 -0500 |
commit | 3b1904d00a54d4d839a4c12dbc98a14dc4efdc95 (patch) | |
tree | 02edcde7c2d7ec7c90dbf4a1cbcbff963515ff50 | |
parent | a7da60f41551abb3c520b03d42ec05dd7decfc7f (diff) |
[ARM] pxa: don't rely on r2 being preserved over a function call
r2 is not guaranteed to be preserved over a function call, so relying
on it to store the link register over the call to sleep_phys_sp() is
unreliable. Store the link register on the stack instead.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/mach-pxa/sleep.S | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index aff71fec618a..d0447723b73a 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S | |||
@@ -43,11 +43,11 @@ pxa_cpu_save_cp: | |||
43 | pxa_cpu_save_sp: | 43 | pxa_cpu_save_sp: |
44 | @ preserve phys address of stack | 44 | @ preserve phys address of stack |
45 | mov r0, sp | 45 | mov r0, sp |
46 | mov r2, lr | 46 | str lr, [sp, #-4]! |
47 | bl sleep_phys_sp | 47 | bl sleep_phys_sp |
48 | ldr r1, =sleep_save_sp | 48 | ldr r1, =sleep_save_sp |
49 | str r0, [r1] | 49 | str r0, [r1] |
50 | mov pc, r2 | 50 | ldr pc, [sp], #4 |
51 | 51 | ||
52 | /* | 52 | /* |
53 | * pxa27x_cpu_suspend() | 53 | * pxa27x_cpu_suspend() |
@@ -270,5 +270,3 @@ resume_after_mmu: | |||
270 | mar acc0, r2, r3 | 270 | mar acc0, r2, r3 |
271 | #endif | 271 | #endif |
272 | ldmfd sp!, {r4 - r12, pc} @ return to caller | 272 | ldmfd sp!, {r4 - r12, pc} @ return to caller |
273 | |||
274 | |||