From 26bd1da8f2147731c66b2c1cc5225812e0b5b521 Mon Sep 17 00:00:00 2001 From: Yinghai Lu Date: Sat, 23 Feb 2008 21:48:42 -0800 Subject: [PATCH] --- yaml --- r: 88637 b: refs/heads/master c: 322850af8d93735f67b8ebf84bb1350639be3f34 h: refs/heads/master i: 88635: cc2d41eba029005f870d291f038cc03e50c342bf v: v3 --- [refs] | 2 +- trunk/arch/x86/kernel/apic_64.c | 12 +++++++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index b049c91a5614..45530e6a2109 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 513ad84bf60d96a6998bca10ed07c3d340449be8 +refs/heads/master: 322850af8d93735f67b8ebf84bb1350639be3f34 diff --git a/trunk/arch/x86/kernel/apic_64.c b/trunk/arch/x86/kernel/apic_64.c index d8d03e09dea2..7d8ffdaa0ab3 100644 --- a/trunk/arch/x86/kernel/apic_64.c +++ b/trunk/arch/x86/kernel/apic_64.c @@ -1180,9 +1180,19 @@ __cpuinit int apic_is_clustered_box(void) { int i, clusters, zeros; unsigned id; - u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; + u16 *bios_cpu_apicid; DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS); + /* + * there is not this kind of box with AMD CPU yet. + * Some AMD box with quadcore cpu and 8 sockets apicid + * will be [4, 0x23] or [8, 0x27] could be thought to + * have three apic_clusters. So go out early. + */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) + return 0; + + bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; bitmap_zero(clustermap, NUM_APIC_CLUSTERS); for (i = 0; i < NR_CPUS; i++) {