Skip to content

Commit

Permalink
[ARM] 2974/1: fix ARM710 swi bug workaround
Browse files Browse the repository at this point in the history
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: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Nicolas Pitre authored and Russell King committed Oct 12, 2005
1 parent da64c6e commit 60ac133
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions arch/arm/kernel/entry-common.S
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,10 @@ ENTRY(ret_from_fork)
.endm

.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
mov r0, r0
ldr lr, [sp, #S_PC] @ Get PC
add sp, sp, #S_FRAME_SIZE
movs pc, lr
subs pc, lr, #4
#else
.macro arm710_bug_check, instr, temp
.endm
Expand Down

0 comments on commit 60ac133

Please sign in to comment.