From owner-svn-src-all@FreeBSD.ORG Tue May 11 15:36:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 287A8106567A; Tue, 11 May 2010 15:36:17 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [69.147.83.44]) by mx1.freebsd.org (Postfix) with ESMTP id 1860E8FC24; Tue, 11 May 2010 15:36:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o4BFaGPk022635; Tue, 11 May 2010 15:36:16 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o4BFaGWv022633; Tue, 11 May 2010 15:36:16 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201005111536.o4BFaGWv022633@svn.freebsd.org> From: Attilio Rao Date: Tue, 11 May 2010 15:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r207921 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 May 2010 15:36:17 -0000 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);