Commit 60ac133a authored by Nicolas Pitre's avatar Nicolas Pitre Committed by Russell King

[ARM] 2974/1: fix ARM710 swi bug workaround

Patch from Nicolas Pitre

Either no one is using an ARM710 with recent kernels, or all ARM710s
still in use are not afflicted by this swi bug.  Nevertheless, the code
to work around the ARM710 swi bug is itself currently buggy since it
uses r8 as a pointer to S_PC while in fact it holds the spsr content
these days. Fix that, and simplify the code as well.
Signed-off-by: default avatarNicolas Pitre <nico@cam.org>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent da64c6ee
...@@ -106,15 +106,10 @@ ENTRY(ret_from_fork) ...@@ -106,15 +106,10 @@ ENTRY(ret_from_fork)
.endm .endm
.Larm700bug: .Larm700bug:
ldr r0, [sp, #S_PSR] @ Get calling cpsr
sub lr, lr, #4
str lr, [r8]
msr spsr_cxsf, r0
ldmia sp, {r0 - lr}^ @ Get calling r0 - lr ldmia sp, {r0 - lr}^ @ Get calling r0 - lr
mov r0, r0 mov r0, r0
ldr lr, [sp, #S_PC] @ Get PC
add sp, sp, #S_FRAME_SIZE add sp, sp, #S_FRAME_SIZE
movs pc, lr subs pc, lr, #4
#else #else
.macro arm710_bug_check, instr, temp .macro arm710_bug_check, instr, temp
.endm .endm
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment