Clear any outstanding atomic reservations when traps are taken. This fixes

some interesting bugs (mostly on SMP systems) with atomic operations
silently failing in interrupt heavy situations, especially when using
overflow pages.
This commit is contained in:
Nathan Whitehorn 2011-06-23 16:34:41 +00:00
parent ded49c2eae
commit 045aee08f3
2 changed files with 4 additions and 0 deletions

View file

@ -748,6 +748,8 @@ k_trap:
/* Call C interrupt dispatcher: */
trapagain:
addi %r3,%r1,8
addi %r4,%r1,-4 /* Clear any existing reservations */
stwcx. %r3,0,%r4
bl CNAME(powerpc_interrupt)
.globl CNAME(trapexit) /* backtrace code sentinel */
CNAME(trapexit):

View file

@ -508,6 +508,8 @@ trapagain:
lis %r3,tocbase@ha
ld %r2,tocbase@l(%r3)
addi %r3,%r1,48
addi %r4,%r1,-8 /* Clear any existing reservations */
stdcx. %r3,0,%r4
bl CNAME(powerpc_interrupt)
nop