svn commit: r236906 - head/sys/kern
Mitsuru IWASAKI
iwasaki at FreeBSD.org
Mon Jun 11 18:47:27 UTC 2012
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++;
More information about the svn-src-head
mailing list