Author: nwhitehorn
Date: Thu Jun 23 16:34:41 2011
New Revision: 223479
URL: http://svn.freebsd.org/changeset/base/223479
Log:
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.
Modified:
head/sys/powerpc/aim/trap_subr32.S
head/sys/powerpc/aim/trap_subr64.S
Modified: head/sys/powerpc/aim/trap_subr32.S
==============================================================================
--- head/sys/powerpc/aim/trap_subr32.S Thu Jun 23 16:21:43 2011
(r223478)
+++ head/sys/powerpc/aim/trap_subr32.S Thu Jun 23 16:34:41 2011
(r223479)
@@ -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):
Modified: head/sys/powerpc/aim/trap_subr64.S
==============================================================================
--- head/sys/powerpc/aim/trap_subr64.S Thu Jun 23 16:21:43 2011
(r223478)
+++ head/sys/powerpc/aim/trap_subr64.S Thu Jun 23 16:34:41 2011
(r223479)
@@ -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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"