diff options
Diffstat (limited to 'arch/x86/kernel/cpu/mce/inject.c')
| -rw-r--r-- | arch/x86/kernel/cpu/mce/inject.c | 8 | 
1 files changed, 3 insertions, 5 deletions
diff --git a/arch/x86/kernel/cpu/mce/inject.c b/arch/x86/kernel/cpu/mce/inject.c index 72f0695c3dc1..94953d749475 100644 --- a/arch/x86/kernel/cpu/mce/inject.c +++ b/arch/x86/kernel/cpu/mce/inject.c @@ -430,11 +430,9 @@ static void trigger_thr_int(void *info)  static u32 get_nbc_for_node(int node_id)  { -	struct cpuinfo_x86 *c = &boot_cpu_data;  	u32 cores_per_node; -	cores_per_node = (c->x86_max_cores * smp_num_siblings) / amd_get_nodes_per_socket(); - +	cores_per_node = topology_num_threads_per_package() / topology_amd_nodes_per_pkg();  	return cores_per_node * node_id;  } @@ -543,8 +541,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(topology_die_id(cpu)); -		cpu = get_nbc_for_node(topology_die_id(cpu)); +		toggle_nb_mca_mst_cpu(topology_amd_node_id(cpu)); +		cpu = get_nbc_for_node(topology_amd_node_id(cpu));  	}  	cpus_read_lock();  |