Fix an IPI messaging lockup which can occur while in DDB.
When entering DDB on a SMP system we must also enter a critical section
prior to stopping the other cpus. If we do not interrupts may generate
calls to sched_ithd() instead of just flagging the interrupt in ipending
and returning. This, in turn, may attempt to send an IPI to another
cpu. These IPIs will not be processed while the target cpu is stopped.
If the IPI FIFO then fills up the lwkt_send_ipiq*() function will hard-loop
and the system will lock-up.
Resizing the window a vkernel is running in while the vkernel is in DDB
exercises the bug. The bug is more easily demonstrated simply by sending
a stream of SIGWINCH signals via a while(1)/kill loop to the vkernel.
The bug is potentially an issue on all architectures so fix all
architectures.
Reported-by: Joe Talbott <josepht@cstone.net>
With-help-from: YONETANI Tomokazu <qhwt+dfly@les.ath.cx>