svn commit: r206897 - head/sys/kern

Attilio Rao attilio at FreeBSD.org
Tue Apr 20 12:22:06 UTC 2010


Author: attilio
Date: Tue Apr 20 12:22:06 2010
New Revision: 206897
URL: http://svn.freebsd.org/changeset/base/206897

Log:
  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

Modified:
  head/sys/kern/kern_shutdown.c

Modified: head/sys/kern/kern_shutdown.c
==============================================================================
--- head/sys/kern/kern_shutdown.c	Tue Apr 20 12:07:16 2010	(r206896)
+++ head/sys/kern/kern_shutdown.c	Tue Apr 20 12:22:06 2010	(r206897)
@@ -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();


More information about the svn-src-all mailing list