summaryrefslogtreecommitdiffstats
path: root/arch/x86/kernel/cpu/mce/inject.c
diff options
context:
space:
mode:
authorYazen Ghannam <yazen.ghannam@amd.com>2020-11-09 21:06:57 +0000
committerBorislav Petkov <bp@suse.de>2020-11-19 11:43:17 +0100
commitdb970bd231c2264a062e0de4dcf4ead5e6669e7a (patch)
tree08f0a299d58b2051fa9b66aca5925d0273475e24 /arch/x86/kernel/cpu/mce/inject.c
parent028c221ed1904af9ac3c5162ee98f48966de6b3d (diff)
downloadlinux-db970bd231c2264a062e0de4dcf4ead5e6669e7a.tar.bz2
x86/CPU/AMD: Remove amd_get_nb_id()
The Last Level Cache ID is returned by amd_get_nb_id(). In practice, this value is the same as the AMD NodeId for callers of this function. The NodeId is saved in struct cpuinfo_x86.cpu_die_id. Replace calls to amd_get_nb_id() with the logical CPU's cpu_die_id and remove the function. Signed-off-by: Yazen Ghannam <yazen.ghannam@amd.com> Signed-off-by: Borislav Petkov <bp@suse.de> Link: https://lkml.kernel.org/r/20201109210659.754018-3-Yazen.Ghannam@amd.com
Diffstat (limited to 'arch/x86/kernel/cpu/mce/inject.c')
-rw-r--r--arch/x86/kernel/cpu/mce/inject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c
index 3a44346f2276..7b360731fc2d 100644
--- a/arch/x86/kernel/cpu/mce/inject.c
+++ b/arch/x86/kernel/cpu/mce/inject.c
@@ -522,8 +522,8 @@ static void do_inject(void)
if (boot_cpu_has(X86_FEATURE_AMD_DCM) &&
b == 4 &&
boot_cpu_data.x86 < 0x17) {
- toggle_nb_mca_mst_cpu(amd_get_nb_id(cpu));
- cpu = get_nbc_for_node(amd_get_nb_id(cpu));
+ toggle_nb_mca_mst_cpu(topology_die_id(cpu));
+ cpu = get_nbc_for_node(topology_die_id(cpu));
}
get_online_cpus();