Commit 477ea116 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'edac_fixes_for_3.20' of git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp

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
parents 6ed3e57f 0c510cc8
...@@ -2174,14 +2174,20 @@ static void __log_bus_error(struct mem_ctl_info *mci, struct err_info *err, ...@@ -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) static inline void decode_bus_error(int node_id, struct mce *m)
{ {
struct mem_ctl_info *mci = mcis[node_id]; struct mem_ctl_info *mci;
struct amd64_pvt *pvt = mci->pvt_info; struct amd64_pvt *pvt;
u8 ecc_type = (m->status >> 45) & 0x3; u8 ecc_type = (m->status >> 45) & 0x3;
u8 xec = XEC(m->status, 0x1f); u8 xec = XEC(m->status, 0x1f);
u16 ec = EC(m->status); u16 ec = EC(m->status);
u64 sys_addr; u64 sys_addr;
struct err_info err; 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 */ /* Bail out early if this was an 'observed' error */
if (PP(ec) == NBSL_PP_OBS) if (PP(ec) == NBSL_PP_OBS)
return; return;
......
...@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -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); rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table);
type = IVY_BRIDGE; type = IVY_BRIDGE;
break; 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); rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table);
type = SANDY_BRIDGE; type = SANDY_BRIDGE;
break; break;
...@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) ...@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
type = BROADWELL; type = BROADWELL;
break; 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; goto fail0;
}
mc = 0; mc = 0;
list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { 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) ...@@ -2474,7 +2477,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id)
goto fail1; goto fail1;
} }
sbridge_printk(KERN_INFO, "Driver loaded.\n"); sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION);
mutex_unlock(&sbridge_edac_lock); mutex_unlock(&sbridge_edac_lock);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment