Skip to content

Commit 13e8582

Browse files
David WangKAGA-KOKO
authored andcommitted
x86/MCE: Enable MCE broadcasting on new Centaur CPUs
Newer Centaur multi-core CPUs also support MCE broadcasting to all cores. Add a Centaur-specific init function setting that up. [ bp: - make mce_centaur_feature_init() static - flip check to do the f/m/s first for better readability - touch up text ] Signed-off-by: David Wang <[email protected]> Signed-off-by: Borislav Petkov <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: [email protected] Cc: [email protected] Cc: Greg KH <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: Tony Luck <[email protected]> Cc: [email protected] Cc: linux-edac <[email protected]> Link: http://lkml.kernel.org/r/[email protected]
1 parent ee946c3 commit 13e8582

File tree

1 file changed

+18
-0
lines changed
  • arch/x86/kernel/cpu/mcheck

1 file changed

+18
-0
lines changed

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

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1727,6 +1727,21 @@ static void __mcheck_cpu_init_early(struct cpuinfo_x86 *c)
17271727
}
17281728
}
17291729

1730+
static void mce_centaur_feature_init(struct cpuinfo_x86 *c)
1731+
{
1732+
struct mca_config *cfg = &mca_cfg;
1733+
1734+
/*
1735+
* All newer Centaur CPUs support MCE broadcasting. Enable
1736+
* synchronization with a one second timeout.
1737+
*/
1738+
if ((c->x86 == 6 && c->x86_model == 0xf && c->x86_stepping >= 0xe) ||
1739+
c->x86 > 6) {
1740+
if (cfg->monarch_timeout < 0)
1741+
cfg->monarch_timeout = USEC_PER_SEC;
1742+
}
1743+
}
1744+
17301745
static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
17311746
{
17321747
switch (c->x86_vendor) {
@@ -1739,6 +1754,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
17391754
mce_amd_feature_init(c);
17401755
break;
17411756
}
1757+
case X86_VENDOR_CENTAUR:
1758+
mce_centaur_feature_init(c);
1759+
break;
17421760

17431761
default:
17441762
break;

0 commit comments

Comments
 (0)