PERFORCE change 63831 for review

John Baldwin jhb at FreeBSD.org
Wed Oct 27 10:08:02 PDT 2004


http://perforce.freebsd.org/chv.cgi?CH=63831

Change 63831 by jhb at jhb_slimer on 2004/10/27 17:07:08

	Allow individual CPUs on i386 to be disabled via a hint.
	(hint.lapic.6.disabled=1 disables CPU with local APIC ID of 6.)

Affected files ...

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

Differences ...

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

@@ -635,9 +635,18 @@
 
 	/* start each AP */
 	for (cpu = 0, apic_id = 0; apic_id < MAXCPU; apic_id++) {
+
+		/* Ignore non-existent CPUs and the BSP. */
 		if (!cpu_info[apic_id].cpu_present ||
 		    cpu_info[apic_id].cpu_bsp)
 			continue;
+
+		/* Don't use this CPU if it has been disabled by a tunable. */
+		if (resource_disabled("lapic", apic_id)) {
+			mp_ncpus--;
+			continue;
+		}
+
 		cpu++;
 
 		/* save APIC ID for this logical ID */


More information about the p4-projects mailing list