aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/apic_32.c
diff options
context:
space:
mode:
authorYinghai Lu <yhlu.kernel@gmail.com>2008-06-08 21:29:22 -0400
committerIngo Molnar <mingo@elte.hu>2008-06-10 05:32:09 -0400
commite0da33646826b66ef933d47ea2fb7a693fd849bf (patch)
tree398d86b96531e574c4710ea1538806b7e0ae0fef /arch/x86/kernel/apic_32.c
parentc3ff01672a23fabb40d4b80ff25a845582fd07c2 (diff)
x86: introduce max_physical_apicid for bigsmp switching
a multi-socket test-system with 3 or 4 ioapics, when 4 dualcore cpus or 2 quadcore cpus installed, needs to switch to bigsmp or physflat. CPU apic id is [4,11] instead of [0,7], and we need to check max apic id instead of cpu numbers. also add check for 32 bit when acpi is not compiled in or acpi=off. Signed-off-by: Yinghai Lu <yhlu.kernel@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_32.c')
-rw-r--r--arch/x86/kernel/apic_32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic_32.c b/arch/x86/kernel/apic_32.c
index c304759f0834..954d67931a50 100644
--- a/arch/x86/kernel/apic_32.c
+++ b/arch/x86/kernel/apic_32.c
@@ -1518,6 +1518,9 @@ void __cpuinit generic_processor_info(int apicid, int version)
1518 */ 1518 */
1519 cpu = 0; 1519 cpu = 0;
1520 1520
1521 if (apicid > max_physical_apicid)
1522 max_physical_apicid = apicid;
1523
1521 /* 1524 /*
1522 * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y 1525 * Would be preferable to switch to bigsmp when CONFIG_HOTPLUG_CPU=y
1523 * but we need to work other dependencies like SMP_SUSPEND etc 1526 * but we need to work other dependencies like SMP_SUSPEND etc
@@ -1525,7 +1528,7 @@ void __cpuinit generic_processor_info(int apicid, int version)
1525 * if (CPU_HOTPLUG_ENABLED || num_processors > 8) 1528 * if (CPU_HOTPLUG_ENABLED || num_processors > 8)
1526 * - Ashok Raj <ashok.raj@intel.com> 1529 * - Ashok Raj <ashok.raj@intel.com>
1527 */ 1530 */
1528 if (num_processors > 8) { 1531 if (max_physical_apicid >= 8) {
1529 switch (boot_cpu_data.x86_vendor) { 1532 switch (boot_cpu_data.x86_vendor) {
1530 case X86_VENDOR_INTEL: 1533 case X86_VENDOR_INTEL:
1531 if (!APIC_XAPIC(version)) { 1534 if (!APIC_XAPIC(version)) {