diff options
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
| -rw-r--r-- | arch/x86/kernel/cpu/amd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index e5b27d8f1b47..28e5f5956042 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
| @@ -258,13 +258,15 @@ static void __cpuinit amd_detect_cmp(struct cpuinfo_x86 *c) | |||
| 258 | { | 258 | { |
| 259 | #ifdef CONFIG_X86_HT | 259 | #ifdef CONFIG_X86_HT |
| 260 | unsigned bits; | 260 | unsigned bits; |
| 261 | int cpu = smp_processor_id(); | ||
| 261 | 262 | ||
| 262 | bits = c->x86_coreid_bits; | 263 | bits = c->x86_coreid_bits; |
| 263 | |||
| 264 | /* Low order bits define the core id (index of core in socket) */ | 264 | /* Low order bits define the core id (index of core in socket) */ |
| 265 | c->cpu_core_id = c->initial_apicid & ((1 << bits)-1); | 265 | c->cpu_core_id = c->initial_apicid & ((1 << bits)-1); |
| 266 | /* Convert the initial APIC ID into the socket ID */ | 266 | /* Convert the initial APIC ID into the socket ID */ |
| 267 | c->phys_proc_id = c->initial_apicid >> bits; | 267 | c->phys_proc_id = c->initial_apicid >> bits; |
| 268 | /* use socket ID also for last level cache */ | ||
| 269 | per_cpu(cpu_llc_id, cpu) = c->phys_proc_id; | ||
| 268 | #endif | 270 | #endif |
| 269 | } | 271 | } |
| 270 | 272 | ||
