diff options
-rw-r--r-- | arch/x86/kernel/cpu/addon_cpuid_features.c | 8 | ||||
-rw-r--r-- | arch/x86/kernel/cpu/intel.c | 8 |
2 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/addon_cpuid_features.c b/arch/x86/kernel/cpu/addon_cpuid_features.c index ef8f831af823..2cf23634b6d9 100644 --- a/arch/x86/kernel/cpu/addon_cpuid_features.c +++ b/arch/x86/kernel/cpu/addon_cpuid_features.c | |||
@@ -120,9 +120,17 @@ void __cpuinit detect_extended_topology(struct cpuinfo_x86 *c) | |||
120 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, ht_mask_width) | 120 | c->cpu_core_id = phys_pkg_id(c->initial_apicid, ht_mask_width) |
121 | & core_select_mask; | 121 | & core_select_mask; |
122 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, core_plus_mask_width); | 122 | c->phys_proc_id = phys_pkg_id(c->initial_apicid, core_plus_mask_width); |
123 | /* | ||
124 | * Reinit the apicid, now that we have extended initial_apicid. | ||
125 | */ | ||
126 | c->apicid = phys_pkg_id(c->initial_apicid, 0); | ||
123 | #else | 127 | #else |
124 | c->cpu_core_id = phys_pkg_id(ht_mask_width) & core_select_mask; | 128 | c->cpu_core_id = phys_pkg_id(ht_mask_width) & core_select_mask; |
125 | c->phys_proc_id = phys_pkg_id(core_plus_mask_width); | 129 | c->phys_proc_id = phys_pkg_id(core_plus_mask_width); |
130 | /* | ||
131 | * Reinit the apicid, now that we have extended initial_apicid. | ||
132 | */ | ||
133 | c->apicid = phys_pkg_id(0); | ||
126 | #endif | 134 | #endif |
127 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); | 135 | c->x86_max_cores = (core_level_siblings / smp_num_siblings); |
128 | 136 | ||
diff --git a/arch/x86/kernel/cpu/intel.c b/arch/x86/kernel/cpu/intel.c index caec59437a22..b21c37c060a2 100644 --- a/arch/x86/kernel/cpu/intel.c +++ b/arch/x86/kernel/cpu/intel.c | |||
@@ -252,6 +252,13 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
252 | 252 | ||
253 | intel_workarounds(c); | 253 | intel_workarounds(c); |
254 | 254 | ||
255 | /* | ||
256 | * Detect the extended topology information if available. This | ||
257 | * will reinitialise the initial_apicid which will be used | ||
258 | * in init_intel_cacheinfo() | ||
259 | */ | ||
260 | detect_extended_topology(c); | ||
261 | |||
255 | l2 = init_intel_cacheinfo(c); | 262 | l2 = init_intel_cacheinfo(c); |
256 | if (c->cpuid_level > 9) { | 263 | if (c->cpuid_level > 9) { |
257 | unsigned eax = cpuid_eax(10); | 264 | unsigned eax = cpuid_eax(10); |
@@ -323,7 +330,6 @@ static void __cpuinit init_intel(struct cpuinfo_x86 *c) | |||
323 | 330 | ||
324 | #endif | 331 | #endif |
325 | 332 | ||
326 | detect_extended_topology(c); | ||
327 | if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) { | 333 | if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) { |
328 | /* | 334 | /* |
329 | * let's use the legacy cpuid vector 0x1 and 0x4 for topology | 335 | * let's use the legacy cpuid vector 0x1 and 0x4 for topology |