提交 3b1904d0 编写于 作者: R Russell King 提交者: Russell King

[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: NRussell King <rmk+kernel@arm.linux.org.uk>
上级 a7da60f4
...@@ -43,11 +43,11 @@ pxa_cpu_save_cp: ...@@ -43,11 +43,11 @@ pxa_cpu_save_cp:
pxa_cpu_save_sp: pxa_cpu_save_sp:
@ preserve phys address of stack @ preserve phys address of stack
mov r0, sp mov r0, sp
mov r2, lr str lr, [sp, #-4]!
bl sleep_phys_sp bl sleep_phys_sp
ldr r1, =sleep_save_sp ldr r1, =sleep_save_sp
str r0, [r1] str r0, [r1]
mov pc, r2 ldr pc, [sp], #4
/* /*
* pxa27x_cpu_suspend() * pxa27x_cpu_suspend()
...@@ -270,5 +270,3 @@ resume_after_mmu: ...@@ -270,5 +270,3 @@ resume_after_mmu:
mar acc0, r2, r3 mar acc0, r2, r3
#endif #endif
ldmfd sp!, {r4 - r12, pc} @ return to caller ldmfd sp!, {r4 - r12, pc} @ return to caller
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册