Merge branch 'ras/urgent' into ras/core
authorThomas Gleixner <tglx@linutronix.de>
Sat, 19 May 2018 13:20:49 +0000 (15:20 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 19 May 2018 13:20:49 +0000 (15:20 +0200)
Pick up urgent fix as pending patch depends on it.

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

index 475cb4f5f14fac3e2b4579b9ee1bec3948708bbc..c805a06e14c388bc9e46cd66bf11a00b1c6f742d 100644 (file)
@@ -48,7 +48,7 @@ static struct dentry *dfs_inj;
 
 static u8 n_banks;
 
-#define MAX_FLAG_OPT_SIZE      3
+#define MAX_FLAG_OPT_SIZE      4
 #define NBCFG                  0x44
 
 enum injection_type {
index 42cf2880d0eda0dea4e6e3e68a97d5d3e4f0ca48..cd76380af79fbbdd2a17cf356f8fd5cd72968290 100644 (file)
@@ -1727,6 +1727,21 @@ static void __mcheck_cpu_init_early(struct cpuinfo_x86 *c)
        }
 }
 
+static void mce_centaur_feature_init(struct cpuinfo_x86 *c)
+{
+       struct mca_config *cfg = &mca_cfg;
+
+        /*
+         * All newer Centaur CPUs support MCE broadcasting. Enable
+         * synchronization with a one second timeout.
+         */
+       if ((c->x86 == 6 && c->x86_model == 0xf && c->x86_stepping >= 0xe) ||
+            c->x86 > 6) {
+               if (cfg->monarch_timeout < 0)
+                       cfg->monarch_timeout = USEC_PER_SEC;
+       }
+}
+
 static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
 {
        switch (c->x86_vendor) {
@@ -1739,6 +1754,9 @@ static void __mcheck_cpu_init_vendor(struct cpuinfo_x86 *c)
                mce_amd_feature_init(c);
                break;
                }
+       case X86_VENDOR_CENTAUR:
+               mce_centaur_feature_init(c);
+               break;
 
        default:
                break;