diff options
Diffstat (limited to 'arch/x86/kernel/cpu/intel_cacheinfo.c')
-rw-r--r-- | arch/x86/kernel/cpu/intel_cacheinfo.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/x86/kernel/cpu/intel_cacheinfo.c b/arch/x86/kernel/cpu/intel_cacheinfo.c index 35c7ebb57423..9921b01fe199 100644 --- a/arch/x86/kernel/cpu/intel_cacheinfo.c +++ b/arch/x86/kernel/cpu/intel_cacheinfo.c | |||
@@ -295,7 +295,7 @@ unsigned int __cpuinit init_intel_cacheinfo(struct cpuinfo_x86 *c) | |||
295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ | 295 | unsigned int new_l2 = 0, new_l3 = 0, i; /* Cache sizes from cpuid(4) */ |
296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; | 296 | unsigned int l2_id = 0, l3_id = 0, num_threads_sharing, index_msb; |
297 | #ifdef CONFIG_X86_HT | 297 | #ifdef CONFIG_X86_HT |
298 | unsigned int cpu = (c == &boot_cpu_data) ? 0 : (c - cpu_data); | 298 | unsigned int cpu = c->cpu_index; |
299 | #endif | 299 | #endif |
300 | 300 | ||
301 | if (c->cpuid_level > 3) { | 301 | if (c->cpuid_level > 3) { |
@@ -459,7 +459,7 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
459 | struct _cpuid4_info *this_leaf, *sibling_leaf; | 459 | struct _cpuid4_info *this_leaf, *sibling_leaf; |
460 | unsigned long num_threads_sharing; | 460 | unsigned long num_threads_sharing; |
461 | int index_msb, i; | 461 | int index_msb, i; |
462 | struct cpuinfo_x86 *c = cpu_data; | 462 | struct cpuinfo_x86 *c = &cpu_data(cpu); |
463 | 463 | ||
464 | this_leaf = CPUID4_INFO_IDX(cpu, index); | 464 | this_leaf = CPUID4_INFO_IDX(cpu, index); |
465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; | 465 | num_threads_sharing = 1 + this_leaf->eax.split.num_threads_sharing; |
@@ -470,8 +470,8 @@ static void __cpuinit cache_shared_cpu_map_setup(unsigned int cpu, int index) | |||
470 | index_msb = get_count_order(num_threads_sharing); | 470 | index_msb = get_count_order(num_threads_sharing); |
471 | 471 | ||
472 | for_each_online_cpu(i) { | 472 | for_each_online_cpu(i) { |
473 | if (c[i].apicid >> index_msb == | 473 | if (cpu_data(i).apicid >> index_msb == |
474 | c[cpu].apicid >> index_msb) { | 474 | c->apicid >> index_msb) { |
475 | cpu_set(i, this_leaf->shared_cpu_map); | 475 | cpu_set(i, this_leaf->shared_cpu_map); |
476 | if (i != cpu && cpuid4_info[i]) { | 476 | if (i != cpu && cpuid4_info[i]) { |
477 | sibling_leaf = CPUID4_INFO_IDX(i, index); | 477 | sibling_leaf = CPUID4_INFO_IDX(i, index); |