diff options
author | Yinghai Lu <Yinghai.Lu@Sun.COM> | 2008-02-24 00:48:42 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-17 11:40:49 -0400 |
commit | 322850af8d93735f67b8ebf84bb1350639be3f34 (patch) | |
tree | 107a13e6d486d6d5f0791630c8701b100d9cfb92 /arch/x86/kernel/apic_64.c | |
parent | 513ad84bf60d96a6998bca10ed07c3d340449be8 (diff) |
x86: make amd quad core 8 socket system not be clustered_box, #2
quad core 8 socket system will have apic id lifting.the apic id range could
be [4, 0x23]. and apic_is_clustered_box will think that need to three clusters
and that is large than 2. So it is treated as clustered_box.
and will get
Marking TSC unstable due to TSCs unsynchronized
even the CPUs have X86_FEATURE_CONSTANT_TSC set.
this patch will check if the cpu is from AMD.
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/apic_64.c')
-rw-r--r-- | arch/x86/kernel/apic_64.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/arch/x86/kernel/apic_64.c b/arch/x86/kernel/apic_64.c index d8d03e09dea2..7d8ffdaa0ab3 100644 --- a/arch/x86/kernel/apic_64.c +++ b/arch/x86/kernel/apic_64.c | |||
@@ -1180,9 +1180,19 @@ __cpuinit int apic_is_clustered_box(void) | |||
1180 | { | 1180 | { |
1181 | int i, clusters, zeros; | 1181 | int i, clusters, zeros; |
1182 | unsigned id; | 1182 | unsigned id; |
1183 | u16 *bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; | 1183 | u16 *bios_cpu_apicid; |
1184 | DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS); | 1184 | DECLARE_BITMAP(clustermap, NUM_APIC_CLUSTERS); |
1185 | 1185 | ||
1186 | /* | ||
1187 | * there is not this kind of box with AMD CPU yet. | ||
1188 | * Some AMD box with quadcore cpu and 8 sockets apicid | ||
1189 | * will be [4, 0x23] or [8, 0x27] could be thought to | ||
1190 | * have three apic_clusters. So go out early. | ||
1191 | */ | ||
1192 | if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) | ||
1193 | return 0; | ||
1194 | |||
1195 | bios_cpu_apicid = x86_bios_cpu_apicid_early_ptr; | ||
1186 | bitmap_zero(clustermap, NUM_APIC_CLUSTERS); | 1196 | bitmap_zero(clustermap, NUM_APIC_CLUSTERS); |
1187 | 1197 | ||
1188 | for (i = 0; i < NR_CPUS; i++) { | 1198 | for (i = 0; i < NR_CPUS; i++) { |