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:
nwhitehorn 2011-06-23 16:34:41 +00:00
parent 594e41652d
commit 258f54d767
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