]>
Commit | Line | Data |
---|---|---|
00e5a55c BS |
1 | From: Suresh Siddha <suresh.b.siddha@intel.com> |
2 | Subject: x86: use cpuid vector 0xb when available for detecting cpu topology | |
3 | References: fate #303948 and fate #303984 | |
4 | Patch-Mainline: queued for .28 | |
5 | Commit-ID: bbb65d2d365efe9951290e61678dcf81ec60add4 | |
6 | ||
7 | Signed-off-by: Thomas Renninger <trenn@suse.de> | |
8 | ||
9 | cpuid leaf 0xb provides extended topology enumeration. This interface provides | |
10 | the 32-bit x2APIC id of the logical processor and it also provides a new | |
11 | mechanism to detect SMT and core siblings (which provides increased | |
12 | addressability). | |
13 | ||
14 | Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com> | |
15 | Signed-off-by: Ingo Molnar <mingo@elte.hu> | |
16 | ||
17 | Automatically created from "patches.arch/x2APIC_PATCH_40_of_41_bbb65d2d365efe9951290e61678dcf81ec60add4" by xen-port-patches.py | |
18 | ||
19 | Index: head-2008-10-13/arch/x86/kernel/cpu/addon_cpuid_features.c | |
20 | =================================================================== | |
21 | --- head-2008-10-13.orig/arch/x86/kernel/cpu/addon_cpuid_features.c 2008-10-13 13:52:01.000000000 +0200 | |
22 | +++ head-2008-10-13/arch/x86/kernel/cpu/addon_cpuid_features.c 2008-10-13 15:49:03.000000000 +0200 | |
23 | @@ -69,7 +69,7 @@ void __cpuinit init_scattered_cpuid_feat | |
24 | */ | |
25 | void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | |
26 | { | |
27 | -#ifdef CONFIG_SMP | |
28 | +#if defined(CONFIG_SMP) && !defined(CONFIG_XEN) | |
29 | unsigned int eax, ebx, ecx, edx, sub_index; | |
30 | unsigned int ht_mask_width, core_plus_mask_width; | |
31 | unsigned int core_select_mask, core_level_siblings; | |
32 | Index: linux-2.6.26/include/asm-x86/mach-xen/asm/processor.h | |
33 | =================================================================== | |
34 | --- linux-2.6.26.orig/include/asm-x86/mach-xen/asm/processor.h | |
35 | +++ linux-2.6.26/include/asm-x86/mach-xen/asm/processor.h | |
36 | @@ -161,6 +161,7 @@ extern void init_scattered_cpuid_feature | |
37 | extern unsigned int init_intel_cacheinfo(struct cpuinfo_x86 *c); | |
38 | extern unsigned short num_cache_leaves; | |
39 | ||
40 | +extern void detect_extended_topology(struct cpuinfo_x86 *c); | |
41 | #if defined(CONFIG_X86_HT) || defined(CONFIG_X86_64) | |
42 | extern void detect_ht(struct cpuinfo_x86 *c); | |
43 | #else |