aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorBorislav Petkov <borislav.petkov@amd.com>2012-09-11 12:57:43 -0400
committerBorislav Petkov <bp@alien8.de>2012-11-28 05:55:44 -0500
commitf05c41a9c6057a0d5851ebc9589e3834fde1a4b6 (patch)
treef9e3627209b517b19b7110379c1c901d25098888 /drivers/edac
parentdb7312a295ec113fa7b3f7486c4b62b936a357d3 (diff)
MCE, AMD: Remove functional unit references
Having the functional unit names in each bank decode is only misleading as this code supports multiple families and there's no guarantee the mapping between FUs and MCE banks will stay the same. And also, knowing the functional unit name doesn't help much since you end up looking at the respective BKDG anyway. So drop all FU references and use the MC bank numbers instead. Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/mce_amd.c186
-rw-r--r--drivers/edac/mce_amd.h5
2 files changed, 94 insertions, 97 deletions
diff --git a/drivers/edac/mce_amd.c b/drivers/edac/mce_amd.c
index d0c372e30de4..6b38c1186922 100644
--- a/drivers/edac/mce_amd.c
+++ b/drivers/edac/mce_amd.c
@@ -64,7 +64,7 @@ EXPORT_SYMBOL_GPL(to_msgs);
64const char * const ii_msgs[] = { "MEM", "RESV", "IO", "GEN" }; 64const char * const ii_msgs[] = { "MEM", "RESV", "IO", "GEN" };
65EXPORT_SYMBOL_GPL(ii_msgs); 65EXPORT_SYMBOL_GPL(ii_msgs);
66 66
67static const char * const f15h_ic_mce_desc[] = { 67static const char * const f15h_mc1_mce_desc[] = {
68 "UC during a demand linefill from L2", 68 "UC during a demand linefill from L2",
69 "Parity error during data load from IC", 69 "Parity error during data load from IC",
70 "Parity error for IC valid bit", 70 "Parity error for IC valid bit",
@@ -84,7 +84,7 @@ static const char * const f15h_ic_mce_desc[] = {
84 "fetch address FIFO" 84 "fetch address FIFO"
85}; 85};
86 86
87static const char * const f15h_cu_mce_desc[] = { 87static const char * const f15h_mc2_mce_desc[] = {
88 "Fill ECC error on data fills", /* xec = 0x4 */ 88 "Fill ECC error on data fills", /* xec = 0x4 */
89 "Fill parity error on insn fills", 89 "Fill parity error on insn fills",
90 "Prefetcher request FIFO parity error", 90 "Prefetcher request FIFO parity error",
@@ -101,7 +101,7 @@ static const char * const f15h_cu_mce_desc[] = {
101 "PRB address parity error" 101 "PRB address parity error"
102}; 102};
103 103
104static const char * const nb_mce_desc[] = { 104static const char * const mc4_mce_desc[] = {
105 "DRAM ECC error detected on the NB", 105 "DRAM ECC error detected on the NB",
106 "CRC error detected on HT link", 106 "CRC error detected on HT link",
107 "Link-defined sync error packets detected on HT link", 107 "Link-defined sync error packets detected on HT link",
@@ -123,7 +123,7 @@ static const char * const nb_mce_desc[] = {
123 "ECC Error in the Probe Filter directory" 123 "ECC Error in the Probe Filter directory"
124}; 124};
125 125
126static const char * const fr_ex_mce_desc[] = { 126static const char * const mc5_mce_desc[] = {
127 "CPU Watchdog timer expire", 127 "CPU Watchdog timer expire",
128 "Wakeup array dest tag", 128 "Wakeup array dest tag",
129 "AG payload array", 129 "AG payload array",
@@ -139,7 +139,7 @@ static const char * const fr_ex_mce_desc[] = {
139 "DE error occurred" 139 "DE error occurred"
140}; 140};
141 141
142static bool f12h_dc_mce(u16 ec, u8 xec) 142static bool f12h_mc0_mce(u16 ec, u8 xec)
143{ 143{
144 bool ret = false; 144 bool ret = false;
145 145
@@ -157,26 +157,26 @@ static bool f12h_dc_mce(u16 ec, u8 xec)
157 return ret; 157 return ret;
158} 158}
159 159
160static bool f10h_dc_mce(u16 ec, u8 xec) 160static bool f10h_mc0_mce(u16 ec, u8 xec)
161{ 161{
162 if (R4(ec) == R4_GEN && LL(ec) == LL_L1) { 162 if (R4(ec) == R4_GEN && LL(ec) == LL_L1) {
163 pr_cont("during data scrub.\n"); 163 pr_cont("during data scrub.\n");
164 return true; 164 return true;
165 } 165 }
166 return f12h_dc_mce(ec, xec); 166 return f12h_mc0_mce(ec, xec);
167} 167}
168 168
169static bool k8_dc_mce(u16 ec, u8 xec) 169static bool k8_mc0_mce(u16 ec, u8 xec)
170{ 170{
171 if (BUS_ERROR(ec)) { 171 if (BUS_ERROR(ec)) {
172 pr_cont("during system linefill.\n"); 172 pr_cont("during system linefill.\n");
173 return true; 173 return true;
174 } 174 }
175 175
176 return f10h_dc_mce(ec, xec); 176 return f10h_mc0_mce(ec, xec);
177} 177}
178 178
179static bool f14h_dc_mce(u16 ec, u8 xec) 179static bool f14h_mc0_mce(u16 ec, u8 xec)
180{ 180{
181 u8 r4 = R4(ec); 181 u8 r4 = R4(ec);
182 bool ret = true; 182 bool ret = true;
@@ -228,7 +228,7 @@ static bool f14h_dc_mce(u16 ec, u8 xec)
228 return ret; 228 return ret;
229} 229}
230 230
231static bool f15h_dc_mce(u16 ec, u8 xec) 231static bool f15h_mc0_mce(u16 ec, u8 xec)
232{ 232{
233 bool ret = true; 233 bool ret = true;
234 234
@@ -275,12 +275,12 @@ static bool f15h_dc_mce(u16 ec, u8 xec)
275 return ret; 275 return ret;
276} 276}
277 277
278static void amd_decode_dc_mce(struct mce *m) 278static void decode_mc0_mce(struct mce *m)
279{ 279{
280 u16 ec = EC(m->status); 280 u16 ec = EC(m->status);
281 u8 xec = XEC(m->status, xec_mask); 281 u8 xec = XEC(m->status, xec_mask);
282 282
283 pr_emerg(HW_ERR "Data Cache Error: "); 283 pr_emerg(HW_ERR "MC0 Error: ");
284 284
285 /* TLB error signatures are the same across families */ 285 /* TLB error signatures are the same across families */
286 if (TLB_ERROR(ec)) { 286 if (TLB_ERROR(ec)) {
@@ -290,13 +290,13 @@ static void amd_decode_dc_mce(struct mce *m)
290 : (xec ? "multimatch" : "parity"))); 290 : (xec ? "multimatch" : "parity")));
291 return; 291 return;
292 } 292 }
293 } else if (fam_ops->dc_mce(ec, xec)) 293 } else if (fam_ops->mc0_mce(ec, xec))
294 ; 294 ;
295 else 295 else
296 pr_emerg(HW_ERR "Corrupted DC MCE info?\n"); 296 pr_emerg(HW_ERR "Corrupted MC0 MCE info?\n");
297} 297}
298 298
299static bool k8_ic_mce(u16 ec, u8 xec) 299static bool k8_mc1_mce(u16 ec, u8 xec)
300{ 300{
301 u8 ll = LL(ec); 301 u8 ll = LL(ec);
302 bool ret = true; 302 bool ret = true;
@@ -330,7 +330,7 @@ static bool k8_ic_mce(u16 ec, u8 xec)
330 return ret; 330 return ret;
331} 331}
332 332
333static bool f14h_ic_mce(u16 ec, u8 xec) 333static bool f14h_mc1_mce(u16 ec, u8 xec)
334{ 334{
335 u8 r4 = R4(ec); 335 u8 r4 = R4(ec);
336 bool ret = true; 336 bool ret = true;
@@ -349,7 +349,7 @@ static bool f14h_ic_mce(u16 ec, u8 xec)
349 return ret; 349 return ret;
350} 350}
351 351
352static bool f15h_ic_mce(u16 ec, u8 xec) 352static bool f15h_mc1_mce(u16 ec, u8 xec)
353{ 353{
354 bool ret = true; 354 bool ret = true;
355 355
@@ -358,19 +358,19 @@ static bool f15h_ic_mce(u16 ec, u8 xec)
358 358
359 switch (xec) { 359 switch (xec) {
360 case 0x0 ... 0xa: 360 case 0x0 ... 0xa:
361 pr_cont("%s.\n", f15h_ic_mce_desc[xec]); 361 pr_cont("%s.\n", f15h_mc1_mce_desc[xec]);
362 break; 362 break;
363 363
364 case 0xd: 364 case 0xd:
365 pr_cont("%s.\n", f15h_ic_mce_desc[xec-2]); 365 pr_cont("%s.\n", f15h_mc1_mce_desc[xec-2]);
366 break; 366 break;
367 367
368 case 0x10: 368 case 0x10:
369 pr_cont("%s.\n", f15h_ic_mce_desc[xec-4]); 369 pr_cont("%s.\n", f15h_mc1_mce_desc[xec-4]);
370 break; 370 break;
371 371
372 case 0x11 ... 0x14: 372 case 0x11 ... 0x14:
373 pr_cont("Decoder %s parity error.\n", f15h_ic_mce_desc[xec-4]); 373 pr_cont("Decoder %s parity error.\n", f15h_mc1_mce_desc[xec-4]);
374 break; 374 break;
375 375
376 default: 376 default:
@@ -379,12 +379,12 @@ static bool f15h_ic_mce(u16 ec, u8 xec)
379 return ret; 379 return ret;
380} 380}
381 381
382static void amd_decode_ic_mce(struct mce *m) 382static void decode_mc1_mce(struct mce *m)
383{ 383{
384 u16 ec = EC(m->status); 384 u16 ec = EC(m->status);
385 u8 xec = XEC(m->status, xec_mask); 385 u8 xec = XEC(m->status, xec_mask);
386 386
387 pr_emerg(HW_ERR "Instruction Cache Error: "); 387 pr_emerg(HW_ERR "MC1 Error: ");
388 388
389 if (TLB_ERROR(ec)) 389 if (TLB_ERROR(ec))
390 pr_cont("%s TLB %s.\n", LL_MSG(ec), 390 pr_cont("%s TLB %s.\n", LL_MSG(ec),
@@ -393,18 +393,18 @@ static void amd_decode_ic_mce(struct mce *m)
393 bool k8 = (boot_cpu_data.x86 == 0xf && (m->status & BIT_64(58))); 393 bool k8 = (boot_cpu_data.x86 == 0xf && (m->status & BIT_64(58)));
394 394
395 pr_cont("during %s.\n", (k8 ? "system linefill" : "NB data read")); 395 pr_cont("during %s.\n", (k8 ? "system linefill" : "NB data read"));
396 } else if (fam_ops->ic_mce(ec, xec)) 396 } else if (fam_ops->mc1_mce(ec, xec))
397 ; 397 ;
398 else 398 else
399 pr_emerg(HW_ERR "Corrupted IC MCE info?\n"); 399 pr_emerg(HW_ERR "Corrupted MC1 MCE info?\n");
400} 400}
401 401
402static void amd_decode_bu_mce(struct mce *m) 402static void decode_mc2_mce(struct mce *m)
403{ 403{
404 u16 ec = EC(m->status); 404 u16 ec = EC(m->status);
405 u8 xec = XEC(m->status, xec_mask); 405 u8 xec = XEC(m->status, xec_mask);
406 406
407 pr_emerg(HW_ERR "Bus Unit Error"); 407 pr_emerg(HW_ERR "MC2 Error");
408 408
409 if (xec == 0x1) 409 if (xec == 0x1)
410 pr_cont(" in the write data buffers.\n"); 410 pr_cont(" in the write data buffers.\n");
@@ -429,24 +429,24 @@ static void amd_decode_bu_mce(struct mce *m)
429 pr_cont(": %s parity/ECC error during data " 429 pr_cont(": %s parity/ECC error during data "
430 "access from L2.\n", R4_MSG(ec)); 430 "access from L2.\n", R4_MSG(ec));
431 else 431 else
432 goto wrong_bu_mce; 432 goto wrong_mc2_mce;
433 } else 433 } else
434 goto wrong_bu_mce; 434 goto wrong_mc2_mce;
435 } else 435 } else
436 goto wrong_bu_mce; 436 goto wrong_mc2_mce;
437 437
438 return; 438 return;
439 439
440wrong_bu_mce: 440 wrong_mc2_mce:
441 pr_emerg(HW_ERR "Corrupted BU MCE info?\n"); 441 pr_emerg(HW_ERR "Corrupted MC2 MCE info?\n");
442} 442}
443 443
444static void amd_decode_cu_mce(struct mce *m) 444static void decode_f15_mc2_mce(struct mce *m)
445{ 445{
446 u16 ec = EC(m->status); 446 u16 ec = EC(m->status);
447 u8 xec = XEC(m->status, xec_mask); 447 u8 xec = XEC(m->status, xec_mask);
448 448
449 pr_emerg(HW_ERR "Combined Unit Error: "); 449 pr_emerg(HW_ERR "MC2 Error: ");
450 450
451 if (TLB_ERROR(ec)) { 451 if (TLB_ERROR(ec)) {
452 if (xec == 0x0) 452 if (xec == 0x0)
@@ -454,63 +454,63 @@ static void amd_decode_cu_mce(struct mce *m)
454 else if (xec == 0x1) 454 else if (xec == 0x1)
455 pr_cont("Poison data provided for TLB fill.\n"); 455 pr_cont("Poison data provided for TLB fill.\n");
456 else 456 else
457 goto wrong_cu_mce; 457 goto wrong_f15_mc2_mce;
458 } else if (BUS_ERROR(ec)) { 458 } else if (BUS_ERROR(ec)) {
459 if (xec > 2) 459 if (xec > 2)
460 goto wrong_cu_mce; 460 goto wrong_f15_mc2_mce;
461 461
462 pr_cont("Error during attempted NB data read.\n"); 462 pr_cont("Error during attempted NB data read.\n");
463 } else if (MEM_ERROR(ec)) { 463 } else if (MEM_ERROR(ec)) {
464 switch (xec) { 464 switch (xec) {
465 case 0x4 ... 0xc: 465 case 0x4 ... 0xc:
466 pr_cont("%s.\n", f15h_cu_mce_desc[xec - 0x4]); 466 pr_cont("%s.\n", f15h_mc2_mce_desc[xec - 0x4]);
467 break; 467 break;
468 468
469 case 0x10 ... 0x14: 469 case 0x10 ... 0x14:
470 pr_cont("%s.\n", f15h_cu_mce_desc[xec - 0x7]); 470 pr_cont("%s.\n", f15h_mc2_mce_desc[xec - 0x7]);
471 break; 471 break;
472 472
473 default: 473 default:
474 goto wrong_cu_mce; 474 goto wrong_f15_mc2_mce;
475 } 475 }
476 } 476 }
477 477
478 return; 478 return;
479 479
480wrong_cu_mce: 480 wrong_f15_mc2_mce:
481 pr_emerg(HW_ERR "Corrupted CU MCE info?\n"); 481 pr_emerg(HW_ERR "Corrupted MC2 MCE info?\n");
482} 482}
483 483
484static void amd_decode_ls_mce(struct mce *m) 484static void decode_mc3_mce(struct mce *m)
485{ 485{
486 u16 ec = EC(m->status); 486 u16 ec = EC(m->status);
487 u8 xec = XEC(m->status, xec_mask); 487 u8 xec = XEC(m->status, xec_mask);
488 488
489 if (boot_cpu_data.x86 >= 0x14) { 489 if (boot_cpu_data.x86 >= 0x14) {
490 pr_emerg("You shouldn't be seeing an LS MCE on this cpu family," 490 pr_emerg("You shouldn't be seeing MC3 MCE on this cpu family,"
491 " please report on LKML.\n"); 491 " please report on LKML.\n");
492 return; 492 return;
493 } 493 }
494 494
495 pr_emerg(HW_ERR "Load Store Error"); 495 pr_emerg(HW_ERR "MC3 Error");
496 496
497 if (xec == 0x0) { 497 if (xec == 0x0) {
498 u8 r4 = R4(ec); 498 u8 r4 = R4(ec);
499 499
500 if (!BUS_ERROR(ec) || (r4 != R4_DRD && r4 != R4_DWR)) 500 if (!BUS_ERROR(ec) || (r4 != R4_DRD && r4 != R4_DWR))
501 goto wrong_ls_mce; 501 goto wrong_mc3_mce;
502 502
503 pr_cont(" during %s.\n", R4_MSG(ec)); 503 pr_cont(" during %s.\n", R4_MSG(ec));
504 } else 504 } else
505 goto wrong_ls_mce; 505 goto wrong_mc3_mce;
506 506
507 return; 507 return;
508 508
509wrong_ls_mce: 509 wrong_mc3_mce:
510 pr_emerg(HW_ERR "Corrupted LS MCE info?\n"); 510 pr_emerg(HW_ERR "Corrupted MC3 MCE info?\n");
511} 511}
512 512
513void amd_decode_nb_mce(struct mce *m) 513static void decode_mc4_mce(struct mce *m)
514{ 514{
515 struct cpuinfo_x86 *c = &boot_cpu_data; 515 struct cpuinfo_x86 *c = &boot_cpu_data;
516 int node_id = amd_get_nb_id(m->extcpu); 516 int node_id = amd_get_nb_id(m->extcpu);
@@ -518,7 +518,7 @@ void amd_decode_nb_mce(struct mce *m)
518 u8 xec = XEC(m->status, 0x1f); 518 u8 xec = XEC(m->status, 0x1f);
519 u8 offset = 0; 519 u8 offset = 0;
520 520
521 pr_emerg(HW_ERR "Northbridge Error (node %d): ", node_id); 521 pr_emerg(HW_ERR "MC4 Error (node %d): ", node_id);
522 522
523 switch (xec) { 523 switch (xec) {
524 case 0x0 ... 0xe: 524 case 0x0 ... 0xe:
@@ -527,9 +527,9 @@ void amd_decode_nb_mce(struct mce *m)
527 if (xec == 0x0 || xec == 0x8) { 527 if (xec == 0x0 || xec == 0x8) {
528 /* no ECCs on F11h */ 528 /* no ECCs on F11h */
529 if (c->x86 == 0x11) 529 if (c->x86 == 0x11)
530 goto wrong_nb_mce; 530 goto wrong_mc4_mce;
531 531
532 pr_cont("%s.\n", nb_mce_desc[xec]); 532 pr_cont("%s.\n", mc4_mce_desc[xec]);
533 533
534 if (nb_bus_decoder) 534 if (nb_bus_decoder)
535 nb_bus_decoder(node_id, m); 535 nb_bus_decoder(node_id, m);
@@ -543,14 +543,14 @@ void amd_decode_nb_mce(struct mce *m)
543 else if (BUS_ERROR(ec)) 543 else if (BUS_ERROR(ec))
544 pr_cont("DMA Exclusion Vector Table Walk error.\n"); 544 pr_cont("DMA Exclusion Vector Table Walk error.\n");
545 else 545 else
546 goto wrong_nb_mce; 546 goto wrong_mc4_mce;
547 return; 547 return;
548 548
549 case 0x19: 549 case 0x19:
550 if (boot_cpu_data.x86 == 0x15) 550 if (boot_cpu_data.x86 == 0x15)
551 pr_cont("Compute Unit Data Error.\n"); 551 pr_cont("Compute Unit Data Error.\n");
552 else 552 else
553 goto wrong_nb_mce; 553 goto wrong_mc4_mce;
554 return; 554 return;
555 555
556 case 0x1c ... 0x1f: 556 case 0x1c ... 0x1f:
@@ -558,46 +558,44 @@ void amd_decode_nb_mce(struct mce *m)
558 break; 558 break;
559 559
560 default: 560 default:
561 goto wrong_nb_mce; 561 goto wrong_mc4_mce;
562 } 562 }
563 563
564 pr_cont("%s.\n", nb_mce_desc[xec - offset]); 564 pr_cont("%s.\n", mc4_mce_desc[xec - offset]);
565 return; 565 return;
566 566
567wrong_nb_mce: 567 wrong_mc4_mce:
568 pr_emerg(HW_ERR "Corrupted NB MCE info?\n"); 568 pr_emerg(HW_ERR "Corrupted MC4 MCE info?\n");
569} 569}
570EXPORT_SYMBOL_GPL(amd_decode_nb_mce);
571 570
572static void amd_decode_fr_mce(struct mce *m) 571static void decode_mc5_mce(struct mce *m)
573{ 572{
574 struct cpuinfo_x86 *c = &boot_cpu_data; 573 struct cpuinfo_x86 *c = &boot_cpu_data;
575 u8 xec = XEC(m->status, xec_mask); 574 u8 xec = XEC(m->status, xec_mask);
576 575
577 if (c->x86 == 0xf || c->x86 == 0x11) 576 if (c->x86 == 0xf || c->x86 == 0x11)
578 goto wrong_fr_mce; 577 goto wrong_mc5_mce;
579 578
580 pr_emerg(HW_ERR "%s Error: ", 579 pr_emerg(HW_ERR "MC5 Error: ");
581 (c->x86 == 0x15 ? "Execution Unit" : "FIROB"));
582 580
583 if (xec == 0x0 || xec == 0xc) 581 if (xec == 0x0 || xec == 0xc)
584 pr_cont("%s.\n", fr_ex_mce_desc[xec]); 582 pr_cont("%s.\n", mc5_mce_desc[xec]);
585 else if (xec < 0xd) 583 else if (xec < 0xd)
586 pr_cont("%s parity error.\n", fr_ex_mce_desc[xec]); 584 pr_cont("%s parity error.\n", mc5_mce_desc[xec]);
587 else 585 else
588 goto wrong_fr_mce; 586 goto wrong_mc5_mce;
589 587
590 return; 588 return;
591 589
592wrong_fr_mce: 590 wrong_mc5_mce:
593 pr_emerg(HW_ERR "Corrupted FR MCE info?\n"); 591 pr_emerg(HW_ERR "Corrupted MC5 MCE info?\n");
594} 592}
595 593
596static void amd_decode_fp_mce(struct mce *m) 594static void decode_mc6_mce(struct mce *m)
597{ 595{
598 u8 xec = XEC(m->status, xec_mask); 596 u8 xec = XEC(m->status, xec_mask);
599 597
600 pr_emerg(HW_ERR "Floating Point Unit Error: "); 598 pr_emerg(HW_ERR "MC6 Error: ");
601 599
602 switch (xec) { 600 switch (xec) {
603 case 0x1: 601 case 0x1:
@@ -621,7 +619,7 @@ static void amd_decode_fp_mce(struct mce *m)
621 break; 619 break;
622 620
623 default: 621 default:
624 goto wrong_fp_mce; 622 goto wrong_mc6_mce;
625 break; 623 break;
626 } 624 }
627 625
@@ -629,8 +627,8 @@ static void amd_decode_fp_mce(struct mce *m)
629 627
630 return; 628 return;
631 629
632wrong_fp_mce: 630 wrong_mc6_mce:
633 pr_emerg(HW_ERR "Corrupted FP MCE info?\n"); 631 pr_emerg(HW_ERR "Corrupted MC6 MCE info?\n");
634} 632}
635 633
636static inline void amd_decode_err_code(u16 ec) 634static inline void amd_decode_err_code(u16 ec)
@@ -703,34 +701,34 @@ int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data)
703 701
704 switch (m->bank) { 702 switch (m->bank) {
705 case 0: 703 case 0:
706 amd_decode_dc_mce(m); 704 decode_mc0_mce(m);
707 break; 705 break;
708 706
709 case 1: 707 case 1:
710 amd_decode_ic_mce(m); 708 decode_mc1_mce(m);
711 break; 709 break;
712 710
713 case 2: 711 case 2:
714 if (c->x86 == 0x15) 712 if (c->x86 == 0x15)
715 amd_decode_cu_mce(m); 713 decode_f15_mc2_mce(m);
716 else 714 else
717 amd_decode_bu_mce(m); 715 decode_mc2_mce(m);
718 break; 716 break;
719 717
720 case 3: 718 case 3:
721 amd_decode_ls_mce(m); 719 decode_mc3_mce(m);
722 break; 720 break;
723 721
724 case 4: 722 case 4:
725 amd_decode_nb_mce(m); 723 decode_mc4_mce(m);
726 break; 724 break;
727 725
728 case 5: 726 case 5:
729 amd_decode_fr_mce(m); 727 decode_mc5_mce(m);
730 break; 728 break;
731 729
732 case 6: 730 case 6:
733 amd_decode_fp_mce(m); 731 decode_mc6_mce(m);
734 break; 732 break;
735 733
736 default: 734 default:
@@ -763,35 +761,35 @@ static int __init mce_amd_init(void)
763 761
764 switch (c->x86) { 762 switch (c->x86) {
765 case 0xf: 763 case 0xf:
766 fam_ops->dc_mce = k8_dc_mce; 764 fam_ops->mc0_mce = k8_mc0_mce;
767 fam_ops->ic_mce = k8_ic_mce; 765 fam_ops->mc1_mce = k8_mc1_mce;
768 break; 766 break;
769 767
770 case 0x10: 768 case 0x10:
771 fam_ops->dc_mce = f10h_dc_mce; 769 fam_ops->mc0_mce = f10h_mc0_mce;
772 fam_ops->ic_mce = k8_ic_mce; 770 fam_ops->mc1_mce = k8_mc1_mce;
773 break; 771 break;
774 772
775 case 0x11: 773 case 0x11:
776 fam_ops->dc_mce = k8_dc_mce; 774 fam_ops->mc0_mce = k8_mc0_mce;
777 fam_ops->ic_mce = k8_ic_mce; 775 fam_ops->mc1_mce = k8_mc1_mce;
778 break; 776 break;
779 777
780 case 0x12: 778 case 0x12:
781 fam_ops->dc_mce = f12h_dc_mce; 779 fam_ops->mc0_mce = f12h_mc0_mce;
782 fam_ops->ic_mce = k8_ic_mce; 780 fam_ops->mc1_mce = k8_mc1_mce;
783 break; 781 break;
784 782
785 case 0x14: 783 case 0x14:
786 nb_err_cpumask = 0x3; 784 nb_err_cpumask = 0x3;
787 fam_ops->dc_mce = f14h_dc_mce; 785 fam_ops->mc0_mce = f14h_mc0_mce;
788 fam_ops->ic_mce = f14h_ic_mce; 786 fam_ops->mc1_mce = f14h_mc1_mce;
789 break; 787 break;
790 788
791 case 0x15: 789 case 0x15:
792 xec_mask = 0x1f; 790 xec_mask = 0x1f;
793 fam_ops->dc_mce = f15h_dc_mce; 791 fam_ops->mc0_mce = f15h_mc0_mce;
794 fam_ops->ic_mce = f15h_ic_mce; 792 fam_ops->mc1_mce = f15h_mc1_mce;
795 break; 793 break;
796 794
797 default: 795 default:
diff --git a/drivers/edac/mce_amd.h b/drivers/edac/mce_amd.h
index 8c87a5e87057..942f382ecb64 100644
--- a/drivers/edac/mce_amd.h
+++ b/drivers/edac/mce_amd.h
@@ -78,14 +78,13 @@ extern const char * const ii_msgs[];
78 * per-family decoder ops 78 * per-family decoder ops
79 */ 79 */
80struct amd_decoder_ops { 80struct amd_decoder_ops {
81 bool (*dc_mce)(u16, u8); 81 bool (*mc0_mce)(u16, u8);
82 bool (*ic_mce)(u16, u8); 82 bool (*mc1_mce)(u16, u8);
83}; 83};
84 84
85void amd_report_gart_errors(bool); 85void amd_report_gart_errors(bool);
86void amd_register_ecc_decoder(void (*f)(int, struct mce *)); 86void amd_register_ecc_decoder(void (*f)(int, struct mce *));
87void amd_unregister_ecc_decoder(void (*f)(int, struct mce *)); 87void amd_unregister_ecc_decoder(void (*f)(int, struct mce *));
88void amd_decode_nb_mce(struct mce *);
89int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data); 88int amd_decode_mce(struct notifier_block *nb, unsigned long val, void *data);
90 89
91#endif /* _EDAC_MCE_AMD_H */ 90#endif /* _EDAC_MCE_AMD_H */