svn commit: r207921 - head/sys/kern

Attilio Rao attilio at FreeBSD.org
Tue May 11 15:36:17 UTC 2010


Author: attilio
Date: Tue May 11 15:36:16 2010
New Revision: 207921
URL: http://svn.freebsd.org/changeset/base/207921

Log:
  Fix a hang introduced in r206878 for kernel compiled with SMP support but
  being not actual SMP and similar situations by always initializing the
  smp ipi mutex.
  
  Reported by:	marius
  MFC after:	3 days
  X-MFC:		r206878

Modified:
  head/sys/kern/subr_smp.c

Modified: head/sys/kern/subr_smp.c
==============================================================================
--- head/sys/kern/subr_smp.c	Tue May 11 15:32:21 2010	(r207920)
+++ head/sys/kern/subr_smp.c	Tue May 11 15:36:16 2010	(r207921)
@@ -137,6 +137,8 @@ static void
 mp_start(void *dummy)
 {
 
+	mtx_init(&smp_ipi_mtx, "smp rendezvous", NULL, MTX_SPIN);
+
 	/* Probe for MP hardware. */
 	if (smp_disabled != 0 || cpu_mp_probe() == 0) {
 		mp_ncpus = 1;
@@ -144,7 +146,6 @@ mp_start(void *dummy)
 		return;
 	}
 
-	mtx_init(&smp_ipi_mtx, "smp rendezvous", NULL, MTX_SPIN);
 	cpu_mp_start();
 	printf("FreeBSD/SMP: Multiprocessor System Detected: %d CPUs\n",
 	    mp_ncpus);


More information about the svn-src-head mailing list