Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 May 2011 14:57:20 +0000 (UTC)
From:      Attilio Rao <attilio@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r221838 - projects/largeSMP/sys/ia64/ia64
Message-ID:  <201105131457.p4DEvKxM074041@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: attilio
Date: Fri May 13 14:57:20 2011
New Revision: 221838
URL: http://svn.freebsd.org/changeset/base/221838

Log:
  Fix remaining bits that actually weren't converted by mistake.
  
  Reported by:	sbruno

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

Modified: projects/largeSMP/sys/ia64/ia64/mp_machdep.c
==============================================================================
--- projects/largeSMP/sys/ia64/ia64/mp_machdep.c	Fri May 13 14:33:45 2011	(r221837)
+++ projects/largeSMP/sys/ia64/ia64/mp_machdep.c	Fri May 13 14:57:20 2011	(r221838)
@@ -286,7 +286,7 @@ cpu_mp_add(u_int acpi_id, u_int id, u_in
 	cpuid = (IA64_LID_GET_SAPIC_ID(ia64_get_lid()) == sapic_id)
 	    ? 0 : smp_cpus++;
 
-	KASSERT((all_cpus & (1UL << cpuid)) == 0,
+	KASSERT(!CPU_ISSET(cpuid, &all_cpus),
 	    ("%s: cpu%d already in CPU map", __func__, acpi_id));
 
 	if (cpuid != 0) {
@@ -300,7 +300,7 @@ cpu_mp_add(u_int acpi_id, u_int id, u_in
 	pc->pc_acpi_id = acpi_id;
 	pc->pc_md.lid = IA64_LID_SET_SAPIC_ID(sapic_id);
 
-	all_cpus |= (1UL << pc->pc_cpuid);
+	CPU_SET(pc->pc_cpuid, &all_cpus);
 }
 
 void
@@ -359,7 +359,8 @@ cpu_mp_start()
 
 	SLIST_FOREACH(pc, &cpuhead, pc_allcpu) {
 		pc->pc_md.current_pmap = kernel_pmap;
-		pc->pc_other_cpus = all_cpus & ~pc->pc_cpumask;
+		pc->pc_other_cpus = all_cpus;
+		CPU_NAND(&pc->pc_other_cpus, &pc->pc_cpumask);
 		/* The BSP is obviously running already. */
 		if (pc->pc_cpuid == 0) {
 			pc->pc_md.awake = 1;



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