Skip to content

Commit

Permalink
x86/mce: Set bios_cmci_threshold for CMCI threshold
Browse files Browse the repository at this point in the history
zhaoxin inclusion
category: bugfix
CVE: NA

-----------------

In the Linux kernel, the CMCI threshold is set to 1 by default. This patch
prevents Linux from overwriting the CMCI threshold set by the bios. With
this patch, the CMCI threshold can be set through the BIOS, which can also
avoid CMCI storms, on Zhaoxin/Centaur CPUs.

Signed-off-by: leoliu-oc <[email protected]>
  • Loading branch information
leoliu-oc authored and opsiff committed Jun 15, 2024
1 parent 6e2eada commit 66015fc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/x86/kernel/cpu/mce/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1946,6 +1946,7 @@ static int __mcheck_cpu_apply_quirks(struct cpuinfo_x86 *c)
if (cfg->monarch_timeout < 0)
cfg->monarch_timeout = USEC_PER_SEC;
}
mca_cfg.bios_cmci_threshold = 1;
}

if (cfg->monarch_timeout < 0)
Expand Down

0 comments on commit 66015fc

Please sign in to comment.