]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'edac_fixes_for_3.20' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Feb 2015 19:18:14 +0000 (11:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 19 Feb 2015 19:18:14 +0000 (11:18 -0800)
Pull two EDAC fixes from Borislav Petkov:

 - A fix to sb_edac for proper detection on SNB machines

 - A fix to amd64_edac to not explode on Numascale machines with more
   than 16 memory controllers, from Daniel J Blueman.

* tag 'edac_fixes_for_3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp:
  EDAC, amd64_edac: Prevent OOPS with >16 memory controllers
  sb_edac: Fix detection on SNB machines

drivers/edac/amd64_edac.c
drivers/edac/sb_edac.c

index 17638d7cf5c279a3b2fd63aa2250939a8c059388..5907c1718f8c74fbe4a7d2c3bceb21759ed07422 100644 (file)
@@ -2174,14 +2174,20 @@ static void __log_bus_error(struct mem_ctl_info *mci, struct err_info *err,
 
 static inline void decode_bus_error(int node_id, struct mce *m)
 {
-       struct mem_ctl_info *mci = mcis[node_id];
-       struct amd64_pvt *pvt = mci->pvt_info;
+       struct mem_ctl_info *mci;
+       struct amd64_pvt *pvt;
        u8 ecc_type = (m->status >> 45) & 0x3;
        u8 xec = XEC(m->status, 0x1f);
        u16 ec = EC(m->status);
        u64 sys_addr;
        struct err_info err;
 
+       mci = edac_mc_find(node_id);
+       if (!mci)
+               return;
+
+       pvt = mci->pvt_info;
+
        /* Bail out early if this was an 'observed' error */
        if (PP(ec) == NBSL_PP_OBS)
                return;
index 63aa6730e89ea511492f6e101f48107fa59c8c3e..1acf57ba4c86bdc95b2e6d4d8281295f5568f6fc 100644 (file)
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
                type = IVY_BRIDGE;
                break;
-       case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA:
+       case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0:
                rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
                type = SANDY_BRIDGE;
                break;
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                type = BROADWELL;
                break;
        }
-       if (unlikely(rc < 0))
+       if (unlikely(rc < 0)) {
+               edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device);
                goto fail0;
+       }
+
        mc = 0;
 
        list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) {
@@ -2474,7 +2477,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                        goto fail1;
        }
 
-       sbridge_printk(KERN_INFO, "Driver loaded.\n");
+       sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
 
        mutex_unlock(&sbridge_edac_lock);
        return 0;