freebsd-skq/sys/sun4v
John Baldwin 0108cce0a4 Adjust the order of operations in spinlock_enter() and spinlock_exit() to
work properly with single-stepping in a kernel debugger.  Specifically,
these routines have always disabled interrupts before increasing the nesting
count and restored the prior state of interrupts after decreasing the nesting
count to avoid problems with a nested interrupt not disabling interrupts
when acquiring a spin lock.  However, trap interrupts for single-stepping
can still occur even when interrupts are disabled.  Now the saved state of
interrupts is not saved in the thread until after interrupts have been
disabled and the nesting count has been increased.  Similarly, the saved
state from the thread cannot be read once the nesting count has been
decreased to zero.  To fix this, use temporary variables to store interrupt
state and shuffle it between the thread's MD area and the appropriate
registers.

In cooperation with:	bde
MFC after:     1 month
2010-11-05 13:42:58 +00:00
..
cddl
compile
conf Follow r213098, kernel POSIX semaphore module is no longer 2010-09-26 01:41:53 +00:00
include Just use the sparc64 version of this header rather than duplicating it. 2010-10-08 14:50:58 +00:00
mdesc This is a follow-up, cleaning-up commit about recent changes involving 2007-09-11 22:54:09 +00:00
sun4v Adjust the order of operations in spinlock_enter() and spinlock_exit() to 2010-11-05 13:42:58 +00:00