summaryrefslogtreecommitdiffstats
path: root/sys/kern
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2010-04-20 12:22:06 +0000
committerattilio <attilio@FreeBSD.org>2010-04-20 12:22:06 +0000
commit6dda1433c86cda66eaf9707c7b94669836240a0e (patch)
treeaf0f7f954bfa9ead3d7248cc3bb495453133a790 /sys/kern
parent6e49a8c185015ee0a784f737876f6e7ea5934f8a (diff)
downloadFreeBSD-src-6dda1433c86cda66eaf9707c7b94669836240a0e.zip
FreeBSD-src-6dda1433c86cda66eaf9707c7b94669836240a0e.tar.gz
Fix compilation in the !SMP case.
Keep the interrupts disabled in order to avoid preemption problems. Reported by: tinderbox, b.f. <bf1783 at googlemail dot com> MFC: 2 weeks X-MFC: r206878
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_shutdown.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/kern_shutdown.c b/sys/kern/kern_shutdown.c
index 4b27d45..bd3c7aa 100644
--- a/sys/kern/kern_shutdown.c
+++ b/sys/kern/kern_shutdown.c
@@ -496,8 +496,14 @@ shutdown_reset(void *junk, int howto)
* generally, threads busy-waiting, with this spinlock held,
* and waiting for responses by threads on other CPUs
* (ie. smp_tlb_shootdown()).
+ *
+ * For the !SMP case it just needs to handle the former problem.
*/
+#ifdef SMP
mtx_lock_spin(&smp_ipi_mtx);
+#else
+ spinlock_enter();
+#endif
/* cpu_boot(howto); */ /* doesn't do anything at the moment */
cpu_reset();
OpenPOWER on IntegriCloud