Skip to content

Commit a33d331

Browse files
suryasaimadhuIngo Molnar
authored andcommitted
x86/CPU/AMD: Fix Bulldozer topology
The following commit: 8196dab ("x86/cpu: Get rid of compute_unit_id") ... broke the initial strategy for Bulldozer-based cores' topology, where we consider each thread of a compute unit a standalone core and not a HT or SMT thread. Revert to the firmware-supplied core_id numbering and do not make them thread siblings as we don't consider them for such even if they technically are, more or less. Reported-and-tested-by: Brice Goglin <[email protected]> Tested-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: <[email protected]> # v4.6+ Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Josh Poimboeuf <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Fixes: 8196dab ("x86/cpu: Get rid of compute_unit_id") Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
1 parent 159d372 commit a33d331

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

arch/x86/kernel/cpu/amd.c

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -309,15 +309,8 @@ static void amd_get_topology(struct cpuinfo_x86 *c)
309309

310310
/* get information required for multi-node processors */
311311
if (boot_cpu_has(X86_FEATURE_TOPOEXT)) {
312-
u32 eax, ebx, ecx, edx;
313312

314-
cpuid(0x8000001e, &eax, &ebx, &ecx, &edx);
315-
node_id = ecx & 7;
316-
317-
/* get compute unit information */
318-
smp_num_siblings = ((ebx >> 8) & 3) + 1;
319-
c->x86_max_cores /= smp_num_siblings;
320-
c->cpu_core_id = ebx & 0xff;
313+
node_id = cpuid_ecx(0x8000001e) & 7;
321314

322315
/*
323316
* We may have multiple LLCs if L3 caches exist, so check if we

0 commit comments

Comments
 (0)