From: Russell King Date: Fri, 11 Jan 2008 12:23:58 +0000 (+0000) Subject: [ARM] pxa: don't rely on r2 being preserved over a function call X-Git-Tag: v2.6.24~36 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=3b1904d00a54d4d839a4c12dbc98a14dc4efdc95;p=linux-2.6-omap-h63xx.git [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 --- diff --git a/arch/arm/mach-pxa/sleep.S b/arch/arm/mach-pxa/sleep.S index aff71fec618..d0447723b73 100644 --- a/arch/arm/mach-pxa/sleep.S +++ b/arch/arm/mach-pxa/sleep.S @@ -43,11 +43,11 @@ pxa_cpu_save_cp: pxa_cpu_save_sp: @ preserve phys address of stack mov r0, sp - mov r2, lr + str lr, [sp, #-4]! bl sleep_phys_sp ldr r1, =sleep_save_sp str r0, [r1] - mov pc, r2 + ldr pc, [sp], #4 /* * pxa27x_cpu_suspend() @@ -270,5 +270,3 @@ resume_after_mmu: mar acc0, r2, r3 #endif ldmfd sp!, {r4 - r12, pc} @ return to caller - -