MPSAFE TTY - Refactor kprintf()'s spinlock, shutdown, move cons_spin
authorMatthew Dillon <dillon@apollo.backplane.com>
Sun, 29 Aug 2010 16:36:53 +0000 (09:36 -0700)
committerMatthew Dillon <dillon@apollo.backplane.com>
Sun, 29 Aug 2010 16:36:53 +0000 (09:36 -0700)
commit5fddbda2ad4306c54ebfde04cf94f0a83f54ad56
tree379215438d37992d1fe076f258b2a498c8f5f18d
parentbce291d6c14a7a1b10cbd4859c0cad5cab0a2180
MPSAFE TTY - Refactor kprintf()'s spinlock, shutdown, move cons_spin

* Adjust panic assertions to reduce reentrant panics.

* Redo the shutdown code to properly interlock panic_cpu_gd

* Move cons_lock into subr_prf.c and use a normal spinlock instead of
  a deprecated (w/interrupt disablement) spinlock.

  Adjust kvcprintf() when used with kputchar() to acquire cons_spin
  only if the current cpu is not the currently panicing cpu.

  Adjust kvcprintf() when used with kputchar() to acquire a hard
  critical section.
18 files changed:
sys/bus/cam/scsi/scsi_low.c
sys/ddb/db_output.c
sys/kern/kern_lock.c
sys/kern/kern_shutdown.c
sys/kern/lwkt_thread.c
sys/kern/lwkt_token.c
sys/kern/subr_prf.c
sys/platform/pc32/i386/machdep.c
sys/platform/pc32/i386/spinlock.s
sys/platform/pc32/i386/userconfig.c
sys/platform/pc32/include/lock.h
sys/platform/pc64/include/lock.h
sys/platform/pc64/x86_64/console.c
sys/platform/pc64/x86_64/machdep.c
sys/platform/pc64/x86_64/spinlock.s
sys/platform/vkernel/platform/console.c
sys/platform/vkernel64/platform/console.c
sys/sys/systm.h