Skip to content

Commit

Permalink
Merge tag 'edac_fixes_for_3.20' of git://git.kernel.org/pub/scm/linux…
Browse files Browse the repository at this point in the history
…/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
  • Loading branch information
Linus Torvalds committed Feb 19, 2015
2 parents 6ed3e57 + 0c510cc commit 477ea11
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
10 changes: 8 additions & 2 deletions drivers/edac/amd64_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 6 additions & 3 deletions drivers/edac/sb_edac.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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;
Expand Down

0 comments on commit 477ea11

Please sign in to comment.