Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 29 Oct 2004 21:04:14 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 63947 for review
Message-ID:  <200410292104.i9TL4EU4099447@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=63947

Change 63947 by jhb@jhb_slimer on 2004/10/29 21:04:05

	Fix the announce code to handle disabled CPUs.

Affected files ...

.. //depot/projects/smpng/sys/i386/i386/mp_machdep.c#71 edit

Differences ...

==== //depot/projects/smpng/sys/i386/i386/mp_machdep.c#71 (text+ko) ====

@@ -197,6 +197,7 @@
 struct cpu_info {
 	int	cpu_present:1;
 	int	cpu_bsp:1;
+	int	cpu_disabled:1;
 } static cpu_info[MAXCPU];
 static int cpu_apic_ids[MAXCPU];
 
@@ -419,9 +420,13 @@
 	/* List CPUs */
 	printf(" cpu0 (BSP): APIC ID: %2d\n", boot_cpu_id);
 	for (i = 1, x = 0; x < MAXCPU; x++) {
-		if (cpu_info[x].cpu_present && !cpu_info[x].cpu_bsp) {
-			KASSERT(i < mp_ncpus,
-			    ("mp_ncpus and actual cpus are out of whack"));
+		if (!cpu_info[x].cpu_present || cpu_info[x].cpu_bsp)
+			continue;
+		KASSERT(i < mp_ncpus,
+		    ("mp_ncpus and actual cpus are out of whack"));
+		if (cpu_info[x].cpu_disabled)
+			printf("  cpu (AP): APIC ID: %2d (disabled)\n", x);
+		else
 			printf(" cpu%d (AP): APIC ID: %2d\n", i++, x);
 		}
 	}
@@ -643,6 +648,7 @@
 
 		/* Don't use this CPU if it has been disabled by a tunable. */
 		if (resource_disabled("lapic", apic_id)) {
+			cpu_info[apic_id].cpu_disabled = 1;
 			mp_ncpus--;
 			continue;
 		}



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