]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - drivers/edac/mce_amd.c
pinctrl: sh-pfc: sh7734: Fix duplicate TCLK1_B
[mirror_ubuntu-bionic-kernel.git] / drivers / edac / mce_amd.c
index a11a671c7a3866cb416d20eb4f302968028d7080..f108ac1a0540e3be19f21a7f9245cf79b9eff050 100644 (file)
@@ -854,21 +854,24 @@ static void decode_mc6_mce(struct mce *m)
 static void decode_smca_error(struct mce *m)
 {
        struct smca_hwid *hwid;
-       unsigned int bank_type;
+       enum smca_bank_types bank_type;
        const char *ip_name;
        u8 xec = XEC(m->status, xec_mask);
 
        if (m->bank >= ARRAY_SIZE(smca_banks))
                return;
 
-       if (x86_family(m->cpuid) >= 0x17 && m->bank == 4)
-               pr_emerg(HW_ERR "Bank 4 is reserved on Fam17h.\n");
-
        hwid = smca_banks[m->bank].hwid;
        if (!hwid)
                return;
 
        bank_type = hwid->bank_type;
+
+       if (bank_type == SMCA_RESERVED) {
+               pr_emerg(HW_ERR "Bank %d is reserved.\n", m->bank);
+               return;
+       }
+
        ip_name = smca_get_long_name(bank_type);
 
        pr_emerg(HW_ERR "%s Extended Error Code: %d\n", ip_name, xec);
@@ -911,7 +914,7 @@ static inline void amd_decode_err_code(u16 ec)
 /*
  * Filter out unwanted MCE signatures here.
  */
-static bool amd_filter_mce(struct mce *m)
+static bool ignore_mce(struct mce *m)
 {
        /*
         * NB GART TLB error reporting is disabled by default.
@@ -945,7 +948,7 @@ amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
        unsigned int fam = x86_family(m->cpuid);
        int ecc;
 
-       if (amd_filter_mce(m))
+       if (ignore_mce(m))
                return NOTIFY_STOP;
 
        pr_emerg(HW_ERR "%s\n", decode_error_status(m));