aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kernel/amd_nb.c2
-rw-r--r--drivers/edac/amd64_edac.c38
-rw-r--r--drivers/edac/amd64_edac.h3
-rw-r--r--drivers/edac/amd8111_edac.c44
-rw-r--r--drivers/edac/e752x_edac.c30
-rw-r--r--drivers/edac/i3200_edac.c2
-rw-r--r--drivers/edac/i5100_edac.c17
-rw-r--r--drivers/edac/i5400_edac.c2
-rw-r--r--drivers/edac/i7core_edac.c10
-rw-r--r--drivers/edac/i82875p_edac.c2
-rw-r--r--drivers/edac/mce_amd.c65
-rw-r--r--drivers/edac/mpc85xx_edac.c6
-rw-r--r--drivers/edac/sb_edac.c2
-rw-r--r--include/linux/pci_ids.h2
14 files changed, 134 insertions, 91 deletions
diff --git a/arch/x86/kernel/amd_nb.c b/arch/x86/kernel/amd_nb.c
index dec8de4e1663..f04dbb3069b8 100644
--- a/arch/x86/kernel/amd_nb.c
+++ b/arch/x86/kernel/amd_nb.c
@@ -22,6 +22,7 @@ const struct pci_device_id amd_nb_misc_ids[] = {
22 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) }, 22 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M10H_F3) },
23 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) }, 23 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F3) },
24 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) }, 24 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F3) },
25 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F3) },
25 {} 26 {}
26}; 27};
27EXPORT_SYMBOL(amd_nb_misc_ids); 28EXPORT_SYMBOL(amd_nb_misc_ids);
@@ -30,6 +31,7 @@ static const struct pci_device_id amd_nb_link_ids[] = {
30 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) }, 31 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_NB_F4) },
31 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) }, 32 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_15H_M30H_NB_F4) },
32 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) }, 33 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_NB_F4) },
34 { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_16H_M30H_NB_F4) },
33 {} 35 {}
34}; 36};
35 37
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 98e14ee4833c..f8bf00010d45 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1239,9 +1239,17 @@ static u8 f15_m30h_determine_channel(struct amd64_pvt *pvt, u64 sys_addr,
1239 if (num_dcts_intlv == 2) { 1239 if (num_dcts_intlv == 2) {
1240 select = (sys_addr >> 8) & 0x3; 1240 select = (sys_addr >> 8) & 0x3;
1241 channel = select ? 0x3 : 0; 1241 channel = select ? 0x3 : 0;
1242 } else if (num_dcts_intlv == 4) 1242 } else if (num_dcts_intlv == 4) {
1243 channel = (sys_addr >> 8) & 0x7; 1243 u8 intlv_addr = dct_sel_interleave_addr(pvt);
1244 1244 switch (intlv_addr) {
1245 case 0x4:
1246 channel = (sys_addr >> 8) & 0x3;
1247 break;
1248 case 0x5:
1249 channel = (sys_addr >> 9) & 0x3;
1250 break;
1251 }
1252 }
1245 return channel; 1253 return channel;
1246} 1254}
1247 1255
@@ -1799,6 +1807,17 @@ static struct amd64_family_type family_types[] = {
1799 .read_dct_pci_cfg = f10_read_dct_pci_cfg, 1807 .read_dct_pci_cfg = f10_read_dct_pci_cfg,
1800 } 1808 }
1801 }, 1809 },
1810 [F16_M30H_CPUS] = {
1811 .ctl_name = "F16h_M30h",
1812 .f1_id = PCI_DEVICE_ID_AMD_16H_M30H_NB_F1,
1813 .f3_id = PCI_DEVICE_ID_AMD_16H_M30H_NB_F3,
1814 .ops = {
1815 .early_channel_count = f1x_early_channel_count,
1816 .map_sysaddr_to_csrow = f1x_map_sysaddr_to_csrow,
1817 .dbam_to_cs = f16_dbam_to_chip_select,
1818 .read_dct_pci_cfg = f10_read_dct_pci_cfg,
1819 }
1820 },
1802}; 1821};
1803 1822
1804/* 1823/*
@@ -2578,6 +2597,11 @@ static struct amd64_family_type *per_family_init(struct amd64_pvt *pvt)
2578 break; 2597 break;
2579 2598
2580 case 0x16: 2599 case 0x16:
2600 if (pvt->model == 0x30) {
2601 fam_type = &family_types[F16_M30H_CPUS];
2602 pvt->ops = &family_types[F16_M30H_CPUS].ops;
2603 break;
2604 }
2581 fam_type = &family_types[F16_CPUS]; 2605 fam_type = &family_types[F16_CPUS];
2582 pvt->ops = &family_types[F16_CPUS].ops; 2606 pvt->ops = &family_types[F16_CPUS].ops;
2583 break; 2607 break;
@@ -2830,6 +2854,14 @@ static const struct pci_device_id amd64_pci_table[] = {
2830 .class = 0, 2854 .class = 0,
2831 .class_mask = 0, 2855 .class_mask = 0,
2832 }, 2856 },
2857 {
2858 .vendor = PCI_VENDOR_ID_AMD,
2859 .device = PCI_DEVICE_ID_AMD_16H_M30H_NB_F2,
2860 .subvendor = PCI_ANY_ID,
2861 .subdevice = PCI_ANY_ID,
2862 .class = 0,
2863 .class_mask = 0,
2864 },
2833 2865
2834 {0, } 2866 {0, }
2835}; 2867};
diff --git a/drivers/edac/amd64_edac.h b/drivers/edac/amd64_edac.h
index 6dc1fcc25afb..d903e0c21144 100644
--- a/drivers/edac/amd64_edac.h
+++ b/drivers/edac/amd64_edac.h
@@ -168,6 +168,8 @@
168#define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602 168#define PCI_DEVICE_ID_AMD_15H_NB_F2 0x1602
169#define PCI_DEVICE_ID_AMD_16H_NB_F1 0x1531 169#define PCI_DEVICE_ID_AMD_16H_NB_F1 0x1531
170#define PCI_DEVICE_ID_AMD_16H_NB_F2 0x1532 170#define PCI_DEVICE_ID_AMD_16H_NB_F2 0x1532
171#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F1 0x1581
172#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F2 0x1582
171 173
172/* 174/*
173 * Function 1 - Address Map 175 * Function 1 - Address Map
@@ -300,6 +302,7 @@ enum amd_families {
300 F15_CPUS, 302 F15_CPUS,
301 F15_M30H_CPUS, 303 F15_M30H_CPUS,
302 F16_CPUS, 304 F16_CPUS,
305 F16_M30H_CPUS,
303 NUM_FAMILIES, 306 NUM_FAMILIES,
304}; 307};
305 308
diff --git a/drivers/edac/amd8111_edac.c b/drivers/edac/amd8111_edac.c
index ddd890052ce2..2b63f7c2d6d2 100644
--- a/drivers/edac/amd8111_edac.c
+++ b/drivers/edac/amd8111_edac.c
@@ -350,6 +350,7 @@ static int amd8111_dev_probe(struct pci_dev *dev,
350 const struct pci_device_id *id) 350 const struct pci_device_id *id)
351{ 351{
352 struct amd8111_dev_info *dev_info = &amd8111_devices[id->driver_data]; 352 struct amd8111_dev_info *dev_info = &amd8111_devices[id->driver_data];
353 int ret = -ENODEV;
353 354
354 dev_info->dev = pci_get_device(PCI_VENDOR_ID_AMD, 355 dev_info->dev = pci_get_device(PCI_VENDOR_ID_AMD,
355 dev_info->err_dev, NULL); 356 dev_info->err_dev, NULL);
@@ -359,16 +360,15 @@ static int amd8111_dev_probe(struct pci_dev *dev,
359 "vendor %x, device %x, name %s\n", 360 "vendor %x, device %x, name %s\n",
360 PCI_VENDOR_ID_AMD, dev_info->err_dev, 361 PCI_VENDOR_ID_AMD, dev_info->err_dev,
361 dev_info->ctl_name); 362 dev_info->ctl_name);
362 return -ENODEV; 363 goto err;
363 } 364 }
364 365
365 if (pci_enable_device(dev_info->dev)) { 366 if (pci_enable_device(dev_info->dev)) {
366 pci_dev_put(dev_info->dev);
367 printk(KERN_ERR "failed to enable:" 367 printk(KERN_ERR "failed to enable:"
368 "vendor %x, device %x, name %s\n", 368 "vendor %x, device %x, name %s\n",
369 PCI_VENDOR_ID_AMD, dev_info->err_dev, 369 PCI_VENDOR_ID_AMD, dev_info->err_dev,
370 dev_info->ctl_name); 370 dev_info->ctl_name);
371 return -ENODEV; 371 goto err_dev_put;
372 } 372 }
373 373
374 /* 374 /*
@@ -381,8 +381,10 @@ static int amd8111_dev_probe(struct pci_dev *dev,
381 edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1, 381 edac_device_alloc_ctl_info(0, dev_info->ctl_name, 1,
382 NULL, 0, 0, 382 NULL, 0, 0,
383 NULL, 0, dev_info->edac_idx); 383 NULL, 0, dev_info->edac_idx);
384 if (!dev_info->edac_dev) 384 if (!dev_info->edac_dev) {
385 return -ENOMEM; 385 ret = -ENOMEM;
386 goto err_dev_put;
387 }
386 388
387 dev_info->edac_dev->pvt_info = dev_info; 389 dev_info->edac_dev->pvt_info = dev_info;
388 dev_info->edac_dev->dev = &dev_info->dev->dev; 390 dev_info->edac_dev->dev = &dev_info->dev->dev;
@@ -399,8 +401,7 @@ static int amd8111_dev_probe(struct pci_dev *dev,
399 if (edac_device_add_device(dev_info->edac_dev) > 0) { 401 if (edac_device_add_device(dev_info->edac_dev) > 0) {
400 printk(KERN_ERR "failed to add edac_dev for %s\n", 402 printk(KERN_ERR "failed to add edac_dev for %s\n",
401 dev_info->ctl_name); 403 dev_info->ctl_name);
402 edac_device_free_ctl_info(dev_info->edac_dev); 404 goto err_edac_free_ctl;
403 return -ENODEV;
404 } 405 }
405 406
406 printk(KERN_INFO "added one edac_dev on AMD8111 " 407 printk(KERN_INFO "added one edac_dev on AMD8111 "
@@ -409,6 +410,13 @@ static int amd8111_dev_probe(struct pci_dev *dev,
409 dev_info->ctl_name); 410 dev_info->ctl_name);
410 411
411 return 0; 412 return 0;
413
414err_edac_free_ctl:
415 edac_device_free_ctl_info(dev_info->edac_dev);
416err_dev_put:
417 pci_dev_put(dev_info->dev);
418err:
419 return ret;
412} 420}
413 421
414static void amd8111_dev_remove(struct pci_dev *dev) 422static void amd8111_dev_remove(struct pci_dev *dev)
@@ -437,6 +445,7 @@ static int amd8111_pci_probe(struct pci_dev *dev,
437 const struct pci_device_id *id) 445 const struct pci_device_id *id)
438{ 446{
439 struct amd8111_pci_info *pci_info = &amd8111_pcis[id->driver_data]; 447 struct amd8111_pci_info *pci_info = &amd8111_pcis[id->driver_data];
448 int ret = -ENODEV;
440 449
441 pci_info->dev = pci_get_device(PCI_VENDOR_ID_AMD, 450 pci_info->dev = pci_get_device(PCI_VENDOR_ID_AMD,
442 pci_info->err_dev, NULL); 451 pci_info->err_dev, NULL);
@@ -446,16 +455,15 @@ static int amd8111_pci_probe(struct pci_dev *dev,
446 "vendor %x, device %x, name %s\n", 455 "vendor %x, device %x, name %s\n",
447 PCI_VENDOR_ID_AMD, pci_info->err_dev, 456 PCI_VENDOR_ID_AMD, pci_info->err_dev,
448 pci_info->ctl_name); 457 pci_info->ctl_name);
449 return -ENODEV; 458 goto err;
450 } 459 }
451 460
452 if (pci_enable_device(pci_info->dev)) { 461 if (pci_enable_device(pci_info->dev)) {
453 pci_dev_put(pci_info->dev);
454 printk(KERN_ERR "failed to enable:" 462 printk(KERN_ERR "failed to enable:"
455 "vendor %x, device %x, name %s\n", 463 "vendor %x, device %x, name %s\n",
456 PCI_VENDOR_ID_AMD, pci_info->err_dev, 464 PCI_VENDOR_ID_AMD, pci_info->err_dev,
457 pci_info->ctl_name); 465 pci_info->ctl_name);
458 return -ENODEV; 466 goto err_dev_put;
459 } 467 }
460 468
461 /* 469 /*
@@ -465,8 +473,10 @@ static int amd8111_pci_probe(struct pci_dev *dev,
465 */ 473 */
466 pci_info->edac_idx = edac_pci_alloc_index(); 474 pci_info->edac_idx = edac_pci_alloc_index();
467 pci_info->edac_dev = edac_pci_alloc_ctl_info(0, pci_info->ctl_name); 475 pci_info->edac_dev = edac_pci_alloc_ctl_info(0, pci_info->ctl_name);
468 if (!pci_info->edac_dev) 476 if (!pci_info->edac_dev) {
469 return -ENOMEM; 477 ret = -ENOMEM;
478 goto err_dev_put;
479 }
470 480
471 pci_info->edac_dev->pvt_info = pci_info; 481 pci_info->edac_dev->pvt_info = pci_info;
472 pci_info->edac_dev->dev = &pci_info->dev->dev; 482 pci_info->edac_dev->dev = &pci_info->dev->dev;
@@ -483,8 +493,7 @@ static int amd8111_pci_probe(struct pci_dev *dev,
483 if (edac_pci_add_device(pci_info->edac_dev, pci_info->edac_idx) > 0) { 493 if (edac_pci_add_device(pci_info->edac_dev, pci_info->edac_idx) > 0) {
484 printk(KERN_ERR "failed to add edac_pci for %s\n", 494 printk(KERN_ERR "failed to add edac_pci for %s\n",
485 pci_info->ctl_name); 495 pci_info->ctl_name);
486 edac_pci_free_ctl_info(pci_info->edac_dev); 496 goto err_edac_free_ctl;
487 return -ENODEV;
488 } 497 }
489 498
490 printk(KERN_INFO "added one edac_pci on AMD8111 " 499 printk(KERN_INFO "added one edac_pci on AMD8111 "
@@ -493,6 +502,13 @@ static int amd8111_pci_probe(struct pci_dev *dev,
493 pci_info->ctl_name); 502 pci_info->ctl_name);
494 503
495 return 0; 504 return 0;
505
506err_edac_free_ctl:
507 edac_pci_free_ctl_info(pci_info->edac_dev);
508err_dev_put:
509 pci_dev_put(pci_info->dev);
510err:
511 return ret;
496} 512}
497 513
498static void amd8111_pci_remove(struct pci_dev *dev) 514static void amd8111_pci_remove(struct pci_dev *dev)
diff --git a/drivers/edac/e752x_edac.c b/drivers/edac/e752x_edac.c
index 92d54fa65f93..b2d71388172b 100644
--- a/drivers/edac/e752x_edac.c
+++ b/drivers/edac/e752x_edac.c
@@ -209,7 +209,6 @@ enum e752x_chips {
209 */ 209 */
210 210
211struct e752x_pvt { 211struct e752x_pvt {
212 struct pci_dev *bridge_ck;
213 struct pci_dev *dev_d0f0; 212 struct pci_dev *dev_d0f0;
214 struct pci_dev *dev_d0f1; 213 struct pci_dev *dev_d0f1;
215 u32 tolm; 214 u32 tolm;
@@ -891,7 +890,7 @@ static void e752x_get_error_info(struct mem_ctl_info *mci,
891 info->buf_ferr); 890 info->buf_ferr);
892 891
893 if (info->dram_ferr) 892 if (info->dram_ferr)
894 pci_write_bits16(pvt->bridge_ck, E752X_DRAM_FERR, 893 pci_write_bits16(pvt->dev_d0f1, E752X_DRAM_FERR,
895 info->dram_ferr, info->dram_ferr); 894 info->dram_ferr, info->dram_ferr);
896 895
897 pci_write_config_dword(dev, E752X_FERR_GLOBAL, 896 pci_write_config_dword(dev, E752X_FERR_GLOBAL,
@@ -936,7 +935,7 @@ static void e752x_get_error_info(struct mem_ctl_info *mci,
936 info->buf_nerr); 935 info->buf_nerr);
937 936
938 if (info->dram_nerr) 937 if (info->dram_nerr)
939 pci_write_bits16(pvt->bridge_ck, E752X_DRAM_NERR, 938 pci_write_bits16(pvt->dev_d0f1, E752X_DRAM_NERR,
940 info->dram_nerr, info->dram_nerr); 939 info->dram_nerr, info->dram_nerr);
941 940
942 pci_write_config_dword(dev, E752X_NERR_GLOBAL, 941 pci_write_config_dword(dev, E752X_NERR_GLOBAL,
@@ -1177,38 +1176,33 @@ static void e752x_init_mem_map_table(struct pci_dev *pdev,
1177static int e752x_get_devs(struct pci_dev *pdev, int dev_idx, 1176static int e752x_get_devs(struct pci_dev *pdev, int dev_idx,
1178 struct e752x_pvt *pvt) 1177 struct e752x_pvt *pvt)
1179{ 1178{
1180 struct pci_dev *dev; 1179 pvt->dev_d0f1 = pci_get_device(PCI_VENDOR_ID_INTEL,
1181 1180 pvt->dev_info->err_dev, NULL);
1182 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL,
1183 pvt->dev_info->err_dev, pvt->bridge_ck);
1184 1181
1185 if (pvt->bridge_ck == NULL) { 1182 if (pvt->dev_d0f1 == NULL) {
1186 pvt->bridge_ck = pci_scan_single_device(pdev->bus, 1183 pvt->dev_d0f1 = pci_scan_single_device(pdev->bus,
1187 PCI_DEVFN(0, 1)); 1184 PCI_DEVFN(0, 1));
1188 pci_dev_get(pvt->bridge_ck); 1185 pci_dev_get(pvt->dev_d0f1);
1189 } 1186 }
1190 1187
1191 if (pvt->bridge_ck == NULL) { 1188 if (pvt->dev_d0f1 == NULL) {
1192 e752x_printk(KERN_ERR, "error reporting device not found:" 1189 e752x_printk(KERN_ERR, "error reporting device not found:"
1193 "vendor %x device 0x%x (broken BIOS?)\n", 1190 "vendor %x device 0x%x (broken BIOS?)\n",
1194 PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev); 1191 PCI_VENDOR_ID_INTEL, e752x_devs[dev_idx].err_dev);
1195 return 1; 1192 return 1;
1196 } 1193 }
1197 1194
1198 dev = pci_get_device(PCI_VENDOR_ID_INTEL, 1195 pvt->dev_d0f0 = pci_get_device(PCI_VENDOR_ID_INTEL,
1199 e752x_devs[dev_idx].ctl_dev, 1196 e752x_devs[dev_idx].ctl_dev,
1200 NULL); 1197 NULL);
1201 1198
1202 if (dev == NULL) 1199 if (pvt->dev_d0f0 == NULL)
1203 goto fail; 1200 goto fail;
1204 1201
1205 pvt->dev_d0f0 = dev;
1206 pvt->dev_d0f1 = pci_dev_get(pvt->bridge_ck);
1207
1208 return 0; 1202 return 0;
1209 1203
1210fail: 1204fail:
1211 pci_dev_put(pvt->bridge_ck); 1205 pci_dev_put(pvt->dev_d0f1);
1212 return 1; 1206 return 1;
1213} 1207}
1214 1208
@@ -1385,7 +1379,6 @@ static int e752x_probe1(struct pci_dev *pdev, int dev_idx)
1385fail: 1379fail:
1386 pci_dev_put(pvt->dev_d0f0); 1380 pci_dev_put(pvt->dev_d0f0);
1387 pci_dev_put(pvt->dev_d0f1); 1381 pci_dev_put(pvt->dev_d0f1);
1388 pci_dev_put(pvt->bridge_ck);
1389 edac_mc_free(mci); 1382 edac_mc_free(mci);
1390 1383
1391 return -ENODEV; 1384 return -ENODEV;
@@ -1419,7 +1412,6 @@ static void e752x_remove_one(struct pci_dev *pdev)
1419 pvt = (struct e752x_pvt *)mci->pvt_info; 1412 pvt = (struct e752x_pvt *)mci->pvt_info;
1420 pci_dev_put(pvt->dev_d0f0); 1413 pci_dev_put(pvt->dev_d0f0);
1421 pci_dev_put(pvt->dev_d0f1); 1414 pci_dev_put(pvt->dev_d0f1);
1422 pci_dev_put(pvt->bridge_ck);
1423 edac_mc_free(mci); 1415 edac_mc_free(mci);
1424} 1416}
1425 1417
diff --git a/drivers/edac/i3200_edac.c b/drivers/edac/i3200_edac.c
index fa1326e5a4b0..022a70273ada 100644
--- a/drivers/edac/i3200_edac.c
+++ b/drivers/edac/i3200_edac.c
@@ -464,6 +464,8 @@ static void i3200_remove_one(struct pci_dev *pdev)
464 iounmap(priv->window); 464 iounmap(priv->window);
465 465
466 edac_mc_free(mci); 466 edac_mc_free(mci);
467
468 pci_disable_device(pdev);
467} 469}
468 470
469static const struct pci_device_id i3200_pci_tbl[] = { 471static const struct pci_device_id i3200_pci_tbl[] = {
diff --git a/drivers/edac/i5100_edac.c b/drivers/edac/i5100_edac.c
index 36a38ee94fa8..6247d186177e 100644
--- a/drivers/edac/i5100_edac.c
+++ b/drivers/edac/i5100_edac.c
@@ -869,16 +869,13 @@ static void i5100_init_csrows(struct mem_ctl_info *mci)
869 chan, rank, 0); 869 chan, rank, 0);
870 870
871 dimm->nr_pages = npages; 871 dimm->nr_pages = npages;
872 if (npages) { 872 dimm->grain = 32;
873 dimm->grain = 32; 873 dimm->dtype = (priv->mtr[chan][rank].width == 4) ?
874 dimm->dtype = (priv->mtr[chan][rank].width == 4) ? 874 DEV_X4 : DEV_X8;
875 DEV_X4 : DEV_X8; 875 dimm->mtype = MEM_RDDR2;
876 dimm->mtype = MEM_RDDR2; 876 dimm->edac_mode = EDAC_SECDED;
877 dimm->edac_mode = EDAC_SECDED; 877 snprintf(dimm->label, sizeof(dimm->label), "DIMM%u",
878 snprintf(dimm->label, sizeof(dimm->label), 878 i5100_rank_to_slot(mci, chan, rank));
879 "DIMM%u",
880 i5100_rank_to_slot(mci, chan, rank));
881 }
882 879
883 edac_dbg(2, "dimm channel %d, rank %d, size %ld\n", 880 edac_dbg(2, "dimm channel %d, rank %d, size %ld\n",
884 chan, rank, (long)PAGES_TO_MiB(npages)); 881 chan, rank, (long)PAGES_TO_MiB(npages));
diff --git a/drivers/edac/i5400_edac.c b/drivers/edac/i5400_edac.c
index e080cbfa8fc9..5381e98d9c0c 100644
--- a/drivers/edac/i5400_edac.c
+++ b/drivers/edac/i5400_edac.c
@@ -1408,6 +1408,8 @@ static void i5400_remove_one(struct pci_dev *pdev)
1408 /* retrieve references to resources, and free those resources */ 1408 /* retrieve references to resources, and free those resources */
1409 i5400_put_devices(mci); 1409 i5400_put_devices(mci);
1410 1410
1411 pci_disable_device(pdev);
1412
1411 edac_mc_free(mci); 1413 edac_mc_free(mci);
1412} 1414}
1413 1415
diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index d871275196f6..8bc83b99974b 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -1708,7 +1708,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
1708 const struct mce *m) 1708 const struct mce *m)
1709{ 1709{
1710 struct i7core_pvt *pvt = mci->pvt_info; 1710 struct i7core_pvt *pvt = mci->pvt_info;
1711 char *type, *optype, *err; 1711 char *optype, *err;
1712 enum hw_event_mc_err_type tp_event; 1712 enum hw_event_mc_err_type tp_event;
1713 unsigned long error = m->status & 0x1ff0000l; 1713 unsigned long error = m->status & 0x1ff0000l;
1714 bool uncorrected_error = m->mcgstatus & 1ll << 61; 1714 bool uncorrected_error = m->mcgstatus & 1ll << 61;
@@ -1721,15 +1721,11 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
1721 u32 errnum = find_first_bit(&error, 32); 1721 u32 errnum = find_first_bit(&error, 32);
1722 1722
1723 if (uncorrected_error) { 1723 if (uncorrected_error) {
1724 if (ripv) { 1724 if (ripv)
1725 type = "FATAL";
1726 tp_event = HW_EVENT_ERR_FATAL; 1725 tp_event = HW_EVENT_ERR_FATAL;
1727 } else { 1726 else
1728 type = "NON_FATAL";
1729 tp_event = HW_EVENT_ERR_UNCORRECTED; 1727 tp_event = HW_EVENT_ERR_UNCORRECTED;
1730 }
1731 } else { 1728 } else {
1732 type = "CORRECTED";
1733 tp_event = HW_EVENT_ERR_CORRECTED; 1729 tp_event = HW_EVENT_ERR_CORRECTED;
1734 } 1730 }
1735 1731
diff --git a/drivers/edac/i82875p_edac.c b/drivers/edac/i82875p_edac.c
index 80573df0a4d7..8d0450b9b9af 100644
--- a/drivers/edac/i82875p_edac.c
+++ b/drivers/edac/i82875p_edac.c
@@ -406,8 +406,6 @@ static int i82875p_probe1(struct pci_dev *pdev, int dev_idx)
406 406
407 edac_dbg(0, "\n"); 407 edac_dbg(0, "\n");
408 408
409 ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL);
410
411 if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window)) 409 if (i82875p_setup_overfl_dev(pdev, &ovrfl_pdev, &ovrfl_window))
412 return -ENODEV; 410 return -ENODEV;
413 drc = readl(ovrfl_window + I82875P_DRC); 411 drc = readl(ovrfl_window + I82875P_DRC);
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index 30f7309446a6..51b9caa0b024 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -741,6 +741,36 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
741 if (amd_filter_mce(m)) 741 if (amd_filter_mce(m))
742 return NOTIFY_STOP; 742 return NOTIFY_STOP;
743 743
744 pr_emerg(HW_ERR "%s\n", decode_error_status(m));
745
746 pr_emerg(HW_ERR "CPU:%d (%x:%x:%x) MC%d_STATUS[%s|%s|%s|%s|%s",
747 m->extcpu,
748 c->x86, c->x86_model, c->x86_mask,
749 m->bank,
750 ((m->status & MCI_STATUS_OVER) ? "Over" : "-"),
751 ((m->status & MCI_STATUS_UC) ? "UE" : "CE"),
752 ((m->status & MCI_STATUS_MISCV) ? "MiscV" : "-"),
753 ((m->status & MCI_STATUS_PCC) ? "PCC" : "-"),
754 ((m->status & MCI_STATUS_ADDRV) ? "AddrV" : "-"));
755
756 if (c->x86 == 0x15 || c->x86 == 0x16)
757 pr_cont("|%s|%s",
758 ((m->status & MCI_STATUS_DEFERRED) ? "Deferred" : "-"),
759 ((m->status & MCI_STATUS_POISON) ? "Poison" : "-"));
760
761 /* do the two bits[14:13] together */
762 ecc = (m->status >> 45) & 0x3;
763 if (ecc)
764 pr_cont("|%sECC", ((ecc == 2) ? "C" : "U"));
765
766 pr_cont("]: 0x%016llx\n", m->status);
767
768 if (m->status & MCI_STATUS_ADDRV)
769 pr_emerg(HW_ERR "MC%d_ADDR: 0x%016llx\n", m->bank, m->addr);
770
771 if (!fam_ops)
772 goto err_code;
773
744 switch (m->bank) { 774 switch (m->bank) {
745 case 0: 775 case 0:
746 decode_mc0_mce(m); 776 decode_mc0_mce(m);
@@ -774,33 +804,7 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
774 break; 804 break;
775 } 805 }
776 806
777 pr_emerg(HW_ERR "Error Status: %s\n", decode_error_status(m)); 807 err_code:
778
779 pr_emerg(HW_ERR "CPU:%d (%x:%x:%x) MC%d_STATUS[%s|%s|%s|%s|%s",
780 m->extcpu,
781 c->x86, c->x86_model, c->x86_mask,
782 m->bank,
783 ((m->status & MCI_STATUS_OVER) ? "Over" : "-"),
784 ((m->status & MCI_STATUS_UC) ? "UE" : "CE"),
785 ((m->status & MCI_STATUS_MISCV) ? "MiscV" : "-"),
786 ((m->status & MCI_STATUS_PCC) ? "PCC" : "-"),
787 ((m->status & MCI_STATUS_ADDRV) ? "AddrV" : "-"));
788
789 if (c->x86 == 0x15 || c->x86 == 0x16)
790 pr_cont("|%s|%s",
791 ((m->status & MCI_STATUS_DEFERRED) ? "Deferred" : "-"),
792 ((m->status & MCI_STATUS_POISON) ? "Poison" : "-"));
793
794 /* do the two bits[14:13] together */
795 ecc = (m->status >> 45) & 0x3;
796 if (ecc)
797 pr_cont("|%sECC", ((ecc == 2) ? "C" : "U"));
798
799 pr_cont("]: 0x%016llx\n", m->status);
800
801 if (m->status & MCI_STATUS_ADDRV)
802 pr_emerg(HW_ERR "MC%d_ADDR: 0x%016llx\n", m->bank, m->addr);
803
804 amd_decode_err_code(m->status & 0xffff); 808 amd_decode_err_code(m->status & 0xffff);
805 809
806 return NOTIFY_STOP; 810 return NOTIFY_STOP;
@@ -816,10 +820,7 @@ static int __init mce_amd_init(void)
816 struct cpuinfo_x86 *c = &boot_cpu_data; 820 struct cpuinfo_x86 *c = &boot_cpu_data;
817 821
818 if (c->x86_vendor != X86_VENDOR_AMD) 822 if (c->x86_vendor != X86_VENDOR_AMD)
819 return 0; 823 return -ENODEV;
820
821 if (c->x86 < 0xf || c->x86 > 0x16)
822 return 0;
823 824
824 fam_ops = kzalloc(sizeof(struct amd_decoder_ops), GFP_KERNEL); 825 fam_ops = kzalloc(sizeof(struct amd_decoder_ops), GFP_KERNEL);
825 if (!fam_ops) 826 if (!fam_ops)
@@ -874,7 +875,7 @@ static int __init mce_amd_init(void)
874 default: 875 default:
875 printk(KERN_WARNING "Huh? What family is it: 0x%x?!\n", c->x86); 876 printk(KERN_WARNING "Huh? What family is it: 0x%x?!\n", c->x86);
876 kfree(fam_ops); 877 kfree(fam_ops);
877 return -EINVAL; 878 fam_ops = NULL;
878 } 879 }
879 880
880 pr_info("MCE: In-kernel MCE decoding enabled.\n"); 881 pr_info("MCE: In-kernel MCE decoding enabled.\n");
diff --git a/drivers/edac/mpc85xx_edac.c b/drivers/edac/mpc85xx_edac.c
index 8f9182179a7c..f4aec2e6ef56 100644
--- a/drivers/edac/mpc85xx_edac.c
+++ b/drivers/edac/mpc85xx_edac.c
@@ -357,7 +357,7 @@ int mpc85xx_pci_err_probe(struct platform_device *op)
357 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0); 357 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
358 res = devm_request_irq(&op->dev, pdata->irq, 358 res = devm_request_irq(&op->dev, pdata->irq,
359 mpc85xx_pci_isr, 359 mpc85xx_pci_isr,
360 IRQF_DISABLED | IRQF_SHARED, 360 IRQF_SHARED,
361 "[EDAC] PCI err", pci); 361 "[EDAC] PCI err", pci);
362 if (res < 0) { 362 if (res < 0) {
363 printk(KERN_ERR 363 printk(KERN_ERR
@@ -633,7 +633,7 @@ static int mpc85xx_l2_err_probe(struct platform_device *op)
633 if (edac_op_state == EDAC_OPSTATE_INT) { 633 if (edac_op_state == EDAC_OPSTATE_INT) {
634 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0); 634 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
635 res = devm_request_irq(&op->dev, pdata->irq, 635 res = devm_request_irq(&op->dev, pdata->irq,
636 mpc85xx_l2_isr, IRQF_DISABLED, 636 mpc85xx_l2_isr, 0,
637 "[EDAC] L2 err", edac_dev); 637 "[EDAC] L2 err", edac_dev);
638 if (res < 0) { 638 if (res < 0) {
639 printk(KERN_ERR 639 printk(KERN_ERR
@@ -1133,7 +1133,7 @@ static int mpc85xx_mc_err_probe(struct platform_device *op)
1133 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0); 1133 pdata->irq = irq_of_parse_and_map(op->dev.of_node, 0);
1134 res = devm_request_irq(&op->dev, pdata->irq, 1134 res = devm_request_irq(&op->dev, pdata->irq,
1135 mpc85xx_mc_isr, 1135 mpc85xx_mc_isr,
1136 IRQF_DISABLED | IRQF_SHARED, 1136 IRQF_SHARED,
1137 "[EDAC] MC err", mci); 1137 "[EDAC] MC err", mci);
1138 if (res < 0) { 1138 if (res < 0) {
1139 printk(KERN_ERR "%s: Unable to request irq %d for " 1139 printk(KERN_ERR "%s: Unable to request irq %d for "
diff --git a/drivers/edac/sb_edac.c b/drivers/edac/sb_edac.c
index 54e2abe671f7..347c7a1c2725 100644
--- a/drivers/edac/sb_edac.c
+++ b/drivers/edac/sb_edac.c
@@ -1263,7 +1263,7 @@ static int sbridge_get_onedevice(struct pci_dev **prev,
1263 struct pci_dev *pdev = NULL; 1263 struct pci_dev *pdev = NULL;
1264 u8 bus = 0; 1264 u8 bus = 0;
1265 1265
1266 sbridge_printk(KERN_INFO, 1266 sbridge_printk(KERN_DEBUG,
1267 "Seeking for: dev %02x.%d PCI ID %04x:%04x\n", 1267 "Seeking for: dev %02x.%d PCI ID %04x:%04x\n",
1268 dev_descr->dev, dev_descr->func, 1268 dev_descr->dev, dev_descr->func,
1269 PCI_VENDOR_ID_INTEL, dev_descr->dev_id); 1269 PCI_VENDOR_ID_INTEL, dev_descr->dev_id);
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h
index 7399e6a3e9a0..297a8026f454 100644
--- a/include/linux/pci_ids.h
+++ b/include/linux/pci_ids.h
@@ -528,6 +528,8 @@
528#define PCI_DEVICE_ID_AMD_15H_NB_F5 0x1605 528#define PCI_DEVICE_ID_AMD_15H_NB_F5 0x1605
529#define PCI_DEVICE_ID_AMD_16H_NB_F3 0x1533 529#define PCI_DEVICE_ID_AMD_16H_NB_F3 0x1533
530#define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534 530#define PCI_DEVICE_ID_AMD_16H_NB_F4 0x1534
531#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F3 0x1583
532#define PCI_DEVICE_ID_AMD_16H_M30H_NB_F4 0x1584
531#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703 533#define PCI_DEVICE_ID_AMD_CNB17H_F3 0x1703
532#define PCI_DEVICE_ID_AMD_LANCE 0x2000 534#define PCI_DEVICE_ID_AMD_LANCE 0x2000
533#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001 535#define PCI_DEVICE_ID_AMD_LANCE_HOME 0x2001