diff options
author | jhb <jhb@FreeBSD.org> | 2001-04-17 04:18:08 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2001-04-17 04:18:08 +0000 |
commit | 82848b046f3ceba1d796ce044c2df7fc6751b0a8 (patch) | |
tree | b24d73d402dafba57539f1a615d5b5e5fb09b9e6 /sys/powerpc | |
parent | d16229755ce4eb76c4fc82062166cc254736985c (diff) | |
download | FreeBSD-src-82848b046f3ceba1d796ce044c2df7fc6751b0a8.zip FreeBSD-src-82848b046f3ceba1d796ce044c2df7fc6751b0a8.tar.gz |
Blow away the panic mutex in favor of using a single atomic_cmpset() on a
panic_cpu shared variable. I used a simple atomic operation here instead
of a spin lock as it seemed to be excessive overhead. Also, this can avoid
recursive panics if, for example, witness is broken.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/powerpc/mp_machdep.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c index 8ca5b04..e8c65f3 100644 --- a/sys/powerpc/powerpc/mp_machdep.c +++ b/sys/powerpc/powerpc/mp_machdep.c @@ -232,15 +232,11 @@ globaldata_find(int cpuno) /* lock around the MP rendezvous */ static struct mtx smp_rv_mtx; -/* only 1 CPU can panic at a time :) */ -struct mtx panic_mtx; - static void init_locks(void) { mtx_init(&smp_rv_mtx, "smp rendezvous", MTX_SPIN); - mtx_init(&panic_mtx, "panic", MTX_DEF); } void |