Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jun 2012 18:47:26 +0000 (UTC)
From:      Mitsuru IWASAKI <iwasaki@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r236906 - head/sys/kern
Message-ID:  <201206111847.q5BIlQGC003561@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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++;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201206111847.q5BIlQGC003561>