diff options
author | Andi Kleen <ak@suse.de> | 2005-09-12 18:49:24 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-12 19:49:55 +0200 |
commit | 70556463487f33bc6728a7596b97f86b811aad22 (patch) | |
tree | ce49b46bd6cd2089c82b5a1cea698bf5c6cfd1cc /arch/x86_64/kernel/genapic.c | |
parent | [PATCH] x86-64: Remove code for outdated APICs (diff) | |
download | linux-70556463487f33bc6728a7596b97f86b811aad22.tar.xz linux-70556463487f33bc6728a7596b97f86b811aad22.zip |
[PATCH] x86-64: Use largest APIC number, not number of CPUs to decide on physflat mode
Handles case where BIOS gives CPUs very large APIC numbers correctly.
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/genapic.c')
-rw-r--r-- | arch/x86_64/kernel/genapic.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/x86_64/kernel/genapic.c b/arch/x86_64/kernel/genapic.c index b1c144f73149..f3159a496e39 100644 --- a/arch/x86_64/kernel/genapic.c +++ b/arch/x86_64/kernel/genapic.c @@ -45,7 +45,7 @@ void __init clustered_apic_check(void) u8 clusters, max_cluster; u8 id; u8 cluster_cnt[NUM_APIC_CLUSTERS]; - int num_cpus = 0; + int max_apic = 0; #if defined(CONFIG_ACPI) /* @@ -64,7 +64,8 @@ void __init clustered_apic_check(void) id = bios_cpu_apicid[i]; if (id == BAD_APICID) continue; - num_cpus++; + if (id > max_apic) + max_apic = id; cluster_cnt[APIC_CLUSTERID(id)]++; } @@ -79,7 +80,7 @@ void __init clustered_apic_check(void) we have ACPI platform support for CPU hotplug we should detect hotplug capablity from ACPI tables and only do this when really needed. -AK */ - if (num_cpus <= 8) + if (max_apic <= 8) genapic = &apic_flat; #endif goto print; |