]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/topology: Fix AMD core count
authorPeter Zijlstra <peterz@infradead.org>
Fri, 25 Mar 2016 14:52:34 +0000 (15:52 +0100)
committerBrian Maly <brian.maly@oracle.com>
Tue, 13 Nov 2018 19:08:53 +0000 (14:08 -0500)
commit43ec3737a9b1333b25bc15aa088f162e0152537d
treef627021f567cddb2775209414fb36230b21ba72e
parent3809787220380270789bad460e16afed54b90f87
x86/topology: Fix AMD core count

It turns out AMD gets x86_max_cores wrong when there are compute
units.

The issue is that Linux assumes:

nr_logical_cpus = nr_cores * nr_siblings

But AMD reports its CU unit as 2 cores, but then sets num_smp_siblings
to 2 as well.

Boris: fixup ras/mce_amd_inj.c too, to compute the Node Base Core
properly, according to the new nomenclature.

Fixes: 1f12e32f4cd5 ("x86/topology: Create logical package id")
Reported-by: Xiong Zhou <jencce.kernel@gmail.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: Andreas Herrmann <aherrmann@suse.com>
Cc: Andy Lutomirski <luto@kernel.org>
Link: http://lkml.kernel.org/r/20160317095220.GO6344@twins.programming.kicks-ass.net
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
(cherry picked from commit ee6825c80e870fff1a370c718ec77022ade0889b)

Orabug: 28783929

Signed-off-by: Mihai Carabas <mihai.carabas@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/kernel/cpu/amd.c
arch/x86/ras/mce_amd_inj.c
amd.c: contextual
mce_amd_inj.c: does not exists

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/include/asm/smp.h
arch/x86/kernel/cpu/amd.c