From owner-svn-src-all@FreeBSD.ORG Mon Jun 11 18:47:27 2012 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 3CBE3106568A; Mon, 11 Jun 2012 18:47:27 +0000 (UTC) (envelope-from iwasaki@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 281538FC19; Mon, 11 Jun 2012 18:47:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5BIlRl5003563; Mon, 11 Jun 2012 18:47:27 GMT (envelope-from iwasaki@svn.freebsd.org) Received: (from iwasaki@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5BIlQGC003561; Mon, 11 Jun 2012 18:47:26 GMT (envelope-from iwasaki@svn.freebsd.org) Message-Id: <201206111847.q5BIlQGC003561@svn.freebsd.org> From: Mitsuru IWASAKI Date: Mon, 11 Jun 2012 18:47:26 +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: r236906 - 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: Mon, 11 Jun 2012 18:47:27 -0000 Author: iwasaki Date: Mon Jun 11 18:47:26 2012 New Revision: 236906 URL: http://svn.freebsd.org/changeset/base/236906 Log: Another fixe for r236772. - Adjust correct cpuset (stopped_cpus/suspended_cpus) for cpu_spinwait() in generic_stop_cpus(). Modified: head/sys/kern/subr_smp.c Modified: head/sys/kern/subr_smp.c ============================================================================== --- head/sys/kern/subr_smp.c Mon Jun 11 18:26:18 2012 (r236905) +++ head/sys/kern/subr_smp.c Mon Jun 11 18:47:26 2012 (r236906) @@ -208,6 +208,7 @@ generic_stop_cpus(cpuset_t map, u_int ty #endif static volatile u_int stopping_cpu = NOCPU; int i; + volatile cpuset_t *cpus; KASSERT( #if defined(__amd64__) || defined(__i386__) @@ -232,8 +233,15 @@ generic_stop_cpus(cpuset_t map, u_int ty /* send the stop IPI to all CPUs in map */ ipi_selected(map, type); +#if defined(__amd64__) || defined(__i386__) + if (type == IPI_SUSPEND) + cpus = &suspended_cpus; + else +#endif + cpus = &stopped_cpus; + i = 0; - while (!CPU_SUBSET(&stopped_cpus, &map)) { + while (!CPU_SUBSET(cpus, &map)) { /* spin */ cpu_spinwait(); i++;