svn commit: r221932 - projects/largeSMP/sys/sparc64/sparc64

Marius Strobl marius at FreeBSD.org
Sat May 14 23:20:14 UTC 2011


Author: marius
Date: Sat May 14 23:20:14 2011
New Revision: 221932
URL: http://svn.freebsd.org/changeset/base/221932

Log:
  Fix yet another inversion in the logic by applying the x86 version of this,
  which avoids CPU_EMPTY() in the first place.
  Do I get a beer or something for every inversion I find?

Modified:
  projects/largeSMP/sys/sparc64/sparc64/mp_machdep.c

Modified: projects/largeSMP/sys/sparc64/sparc64/mp_machdep.c
==============================================================================
--- projects/largeSMP/sys/sparc64/sparc64/mp_machdep.c	Sat May 14 22:15:38 2011	(r221931)
+++ projects/largeSMP/sys/sparc64/sparc64/mp_machdep.c	Sat May 14 23:20:14 2011	(r221932)
@@ -573,8 +573,8 @@ spitfire_ipi_selected(cpuset_t cpus, u_l
 {
 	u_int cpu;
 
-	while (CPU_EMPTY(&cpus)) {
-		cpu = cpusetobj_ffs(&cpus) - 1;
+	while ((cpu = cpusetobj_ffs(&cpus)) != 0) {
+		cpu--;
 		CPU_CLR(cpu, &cpus);
 		spitfire_ipi_single(cpu, d0, d1, d2);
 	}


More information about the svn-src-projects mailing list