When a cpu is stopped due to a panic or the debugger, it can be in virtually
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Jul 2005 20:21:31 +0000 (20:21 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 20 Jul 2005 20:21:31 +0000 (20:21 +0000)
commitbd8015cab2aa9df51711bf3c3b3439683c93c96e
tree989c6aa34c1cb4506985874ce20a7285986e31a7
parente8f15168985eb7e2cb094526305fdb201354fcc3
When a cpu is stopped due to a panic or the debugger, it can be in virtually
any state, including possibly holding a critical section.   IPIQ interrupts
must still be processed while we are in this state (even though we could be
racing IPIQ processing if we were interrupted at just the wrong time).  In
particular, dumping is not likely to work if a panic occurs on a cpu != 0
unless we process the IPIQ on the stopped cpus.  There are simply too many
interactions between cpus.

Interrupt threads are LWKT scheduled entities and will generally still not
work during a panic while dumping.  The dumping code expects this.  However,
call splz() anyway.

We may in the future have to allow certain threads to run while dumping.
For example, to allow dumping over the network.  There are various ways this
can be done, such as by masking gd_runqmask or flagging special threads to
be runnable while in a paniced or dumping state.
sys/i386/apic/apic_vector.s
sys/i386/isa/apic_vector.s
sys/kern/lwkt_thread.c
sys/platform/pc32/apic/apic_vector.s
sys/platform/pc32/isa/apic_vector.s
sys/sys/thread.h