summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_smp.c
diff options
context:
space:
mode:
authorattilio <attilio@FreeBSD.org>2010-05-11 15:36:16 +0000
committerattilio <attilio@FreeBSD.org>2010-05-11 15:36:16 +0000
commit31c196b3b94d81c997db90b6e80a55ceb02cb044 (patch)
treeb016c986f9bb80bcdc8429caf0a5fc2ce3839f08 /sys/kern/subr_smp.c
parent766963d6798ac8eadcde71348dcfa49a08bb46f0 (diff)
downloadFreeBSD-src-31c196b3b94d81c997db90b6e80a55ceb02cb044.zip
FreeBSD-src-31c196b3b94d81c997db90b6e80a55ceb02cb044.tar.gz
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
Diffstat (limited to 'sys/kern/subr_smp.c')
-rw-r--r--sys/kern/subr_smp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/subr_smp.c b/sys/kern/subr_smp.c
index f226e3a..fb19b0e 100644
--- a/sys/kern/subr_smp.c
+++ b/sys/kern/subr_smp.c
@@ -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);
OpenPOWER on IntegriCloud