79afd37295
doesn't do it. This fixes all known causes of "Context switches not allowed in the debugger" in mi_switch(). The main cause was trap_fatal() calling kdb_trap() with interrupts enabled. Switching to ithreads for interrupt handling then made fatal traps more fatal and harder to debug. The problem was limited in -current because most interrupt handlers are blocked by Giant, but it occurred almost deterministically for me because my clock interrupt handlers are non-fast and not blocked by Giant.