summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_shutdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/kern_shutdown.c')
-rw-r--r--sys/kern/kern_shutdown.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 018bd8e..0f14623 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -513,10 +513,6 @@ shutdown_reset(void *junk, int howto)
/* NOTREACHED */ /* assuming reset worked */
}
-#ifdef SMP
-static u_int panic_cpu = NOCPU;
-#endif
-
/*
* Panic is called on unresolvable fatal errors. It prints "panic: mesg",
* and then reboots. If we are called twice, then we avoid trying to sync
@@ -525,6 +521,9 @@ static u_int panic_cpu = NOCPU;
void
panic(const char *fmt, ...)
{
+#ifdef SMP
+ static volatile u_int panic_cpu = NOCPU;
+#endif
struct thread *td = curthread;
int bootopt, newpanic;
va_list ap;
OpenPOWER on IntegriCloud