diff options
Diffstat (limited to 'arch/x86/kernel/cpu/amd.c')
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 6062ce586b95..2f1fbd8150af 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -330,7 +330,6 @@ static void legacy_fixup_core_id(struct cpuinfo_x86 *c) | |||
330 | */ | 330 | */ |
331 | static void amd_get_topology(struct cpuinfo_x86 *c) | 331 | static void amd_get_topology(struct cpuinfo_x86 *c) |
332 | { | 332 | { |
333 | u8 node_id; | ||
334 | int cpu = smp_processor_id(); | 333 | int cpu = smp_processor_id(); |
335 | 334 | ||
336 | /* get information required for multi-node processors */ | 335 | /* get information required for multi-node processors */ |
@@ -340,7 +339,7 @@ static void amd_get_topology(struct cpuinfo_x86 *c) | |||
340 | 339 | ||
341 | cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); | 340 | cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); |
342 | 341 | ||
343 | node_id = ecx & 0xff; | 342 | c->cpu_die_id = ecx & 0xff; |
344 | 343 | ||
345 | if (c->x86 == 0x15) | 344 | if (c->x86 == 0x15) |
346 | c->cu_id = ebx & 0xff; | 345 | c->cu_id = ebx & 0xff; |
@@ -360,15 +359,15 @@ static void amd_get_topology(struct cpuinfo_x86 *c) | |||
360 | if (!err) | 359 | if (!err) |
361 | c->x86_coreid_bits = get_count_order(c->x86_max_cores); | 360 | c->x86_coreid_bits = get_count_order(c->x86_max_cores); |
362 | 361 | ||
363 | cacheinfo_amd_init_llc_id(c, cpu, node_id); | 362 | cacheinfo_amd_init_llc_id(c, cpu); |
364 | 363 | ||
365 | } else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) { | 364 | } else if (cpu_has(c, X86_FEATURE_NODEID_MSR)) { |
366 | u64 value; | 365 | u64 value; |
367 | 366 | ||
368 | rdmsrl(MSR_FAM10H_NODE_ID, value); | 367 | rdmsrl(MSR_FAM10H_NODE_ID, value); |
369 | node_id = value & 7; | 368 | c->cpu_die_id = value & 7; |
370 | 369 | ||
371 | per_cpu(cpu_llc_id, cpu) = node_id; | 370 | per_cpu(cpu_llc_id, cpu) = c->cpu_die_id; |
372 | } else | 371 | } else |
373 | return; | 372 | return; |
374 | 373 | ||
@@ -393,7 +392,7 @@ static void amd_detect_cmp(struct cpuinfo_x86 *c) | |||
393 | /* Convert the initial APIC ID into the socket ID */ | 392 | /* Convert the initial APIC ID into the socket ID */ |
394 | c->phys_proc_id = c->initial_apicid >> bits; | 393 | c->phys_proc_id = c->initial_apicid >> bits; |
395 | /* use socket ID also for last level cache */ | 394 | /* use socket ID also for last level cache */ |
396 | per_cpu(cpu_llc_id, cpu) = c->phys_proc_id; | 395 | per_cpu(cpu_llc_id, cpu) = c->cpu_die_id = c->phys_proc_id; |
397 | } | 396 | } |
398 | 397 | ||
399 | static void amd_detect_ppin(struct cpuinfo_x86 *c) | 398 | static void amd_detect_ppin(struct cpuinfo_x86 *c) |