From owner-svn-src-all@FreeBSD.ORG Tue Mar 3 17:34:10 2009 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44A4D1065677; Tue, 3 Mar 2009 17:34:10 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 321E68FC21; Tue, 3 Mar 2009 17:34:10 +0000 (UTC) (envelope-from dchagin@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n23HYAWT017059; Tue, 3 Mar 2009 17:34:10 GMT (envelope-from dchagin@svn.freebsd.org) Received: (from dchagin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n23HYATi017058; Tue, 3 Mar 2009 17:34:10 GMT (envelope-from dchagin@svn.freebsd.org) Message-Id: <200903031734.n23HYATi017058@svn.freebsd.org> From: Dmitry Chagin Date: Tue, 3 Mar 2009 17:34:10 +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: r189313 - 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, 03 Mar 2009 17:34:11 -0000 Author: dchagin Date: Tue Mar 3 17:34:09 2009 New Revision: 189313 URL: http://svn.freebsd.org/changeset/base/189313 Log: as suggested by jhb@, panic in case the ncpus == 0. it helps to catch bugs in the callers. Approved by: kib (mentor) MFC after: 5 days Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Tue Mar 3 17:16:26 2009 (r189312) +++ head/sys/kern/subr_smp.c Tue Mar 3 17:34:09 2009 (r189313) @@ -366,7 +366,7 @@ smp_rendezvous_cpus(cpumask_t map, if (((1 << i) & map) != 0 && !CPU_ABSENT(i)) ncpus++; if (ncpus == 0) - return; + panic("ncpus is 0 with map=0x%x", map); /* obtain rendezvous lock */ mtx_lock_spin(&smp_ipi_mtx);