Skip to content

Commit d7ac083

Browse files
Avadhut Naikbp3tk0v
authored andcommitted
x86/mce: Do not clear bank's poll bit in mce_poll_banks on AMD SMCA systems
Currently, when a CMCI storm detected on a Machine Check bank, subsides, the bank's corresponding bit in the mce_poll_banks per-CPU variable is cleared unconditionally by cmci_storm_end(). On AMD SMCA systems, this essentially disables polling on that particular bank on that CPU. Consequently, any subsequent correctable errors or storms will not be logged. Since AMD SMCA systems allow banks to be managed by both polling and interrupts, the polling banks bitmap for a CPU, i.e., mce_poll_banks, should not be modified when a storm subsides. Fixes: 7eae17c ("x86/mce: Add per-bank CMCI storm mitigation") Signed-off-by: Avadhut Naik <avadhut.naik@amd.com> Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de> Cc: stable@vger.kernel.org Link: https://patch.msgid.link/20251121190542.2447913-2-avadhut.naik@amd.com
1 parent 821f5fe commit d7ac083

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ void cmci_storm_end(unsigned int bank)
9898
{
9999
struct mca_storm_desc *storm = this_cpu_ptr(&storm_desc);
100100

101-
__clear_bit(bank, this_cpu_ptr(mce_poll_banks));
101+
if (!mce_flags.amd_threshold)
102+
__clear_bit(bank, this_cpu_ptr(mce_poll_banks));
102103
storm->banks[bank].history = 0;
103104
storm->banks[bank].in_storm_mode = false;
104105

0 commit comments

Comments
 (0)