diff options
author | Borislav Petkov <bp@suse.de> | 2017-01-05 04:26:38 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-19 14:18:01 -0500 |
commit | 99ff99b830c1d70d0c6ec50c64588d9bd8bd5d05 (patch) | |
tree | faab001f4c6f6d5506410a71e10a5a50a56febb6 | |
parent | bd7e769457f964b0bb857e599fb0a914e0c05a3a (diff) |
x86/CPU/AMD: Fix Bulldozer topology
commit a33d331761bc5dd330499ca5ceceb67f0640a8e6 upstream.
The following commit:
8196dab4fc15 ("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 <Brice.Goglin@inria.fr>
Tested-by: Yazen Ghannam <yazen.ghannam@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Brian Gerst <brgerst@gmail.com>
Cc: Denys Vlasenko <dvlasenk@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Fixes: 8196dab4fc15 ("x86/cpu: Get rid of compute_unit_id")
Link: http://lkml.kernel.org/r/20170105092638.5247-1-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/x86/kernel/cpu/amd.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 71cae73a5076..1d3167269a67 100644 --- a/arch/x86/kernel/cpu/amd.c +++ b/arch/x86/kernel/cpu/amd.c | |||
@@ -309,15 +309,8 @@ static void amd_get_topology(struct cpuinfo_x86 *c) | |||
309 | 309 | ||
310 | /* get information required for multi-node processors */ | 310 | /* get information required for multi-node processors */ |
311 | if (boot_cpu_has(X86_FEATURE_TOPOEXT)) { | 311 | if (boot_cpu_has(X86_FEATURE_TOPOEXT)) { |
312 | u32 eax, ebx, ecx, edx; | ||
313 | 312 | ||
314 | cpuid(0x8000001e, &eax, &ebx, &ecx, &edx); | 313 | node_id = cpuid_ecx(0x8000001e) & 7; |
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; | ||
321 | 314 | ||
322 | /* | 315 | /* |
323 | * We may have multiple LLCs if L3 caches exist, so check if we | 316 | * We may have multiple LLCs if L3 caches exist, so check if we |