Skip to content

Commit 1f52b0a

Browse files
yghannamsuryasaimadhu
authored andcommitted
x86/MCE/AMD: Allow thresholding interface updates after init
Changes to the AMD Thresholding sysfs code prevents sysfs writes from updating the underlying registers once CPU init is completed, i.e. "threshold_banks" is set. Allow the registers to be updated if the thresholding interface is already initialized or if in the init path. Use the "set_lvt_off" value to indicate if running in the init path, since this value is only set during init. Fixes: a037f3c ("x86/mce/amd: Make threshold bank setting hotplug robust") Signed-off-by: Yazen Ghannam <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Cc: <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent e783362 commit 1f52b0a

File tree

1 file changed

+1
-1
lines changed
  • arch/x86/kernel/cpu/mce

1 file changed

+1
-1
lines changed

arch/x86/kernel/cpu/mce/amd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ static void threshold_restart_bank(void *_tr)
423423
u32 hi, lo;
424424

425425
/* sysfs write might race against an offline operation */
426-
if (this_cpu_read(threshold_banks))
426+
if (!this_cpu_read(threshold_banks) && !tr->set_lvt_off)
427427
return;
428428

429429
rdmsr(tr->b->address, lo, hi);

0 commit comments

Comments
 (0)