diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-19 14:18:14 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-19 14:18:14 -0500 |
commit | 477ea1169667a88d8ee12d83a0b0863091fb8670 (patch) | |
tree | 28aff2b1c91c491d6f939e7b29989b9aaf14ad34 | |
parent | 6ed3e57fd2ffe63385e0073fe3cde8bf91b4c9fa (diff) | |
parent | 0c510cc83bdbaac8406f4f7caef34f4da0ba35ea (diff) |
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
-rw-r--r-- | drivers/edac/amd64_edac.c | 10 | ||||
-rw-r--r-- | drivers/edac/sb_edac.c | 9 |
2 files changed, 14 insertions, 5 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 17638d7cf5c2..5907c1718f8c 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -2174,14 +2174,20 @@ static void __log_bus_error(struct mem_ctl_info *mci, struct err_info *err, | |||
2174 | 2174 | ||
2175 | static inline void decode_bus_error(int node_id, struct mce *m) | 2175 | static inline void decode_bus_error(int node_id, struct mce *m) |
2176 | { | 2176 | { |
2177 | struct mem_ctl_info *mci = mcis[node_id]; | 2177 | struct mem_ctl_info *mci; |
2178 | struct amd64_pvt *pvt = mci->pvt_info; | 2178 | struct amd64_pvt *pvt; |
2179 | u8 ecc_type = (m->status >> 45) & 0x3; | 2179 | u8 ecc_type = (m->status >> 45) & 0x3; |
2180 | u8 xec = XEC(m->status, 0x1f); | 2180 | u8 xec = XEC(m->status, 0x1f); |
2181 | u16 ec = EC(m->status); | 2181 | u16 ec = EC(m->status); |
2182 | u64 sys_addr; | 2182 | u64 sys_addr; |
2183 | struct err_info err; | 2183 | struct err_info err; |
2184 | 2184 | ||
2185 | mci = edac_mc_find(node_id); | ||
2186 | if (!mci) | ||
2187 | return; | ||
2188 | |||
2189 | pvt = mci->pvt_info; | ||
2190 | |||
2185 | /* Bail out early if this was an 'observed' error */ | 2191 | /* Bail out early if this was an 'observed' error */ |
2186 | if (PP(ec) == NBSL_PP_OBS) | 2192 | if (PP(ec) == NBSL_PP_OBS) |
2187 | return; | 2193 | return; |
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c index 63aa6730e89e..1acf57ba4c86 100644 --- a/drivers/edac/sb_edac.c +++ b/drivers/edac/sb_edac.c | |||
@@ -2447,7 +2447,7 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2447 | rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table); | 2447 | rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_ibridge_table); |
2448 | type = IVY_BRIDGE; | 2448 | type = IVY_BRIDGE; |
2449 | break; | 2449 | break; |
2450 | case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_TA: | 2450 | case PCI_DEVICE_ID_INTEL_SBRIDGE_IMC_HA0: |
2451 | rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table); | 2451 | rc = sbridge_get_all_devices(&num_mc, pci_dev_descr_sbridge_table); |
2452 | type = SANDY_BRIDGE; | 2452 | type = SANDY_BRIDGE; |
2453 | break; | 2453 | break; |
@@ -2460,8 +2460,11 @@ static int sbridge_probe(struct pci_dev *pdev, const struct pci_device_id *id) | |||
2460 | type = BROADWELL; | 2460 | type = BROADWELL; |
2461 | break; | 2461 | break; |
2462 | } | 2462 | } |
2463 | if (unlikely(rc < 0)) | 2463 | if (unlikely(rc < 0)) { |
2464 | edac_dbg(0, "couldn't get all devices for 0x%x\n", pdev->device); | ||
2464 | goto fail0; | 2465 | goto fail0; |
2466 | } | ||
2467 | |||
2465 | mc = 0; | 2468 | mc = 0; |
2466 | 2469 | ||
2467 | list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { | 2470 | 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 | goto fail1; | 2477 | goto fail1; |
2475 | } | 2478 | } |
2476 | 2479 | ||
2477 | sbridge_printk(KERN_INFO, "Driver loaded.\n"); | 2480 | sbridge_printk(KERN_INFO, "%s\n", SBRIDGE_REVISION); |
2478 | 2481 | ||
2479 | mutex_unlock(&sbridge_edac_lock); | 2482 | mutex_unlock(&sbridge_edac_lock); |
2480 | return 0; | 2483 | return 0; |