Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

edac: Convert debugfX to edac_dbg(X,

Use a more common debugging style.

Remove __FILE__ uses, add missing newlines,
coalesce formats and align arguments.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Joe Perches and committed by
Mauro Carvalho Chehab
956b9ba1 7e881856

+917 -958
+132 -138
drivers/edac/amd64_edac.c
··· 321 321 return edac_mc_find((int)node_id); 322 322 323 323 err_no_match: 324 - debugf2("sys_addr 0x%lx doesn't match any node\n", 325 - (unsigned long)sys_addr); 324 + edac_dbg(2, "sys_addr 0x%lx doesn't match any node\n", 325 + (unsigned long)sys_addr); 326 326 327 327 return NULL; 328 328 } ··· 393 393 mask = ~mask; 394 394 395 395 if ((input_addr & mask) == (base & mask)) { 396 - debugf2("InputAddr 0x%lx matches csrow %d (node %d)\n", 397 - (unsigned long)input_addr, csrow, 398 - pvt->mc_node_id); 396 + edac_dbg(2, "InputAddr 0x%lx matches csrow %d (node %d)\n", 397 + (unsigned long)input_addr, csrow, 398 + pvt->mc_node_id); 399 399 400 400 return csrow; 401 401 } 402 402 } 403 - debugf2("no matching csrow for InputAddr 0x%lx (MC node %d)\n", 404 - (unsigned long)input_addr, pvt->mc_node_id); 403 + edac_dbg(2, "no matching csrow for InputAddr 0x%lx (MC node %d)\n", 404 + (unsigned long)input_addr, pvt->mc_node_id); 405 405 406 406 return -1; 407 407 } ··· 430 430 431 431 /* only revE and later have the DRAM Hole Address Register */ 432 432 if (boot_cpu_data.x86 == 0xf && pvt->ext_model < K8_REV_E) { 433 - debugf1(" revision %d for node %d does not support DHAR\n", 434 - pvt->ext_model, pvt->mc_node_id); 433 + edac_dbg(1, " revision %d for node %d does not support DHAR\n", 434 + pvt->ext_model, pvt->mc_node_id); 435 435 return 1; 436 436 } 437 437 438 438 /* valid for Fam10h and above */ 439 439 if (boot_cpu_data.x86 >= 0x10 && !dhar_mem_hoist_valid(pvt)) { 440 - debugf1(" Dram Memory Hoisting is DISABLED on this system\n"); 440 + edac_dbg(1, " Dram Memory Hoisting is DISABLED on this system\n"); 441 441 return 1; 442 442 } 443 443 444 444 if (!dhar_valid(pvt)) { 445 - debugf1(" Dram Memory Hoisting is DISABLED on this node %d\n", 446 - pvt->mc_node_id); 445 + edac_dbg(1, " Dram Memory Hoisting is DISABLED on this node %d\n", 446 + pvt->mc_node_id); 447 447 return 1; 448 448 } 449 449 ··· 475 475 else 476 476 *hole_offset = k8_dhar_offset(pvt); 477 477 478 - debugf1(" DHAR info for node %d base 0x%lx offset 0x%lx size 0x%lx\n", 479 - pvt->mc_node_id, (unsigned long)*hole_base, 480 - (unsigned long)*hole_offset, (unsigned long)*hole_size); 478 + edac_dbg(1, " DHAR info for node %d base 0x%lx offset 0x%lx size 0x%lx\n", 479 + pvt->mc_node_id, (unsigned long)*hole_base, 480 + (unsigned long)*hole_offset, (unsigned long)*hole_size); 481 481 482 482 return 0; 483 483 } ··· 528 528 /* use DHAR to translate SysAddr to DramAddr */ 529 529 dram_addr = sys_addr - hole_offset; 530 530 531 - debugf2("using DHAR to translate SysAddr 0x%lx to " 532 - "DramAddr 0x%lx\n", 533 - (unsigned long)sys_addr, 534 - (unsigned long)dram_addr); 531 + edac_dbg(2, "using DHAR to translate SysAddr 0x%lx to DramAddr 0x%lx\n", 532 + (unsigned long)sys_addr, 533 + (unsigned long)dram_addr); 535 534 536 535 return dram_addr; 537 536 } ··· 547 548 */ 548 549 dram_addr = (sys_addr & GENMASK(0, 39)) - dram_base; 549 550 550 - debugf2("using DRAM Base register to translate SysAddr 0x%lx to " 551 - "DramAddr 0x%lx\n", (unsigned long)sys_addr, 552 - (unsigned long)dram_addr); 551 + edac_dbg(2, "using DRAM Base register to translate SysAddr 0x%lx to DramAddr 0x%lx\n", 552 + (unsigned long)sys_addr, (unsigned long)dram_addr); 553 553 return dram_addr; 554 554 } 555 555 ··· 584 586 input_addr = ((dram_addr >> intlv_shift) & GENMASK(12, 35)) + 585 587 (dram_addr & 0xfff); 586 588 587 - debugf2(" Intlv Shift=%d DramAddr=0x%lx maps to InputAddr=0x%lx\n", 588 - intlv_shift, (unsigned long)dram_addr, 589 - (unsigned long)input_addr); 589 + edac_dbg(2, " Intlv Shift=%d DramAddr=0x%lx maps to InputAddr=0x%lx\n", 590 + intlv_shift, (unsigned long)dram_addr, 591 + (unsigned long)input_addr); 590 592 591 593 return input_addr; 592 594 } ··· 602 604 input_addr = 603 605 dram_addr_to_input_addr(mci, sys_addr_to_dram_addr(mci, sys_addr)); 604 606 605 - debugf2("SysAdddr 0x%lx translates to InputAddr 0x%lx\n", 606 - (unsigned long)sys_addr, (unsigned long)input_addr); 607 + edac_dbg(2, "SysAdddr 0x%lx translates to InputAddr 0x%lx\n", 608 + (unsigned long)sys_addr, (unsigned long)input_addr); 607 609 608 610 return input_addr; 609 611 } ··· 635 637 636 638 intlv_shift = num_node_interleave_bits(dram_intlv_en(pvt, 0)); 637 639 if (intlv_shift == 0) { 638 - debugf1(" InputAddr 0x%lx translates to DramAddr of " 639 - "same value\n", (unsigned long)input_addr); 640 + edac_dbg(1, " InputAddr 0x%lx translates to DramAddr of same value\n", 641 + (unsigned long)input_addr); 640 642 641 643 return input_addr; 642 644 } ··· 647 649 intlv_sel = dram_intlv_sel(pvt, node_id) & ((1 << intlv_shift) - 1); 648 650 dram_addr = bits + (intlv_sel << 12); 649 651 650 - debugf1("InputAddr 0x%lx translates to DramAddr 0x%lx " 651 - "(%d node interleave bits)\n", (unsigned long)input_addr, 652 - (unsigned long)dram_addr, intlv_shift); 652 + edac_dbg(1, "InputAddr 0x%lx translates to DramAddr 0x%lx (%d node interleave bits)\n", 653 + (unsigned long)input_addr, 654 + (unsigned long)dram_addr, intlv_shift); 653 655 654 656 return dram_addr; 655 657 } ··· 671 673 (dram_addr < (hole_base + hole_size))) { 672 674 sys_addr = dram_addr + hole_offset; 673 675 674 - debugf1("using DHAR to translate DramAddr 0x%lx to " 675 - "SysAddr 0x%lx\n", (unsigned long)dram_addr, 676 - (unsigned long)sys_addr); 676 + edac_dbg(1, "using DHAR to translate DramAddr 0x%lx to SysAddr 0x%lx\n", 677 + (unsigned long)dram_addr, 678 + (unsigned long)sys_addr); 677 679 678 680 return sys_addr; 679 681 } ··· 695 697 */ 696 698 sys_addr |= ~((sys_addr & (1ull << 39)) - 1); 697 699 698 - debugf1(" Node %d, DramAddr 0x%lx to SysAddr 0x%lx\n", 699 - pvt->mc_node_id, (unsigned long)dram_addr, 700 - (unsigned long)sys_addr); 700 + edac_dbg(1, " Node %d, DramAddr 0x%lx to SysAddr 0x%lx\n", 701 + pvt->mc_node_id, (unsigned long)dram_addr, 702 + (unsigned long)sys_addr); 701 703 702 704 return sys_addr; 703 705 } ··· 766 768 767 769 static void amd64_dump_dramcfg_low(u32 dclr, int chan) 768 770 { 769 - debugf1("F2x%d90 (DRAM Cfg Low): 0x%08x\n", chan, dclr); 771 + edac_dbg(1, "F2x%d90 (DRAM Cfg Low): 0x%08x\n", chan, dclr); 770 772 771 - debugf1(" DIMM type: %sbuffered; all DIMMs support ECC: %s\n", 772 - (dclr & BIT(16)) ? "un" : "", 773 - (dclr & BIT(19)) ? "yes" : "no"); 773 + edac_dbg(1, " DIMM type: %sbuffered; all DIMMs support ECC: %s\n", 774 + (dclr & BIT(16)) ? "un" : "", 775 + (dclr & BIT(19)) ? "yes" : "no"); 774 776 775 - debugf1(" PAR/ERR parity: %s\n", 776 - (dclr & BIT(8)) ? "enabled" : "disabled"); 777 + edac_dbg(1, " PAR/ERR parity: %s\n", 778 + (dclr & BIT(8)) ? "enabled" : "disabled"); 777 779 778 780 if (boot_cpu_data.x86 == 0x10) 779 - debugf1(" DCT 128bit mode width: %s\n", 780 - (dclr & BIT(11)) ? "128b" : "64b"); 781 + edac_dbg(1, " DCT 128bit mode width: %s\n", 782 + (dclr & BIT(11)) ? "128b" : "64b"); 781 783 782 - debugf1(" x4 logical DIMMs present: L0: %s L1: %s L2: %s L3: %s\n", 783 - (dclr & BIT(12)) ? "yes" : "no", 784 - (dclr & BIT(13)) ? "yes" : "no", 785 - (dclr & BIT(14)) ? "yes" : "no", 786 - (dclr & BIT(15)) ? "yes" : "no"); 784 + edac_dbg(1, " x4 logical DIMMs present: L0: %s L1: %s L2: %s L3: %s\n", 785 + (dclr & BIT(12)) ? "yes" : "no", 786 + (dclr & BIT(13)) ? "yes" : "no", 787 + (dclr & BIT(14)) ? "yes" : "no", 788 + (dclr & BIT(15)) ? "yes" : "no"); 787 789 } 788 790 789 791 /* Display and decode various NB registers for debug purposes. */ 790 792 static void dump_misc_regs(struct amd64_pvt *pvt) 791 793 { 792 - debugf1("F3xE8 (NB Cap): 0x%08x\n", pvt->nbcap); 794 + edac_dbg(1, "F3xE8 (NB Cap): 0x%08x\n", pvt->nbcap); 793 795 794 - debugf1(" NB two channel DRAM capable: %s\n", 795 - (pvt->nbcap & NBCAP_DCT_DUAL) ? "yes" : "no"); 796 + edac_dbg(1, " NB two channel DRAM capable: %s\n", 797 + (pvt->nbcap & NBCAP_DCT_DUAL) ? "yes" : "no"); 796 798 797 - debugf1(" ECC capable: %s, ChipKill ECC capable: %s\n", 798 - (pvt->nbcap & NBCAP_SECDED) ? "yes" : "no", 799 - (pvt->nbcap & NBCAP_CHIPKILL) ? "yes" : "no"); 799 + edac_dbg(1, " ECC capable: %s, ChipKill ECC capable: %s\n", 800 + (pvt->nbcap & NBCAP_SECDED) ? "yes" : "no", 801 + (pvt->nbcap & NBCAP_CHIPKILL) ? "yes" : "no"); 800 802 801 803 amd64_dump_dramcfg_low(pvt->dclr0, 0); 802 804 803 - debugf1("F3xB0 (Online Spare): 0x%08x\n", pvt->online_spare); 805 + edac_dbg(1, "F3xB0 (Online Spare): 0x%08x\n", pvt->online_spare); 804 806 805 - debugf1("F1xF0 (DRAM Hole Address): 0x%08x, base: 0x%08x, " 806 - "offset: 0x%08x\n", 807 - pvt->dhar, dhar_base(pvt), 808 - (boot_cpu_data.x86 == 0xf) ? k8_dhar_offset(pvt) 809 - : f10_dhar_offset(pvt)); 807 + edac_dbg(1, "F1xF0 (DRAM Hole Address): 0x%08x, base: 0x%08x, offset: 0x%08x\n", 808 + pvt->dhar, dhar_base(pvt), 809 + (boot_cpu_data.x86 == 0xf) ? k8_dhar_offset(pvt) 810 + : f10_dhar_offset(pvt)); 810 811 811 - debugf1(" DramHoleValid: %s\n", dhar_valid(pvt) ? "yes" : "no"); 812 + edac_dbg(1, " DramHoleValid: %s\n", dhar_valid(pvt) ? "yes" : "no"); 812 813 813 814 amd64_debug_display_dimm_sizes(pvt, 0); 814 815 ··· 854 857 u32 *base1 = &pvt->csels[1].csbases[cs]; 855 858 856 859 if (!amd64_read_dct_pci_cfg(pvt, reg0, base0)) 857 - debugf0(" DCSB0[%d]=0x%08x reg: F2x%x\n", 858 - cs, *base0, reg0); 860 + edac_dbg(0, " DCSB0[%d]=0x%08x reg: F2x%x\n", 861 + cs, *base0, reg0); 859 862 860 863 if (boot_cpu_data.x86 == 0xf || dct_ganging_enabled(pvt)) 861 864 continue; 862 865 863 866 if (!amd64_read_dct_pci_cfg(pvt, reg1, base1)) 864 - debugf0(" DCSB1[%d]=0x%08x reg: F2x%x\n", 865 - cs, *base1, reg1); 867 + edac_dbg(0, " DCSB1[%d]=0x%08x reg: F2x%x\n", 868 + cs, *base1, reg1); 866 869 } 867 870 868 871 for_each_chip_select_mask(cs, 0, pvt) { ··· 872 875 u32 *mask1 = &pvt->csels[1].csmasks[cs]; 873 876 874 877 if (!amd64_read_dct_pci_cfg(pvt, reg0, mask0)) 875 - debugf0(" DCSM0[%d]=0x%08x reg: F2x%x\n", 876 - cs, *mask0, reg0); 878 + edac_dbg(0, " DCSM0[%d]=0x%08x reg: F2x%x\n", 879 + cs, *mask0, reg0); 877 880 878 881 if (boot_cpu_data.x86 == 0xf || dct_ganging_enabled(pvt)) 879 882 continue; 880 883 881 884 if (!amd64_read_dct_pci_cfg(pvt, reg1, mask1)) 882 - debugf0(" DCSM1[%d]=0x%08x reg: F2x%x\n", 883 - cs, *mask1, reg1); 885 + edac_dbg(0, " DCSM1[%d]=0x%08x reg: F2x%x\n", 886 + cs, *mask1, reg1); 884 887 } 885 888 } 886 889 ··· 1190 1193 * Need to check DCT0[0] and DCT1[0] to see if only one of them has 1191 1194 * their CSEnable bit on. If so, then SINGLE DIMM case. 1192 1195 */ 1193 - debugf0("Data width is not 128 bits - need more decoding\n"); 1196 + edac_dbg(0, "Data width is not 128 bits - need more decoding\n"); 1194 1197 1195 1198 /* 1196 1199 * Check DRAM Bank Address Mapping values for each DIMM to see if there ··· 1269 1272 return; 1270 1273 1271 1274 if (!amd64_read_dct_pci_cfg(pvt, DCT_SEL_LO, &pvt->dct_sel_lo)) { 1272 - debugf0("F2x110 (DCTSelLow): 0x%08x, High range addrs at: 0x%x\n", 1273 - pvt->dct_sel_lo, dct_sel_baseaddr(pvt)); 1275 + edac_dbg(0, "F2x110 (DCTSelLow): 0x%08x, High range addrs at: 0x%x\n", 1276 + pvt->dct_sel_lo, dct_sel_baseaddr(pvt)); 1274 1277 1275 - debugf0(" DCTs operate in %s mode.\n", 1276 - (dct_ganging_enabled(pvt) ? "ganged" : "unganged")); 1278 + edac_dbg(0, " DCTs operate in %s mode\n", 1279 + (dct_ganging_enabled(pvt) ? "ganged" : "unganged")); 1277 1280 1278 1281 if (!dct_ganging_enabled(pvt)) 1279 - debugf0(" Address range split per DCT: %s\n", 1280 - (dct_high_range_enabled(pvt) ? "yes" : "no")); 1282 + edac_dbg(0, " Address range split per DCT: %s\n", 1283 + (dct_high_range_enabled(pvt) ? "yes" : "no")); 1281 1284 1282 - debugf0(" data interleave for ECC: %s, " 1283 - "DRAM cleared since last warm reset: %s\n", 1284 - (dct_data_intlv_enabled(pvt) ? "enabled" : "disabled"), 1285 - (dct_memory_cleared(pvt) ? "yes" : "no")); 1285 + edac_dbg(0, " data interleave for ECC: %s, DRAM cleared since last warm reset: %s\n", 1286 + (dct_data_intlv_enabled(pvt) ? "enabled" : "disabled"), 1287 + (dct_memory_cleared(pvt) ? "yes" : "no")); 1286 1288 1287 - debugf0(" channel interleave: %s, " 1288 - "interleave bits selector: 0x%x\n", 1289 - (dct_interleave_enabled(pvt) ? "enabled" : "disabled"), 1290 - dct_sel_interleave_addr(pvt)); 1289 + edac_dbg(0, " channel interleave: %s, " 1290 + "interleave bits selector: 0x%x\n", 1291 + (dct_interleave_enabled(pvt) ? "enabled" : "disabled"), 1292 + dct_sel_interleave_addr(pvt)); 1291 1293 } 1292 1294 1293 1295 amd64_read_dct_pci_cfg(pvt, DCT_SEL_HI, &pvt->dct_sel_hi); ··· 1424 1428 1425 1429 pvt = mci->pvt_info; 1426 1430 1427 - debugf1("input addr: 0x%llx, DCT: %d\n", in_addr, dct); 1431 + edac_dbg(1, "input addr: 0x%llx, DCT: %d\n", in_addr, dct); 1428 1432 1429 1433 for_each_chip_select(csrow, dct, pvt) { 1430 1434 if (!csrow_enabled(csrow, dct, pvt)) ··· 1432 1436 1433 1437 get_cs_base_and_mask(pvt, csrow, dct, &cs_base, &cs_mask); 1434 1438 1435 - debugf1(" CSROW=%d CSBase=0x%llx CSMask=0x%llx\n", 1436 - csrow, cs_base, cs_mask); 1439 + edac_dbg(1, " CSROW=%d CSBase=0x%llx CSMask=0x%llx\n", 1440 + csrow, cs_base, cs_mask); 1437 1441 1438 1442 cs_mask = ~cs_mask; 1439 1443 1440 - debugf1(" (InputAddr & ~CSMask)=0x%llx " 1441 - "(CSBase & ~CSMask)=0x%llx\n", 1442 - (in_addr & cs_mask), (cs_base & cs_mask)); 1444 + edac_dbg(1, " (InputAddr & ~CSMask)=0x%llx (CSBase & ~CSMask)=0x%llx\n", 1445 + (in_addr & cs_mask), (cs_base & cs_mask)); 1443 1446 1444 1447 if ((in_addr & cs_mask) == (cs_base & cs_mask)) { 1445 1448 cs_found = f10_process_possible_spare(pvt, dct, csrow); 1446 1449 1447 - debugf1(" MATCH csrow=%d\n", cs_found); 1450 + edac_dbg(1, " MATCH csrow=%d\n", cs_found); 1448 1451 break; 1449 1452 } 1450 1453 } ··· 1500 1505 u8 intlv_en = dram_intlv_en(pvt, range); 1501 1506 u32 intlv_sel = dram_intlv_sel(pvt, range); 1502 1507 1503 - debugf1("(range %d) SystemAddr= 0x%llx Limit=0x%llx\n", 1504 - range, sys_addr, get_dram_limit(pvt, range)); 1508 + edac_dbg(1, "(range %d) SystemAddr= 0x%llx Limit=0x%llx\n", 1509 + range, sys_addr, get_dram_limit(pvt, range)); 1505 1510 1506 1511 if (dhar_valid(pvt) && 1507 1512 dhar_base(pvt) <= sys_addr && ··· 1557 1562 (chan_addr & 0xfff); 1558 1563 } 1559 1564 1560 - debugf1(" Normalized DCT addr: 0x%llx\n", chan_addr); 1565 + edac_dbg(1, " Normalized DCT addr: 0x%llx\n", chan_addr); 1561 1566 1562 1567 cs_found = f1x_lookup_addr_in_dct(chan_addr, node_id, channel); 1563 1568 ··· 1659 1664 dcsb = (ctrl && !dct_ganging_enabled(pvt)) ? pvt->csels[1].csbases 1660 1665 : pvt->csels[0].csbases; 1661 1666 1662 - debugf1("F2x%d80 (DRAM Bank Address Mapping): 0x%08x\n", ctrl, dbam); 1667 + edac_dbg(1, "F2x%d80 (DRAM Bank Address Mapping): 0x%08x\n", 1668 + ctrl, dbam); 1663 1669 1664 1670 edac_printk(KERN_DEBUG, EDAC_MC, "DCT%d chip selects:\n", ctrl); 1665 1671 ··· 1836 1840 } 1837 1841 } 1838 1842 1839 - debugf0("syndrome(%x) not found\n", syndrome); 1843 + edac_dbg(0, "syndrome(%x) not found\n", syndrome); 1840 1844 return -1; 1841 1845 } 1842 1846 ··· 2043 2047 2044 2048 return -ENODEV; 2045 2049 } 2046 - debugf1("F1: %s\n", pci_name(pvt->F1)); 2047 - debugf1("F2: %s\n", pci_name(pvt->F2)); 2048 - debugf1("F3: %s\n", pci_name(pvt->F3)); 2050 + edac_dbg(1, "F1: %s\n", pci_name(pvt->F1)); 2051 + edac_dbg(1, "F2: %s\n", pci_name(pvt->F2)); 2052 + edac_dbg(1, "F3: %s\n", pci_name(pvt->F3)); 2049 2053 2050 2054 return 0; 2051 2055 } ··· 2072 2076 * those are Read-As-Zero 2073 2077 */ 2074 2078 rdmsrl(MSR_K8_TOP_MEM1, pvt->top_mem); 2075 - debugf0(" TOP_MEM: 0x%016llx\n", pvt->top_mem); 2079 + edac_dbg(0, " TOP_MEM: 0x%016llx\n", pvt->top_mem); 2076 2080 2077 2081 /* check first whether TOP_MEM2 is enabled */ 2078 2082 rdmsrl(MSR_K8_SYSCFG, msr_val); 2079 2083 if (msr_val & (1U << 21)) { 2080 2084 rdmsrl(MSR_K8_TOP_MEM2, pvt->top_mem2); 2081 - debugf0(" TOP_MEM2: 0x%016llx\n", pvt->top_mem2); 2085 + edac_dbg(0, " TOP_MEM2: 0x%016llx\n", pvt->top_mem2); 2082 2086 } else 2083 - debugf0(" TOP_MEM2 disabled.\n"); 2087 + edac_dbg(0, " TOP_MEM2 disabled\n"); 2084 2088 2085 2089 amd64_read_pci_cfg(pvt->F3, NBCAP, &pvt->nbcap); 2086 2090 ··· 2096 2100 if (!rw) 2097 2101 continue; 2098 2102 2099 - debugf1(" DRAM range[%d], base: 0x%016llx; limit: 0x%016llx\n", 2100 - range, 2101 - get_dram_base(pvt, range), 2102 - get_dram_limit(pvt, range)); 2103 + edac_dbg(1, " DRAM range[%d], base: 0x%016llx; limit: 0x%016llx\n", 2104 + range, 2105 + get_dram_base(pvt, range), 2106 + get_dram_limit(pvt, range)); 2103 2107 2104 - debugf1(" IntlvEn=%s; Range access: %s%s IntlvSel=%d DstNode=%d\n", 2105 - dram_intlv_en(pvt, range) ? "Enabled" : "Disabled", 2106 - (rw & 0x1) ? "R" : "-", 2107 - (rw & 0x2) ? "W" : "-", 2108 - dram_intlv_sel(pvt, range), 2109 - dram_dst_node(pvt, range)); 2108 + edac_dbg(1, " IntlvEn=%s; Range access: %s%s IntlvSel=%d DstNode=%d\n", 2109 + dram_intlv_en(pvt, range) ? "Enabled" : "Disabled", 2110 + (rw & 0x1) ? "R" : "-", 2111 + (rw & 0x2) ? "W" : "-", 2112 + dram_intlv_sel(pvt, range), 2113 + dram_dst_node(pvt, range)); 2110 2114 } 2111 2115 2112 2116 read_dct_base_mask(pvt); ··· 2187 2191 2188 2192 nr_pages = pvt->ops->dbam_to_cs(pvt, dct, cs_mode) << (20 - PAGE_SHIFT); 2189 2193 2190 - debugf0(" (csrow=%d) DBAM map index= %d\n", csrow_nr, cs_mode); 2191 - debugf0(" nr_pages/channel= %u channel-count = %d\n", 2192 - nr_pages, pvt->channel_count); 2194 + edac_dbg(0, " (csrow=%d) DBAM map index= %d\n", csrow_nr, cs_mode); 2195 + edac_dbg(0, " nr_pages/channel= %u channel-count = %d\n", 2196 + nr_pages, pvt->channel_count); 2193 2197 2194 2198 return nr_pages; 2195 2199 } ··· 2214 2218 2215 2219 pvt->nbcfg = val; 2216 2220 2217 - debugf0("node %d, NBCFG=0x%08x[ChipKillEccCap: %d|DramEccEn: %d]\n", 2218 - pvt->mc_node_id, val, 2219 - !!(val & NBCFG_CHIPKILL), !!(val & NBCFG_ECC_ENABLE)); 2221 + edac_dbg(0, "node %d, NBCFG=0x%08x[ChipKillEccCap: %d|DramEccEn: %d]\n", 2222 + pvt->mc_node_id, val, 2223 + !!(val & NBCFG_CHIPKILL), !!(val & NBCFG_ECC_ENABLE)); 2220 2224 2221 2225 for_each_chip_select(i, 0, pvt) { 2222 2226 csrow = mci->csrows[i]; 2223 2227 2224 2228 if (!csrow_enabled(i, 0, pvt) && !csrow_enabled(i, 1, pvt)) { 2225 - debugf1("----CSROW %d EMPTY for node %d\n", i, 2226 - pvt->mc_node_id); 2229 + edac_dbg(1, "----CSROW %d VALID for MC node %d\n", 2230 + i, pvt->mc_node_id); 2227 2231 continue; 2228 2232 } 2229 - 2230 - debugf1("----CSROW %d VALID for MC node %d\n", 2231 - i, pvt->mc_node_id); 2232 2233 2233 2234 empty = 0; 2234 2235 if (csrow_enabled(i, 0, pvt)) ··· 2238 2245 2239 2246 mtype = amd64_determine_memory_type(pvt, i); 2240 2247 2241 - debugf1(" for MC node %d csrow %d:\n", pvt->mc_node_id, i); 2242 - debugf1(" nr_pages: %u\n", nr_pages * pvt->channel_count); 2248 + edac_dbg(1, " for MC node %d csrow %d:\n", pvt->mc_node_id, i); 2249 + edac_dbg(1, " nr_pages: %u\n", 2250 + nr_pages * pvt->channel_count); 2243 2251 2244 2252 /* 2245 2253 * determine whether CHIPKILL or JUST ECC or NO ECC is operating ··· 2292 2298 struct msr *reg = per_cpu_ptr(msrs, cpu); 2293 2299 nbe = reg->l & MSR_MCGCTL_NBE; 2294 2300 2295 - debugf0("core: %u, MCG_CTL: 0x%llx, NB MSR is %s\n", 2296 - cpu, reg->q, 2297 - (nbe ? "enabled" : "disabled")); 2301 + edac_dbg(0, "core: %u, MCG_CTL: 0x%llx, NB MSR is %s\n", 2302 + cpu, reg->q, 2303 + (nbe ? "enabled" : "disabled")); 2298 2304 2299 2305 if (!nbe) 2300 2306 goto out; ··· 2365 2371 2366 2372 amd64_read_pci_cfg(F3, NBCFG, &value); 2367 2373 2368 - debugf0("1: node %d, NBCFG=0x%08x[DramEccEn: %d]\n", 2369 - nid, value, !!(value & NBCFG_ECC_ENABLE)); 2374 + edac_dbg(0, "1: node %d, NBCFG=0x%08x[DramEccEn: %d]\n", 2375 + nid, value, !!(value & NBCFG_ECC_ENABLE)); 2370 2376 2371 2377 if (!(value & NBCFG_ECC_ENABLE)) { 2372 2378 amd64_warn("DRAM ECC disabled on this node, enabling...\n"); ··· 2390 2396 s->flags.nb_ecc_prev = 1; 2391 2397 } 2392 2398 2393 - debugf0("2: node %d, NBCFG=0x%08x[DramEccEn: %d]\n", 2394 - nid, value, !!(value & NBCFG_ECC_ENABLE)); 2399 + edac_dbg(0, "2: node %d, NBCFG=0x%08x[DramEccEn: %d]\n", 2400 + nid, value, !!(value & NBCFG_ECC_ENABLE)); 2395 2401 2396 2402 return ret; 2397 2403 } ··· 2609 2615 2610 2616 ret = -ENODEV; 2611 2617 if (edac_mc_add_mc(mci)) { 2612 - debugf1("failed edac_mc_add_mc()\n"); 2618 + edac_dbg(1, "failed edac_mc_add_mc()\n"); 2613 2619 goto err_add_mc; 2614 2620 } 2615 2621 if (set_mc_sysfs_attrs(mci)) { 2616 - debugf1("failed edac_mc_add_mc()\n"); 2622 + edac_dbg(1, "failed edac_mc_add_mc()\n"); 2617 2623 goto err_add_sysfs; 2618 2624 } 2619 2625 ··· 2654 2660 2655 2661 ret = pci_enable_device(pdev); 2656 2662 if (ret < 0) { 2657 - debugf0("ret=%d\n", ret); 2663 + edac_dbg(0, "ret=%d\n", ret); 2658 2664 return -EIO; 2659 2665 } 2660 2666
+4 -2
drivers/edac/amd64_edac_inj.c
··· 142 142 /* Issue 'word' and 'bit' along with the READ request */ 143 143 amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_DATA, word_bits); 144 144 145 - debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); 145 + edac_dbg(0, "section=0x%x word_bits=0x%x\n", 146 + section, word_bits); 146 147 147 148 return count; 148 149 } ··· 178 177 /* Issue 'word' and 'bit' along with the READ request */ 179 178 amd64_write_pci_cfg(pvt->F3, F10_NB_ARRAY_DATA, word_bits); 180 179 181 - debugf0("section=0x%x word_bits=0x%x\n", section, word_bits); 180 + edac_dbg(0, "section=0x%x word_bits=0x%x\n", 181 + section, word_bits); 182 182 183 183 return count; 184 184 }
+7 -7
drivers/edac/amd76x_edac.c
··· 180 180 static void amd76x_check(struct mem_ctl_info *mci) 181 181 { 182 182 struct amd76x_error_info info; 183 - debugf3("\n"); 183 + edac_dbg(3, "\n"); 184 184 amd76x_get_error_info(mci, &info); 185 185 amd76x_process_error_info(mci, &info, 1); 186 186 } ··· 241 241 u32 ems_mode; 242 242 struct amd76x_error_info discard; 243 243 244 - debugf0("\n"); 244 + edac_dbg(0, "\n"); 245 245 pci_read_config_dword(pdev, AMD76X_ECC_MODE_STATUS, &ems); 246 246 ems_mode = (ems >> 10) & 0x3; 247 247 ··· 256 256 if (mci == NULL) 257 257 return -ENOMEM; 258 258 259 - debugf0("mci = %p\n", mci); 259 + edac_dbg(0, "mci = %p\n", mci); 260 260 mci->pdev = &pdev->dev; 261 261 mci->mtype_cap = MEM_FLAG_RDDR; 262 262 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; ··· 276 276 * type of memory controller. The ID is therefore hardcoded to 0. 277 277 */ 278 278 if (edac_mc_add_mc(mci)) { 279 - debugf3("failed edac_mc_add_mc()\n"); 279 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 280 280 goto fail; 281 281 } 282 282 ··· 292 292 } 293 293 294 294 /* get this far and it's successful */ 295 - debugf3("success\n"); 295 + edac_dbg(3, "success\n"); 296 296 return 0; 297 297 298 298 fail: ··· 304 304 static int __devinit amd76x_init_one(struct pci_dev *pdev, 305 305 const struct pci_device_id *ent) 306 306 { 307 - debugf0("\n"); 307 + edac_dbg(0, "\n"); 308 308 309 309 /* don't need to call pci_enable_device() */ 310 310 return amd76x_probe1(pdev, ent->driver_data); ··· 322 322 { 323 323 struct mem_ctl_info *mci; 324 324 325 - debugf0("\n"); 325 + edac_dbg(0, "\n"); 326 326 327 327 if (amd76x_pci) 328 328 edac_pci_release_generic_ctl(amd76x_pci);
+11 -11
drivers/edac/cpc925_edac.c
··· 316 316 reg += aw; 317 317 size = of_read_number(reg, sw); 318 318 reg += sw; 319 - debugf1("start 0x%lx, size 0x%lx\n", start, size); 319 + edac_dbg(1, "start 0x%lx, size 0x%lx\n", start, size); 320 320 pdata->total_mem += size; 321 321 } while (reg < reg_end); 322 322 323 323 of_node_put(np); 324 - debugf0("total_mem 0x%lx\n", pdata->total_mem); 324 + edac_dbg(0, "total_mem 0x%lx\n", pdata->total_mem); 325 325 } 326 326 327 327 static void cpc925_init_csrows(struct mem_ctl_info *mci) ··· 511 511 *offset = pa & (PAGE_SIZE - 1); 512 512 *pfn = pa >> PAGE_SHIFT; 513 513 514 - debugf0("ECC physical address 0x%lx\n", pa); 514 + edac_dbg(0, "ECC physical address 0x%lx\n", pa); 515 515 } 516 516 517 517 static int cpc925_mc_find_channel(struct mem_ctl_info *mci, u16 syndrome) ··· 851 851 goto err2; 852 852 } 853 853 854 - debugf0("Successfully added edac device for %s\n", 855 - dev_info->ctl_name); 854 + edac_dbg(0, "Successfully added edac device for %s\n", 855 + dev_info->ctl_name); 856 856 857 857 continue; 858 858 ··· 883 883 if (dev_info->exit) 884 884 dev_info->exit(dev_info); 885 885 886 - debugf0("Successfully deleted edac device for %s\n", 887 - dev_info->ctl_name); 886 + edac_dbg(0, "Successfully deleted edac device for %s\n", 887 + dev_info->ctl_name); 888 888 } 889 889 } 890 890 ··· 899 899 mscr = __raw_readl(pdata->vbase + REG_MSCR_OFFSET); 900 900 si = (mscr & MSCR_SI_MASK) >> MSCR_SI_SHIFT; 901 901 902 - debugf0("Mem Scrub Ctrl Register 0x%x\n", mscr); 902 + edac_dbg(0, "Mem Scrub Ctrl Register 0x%x\n", mscr); 903 903 904 904 if (((mscr & MSCR_SCRUB_MOD_MASK) != MSCR_BACKGR_SCRUB) || 905 905 (si == 0)) { ··· 927 927 ((mbcr & MBCR_64BITBUS_MASK) == 0)) 928 928 dual = 1; 929 929 930 - debugf0("%s channel\n", (dual > 0) ? "Dual" : "Single"); 930 + edac_dbg(0, "%s channel\n", (dual > 0) ? "Dual" : "Single"); 931 931 932 932 return dual; 933 933 } ··· 942 942 struct resource *r; 943 943 int res = 0, nr_channels; 944 944 945 - debugf0("%s platform device found!\n", pdev->name); 945 + edac_dbg(0, "%s platform device found!\n", pdev->name); 946 946 947 947 if (!devres_open_group(&pdev->dev, cpc925_probe, GFP_KERNEL)) { 948 948 res = -ENOMEM; ··· 1024 1024 cpc925_add_edac_devices(vbase); 1025 1025 1026 1026 /* get this far and it's successful */ 1027 - debugf0("success\n"); 1027 + edac_dbg(0, "success\n"); 1028 1028 1029 1029 res = 0; 1030 1030 goto out;
+19 -20
drivers/edac/e752x_edac.c
··· 309 309 u32 remap; 310 310 struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; 311 311 312 - debugf3("\n"); 312 + edac_dbg(3, "\n"); 313 313 314 314 if (page < pvt->tolm) 315 315 return page; ··· 335 335 int i; 336 336 struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; 337 337 338 - debugf3("\n"); 338 + edac_dbg(3, "\n"); 339 339 340 340 /* convert the addr to 4k page */ 341 341 page = sec1_add >> (PAGE_SHIFT - 4); ··· 394 394 int row; 395 395 struct e752x_pvt *pvt = (struct e752x_pvt *)mci->pvt_info; 396 396 397 - debugf3("\n"); 397 + edac_dbg(3, "\n"); 398 398 399 399 if (error_one & 0x0202) { 400 400 error_2b = ded_add; ··· 453 453 if (!handle_error) 454 454 return; 455 455 456 - debugf3("\n"); 456 + edac_dbg(3, "\n"); 457 457 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, 458 458 -1, -1, -1, 459 459 "e752x UE log memory write", "", NULL); ··· 982 982 { 983 983 struct e752x_error_info info; 984 984 985 - debugf3("\n"); 985 + edac_dbg(3, "\n"); 986 986 e752x_get_error_info(mci, &info); 987 987 e752x_process_error_info(mci, &info, 1); 988 988 } ··· 1102 1102 pci_read_config_byte(pdev, E752X_DRB + index, &value); 1103 1103 /* convert a 128 or 64 MiB DRB to a page size. */ 1104 1104 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); 1105 - debugf3("(%d) cumul_size 0x%x\n", index, 1106 - cumul_size); 1105 + edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); 1107 1106 if (cumul_size == last_cumul_size) 1108 1107 continue; /* not populated */ 1109 1108 ··· 1128 1129 for (i = 0; i < csrow->nr_channels; i++) { 1129 1130 struct dimm_info *dimm = csrow->channels[i]->dimm; 1130 1131 1131 - debugf3("Initializing rank at (%i,%i)\n", index, i); 1132 + edac_dbg(3, "Initializing rank at (%i,%i)\n", index, i); 1132 1133 dimm->nr_pages = nr_pages / csrow->nr_channels; 1133 1134 dimm->grain = 1 << 12; /* 4KiB - resolution of CELOG */ 1134 1135 dimm->mtype = MEM_RDDR; /* only one type supported */ ··· 1269 1270 int drc_chan; /* Number of channels 0=1chan,1=2chan */ 1270 1271 struct e752x_error_info discard; 1271 1272 1272 - debugf0("mci\n"); 1273 - debugf0("Starting Probe1\n"); 1273 + edac_dbg(0, "mci\n"); 1274 + edac_dbg(0, "Starting Probe1\n"); 1274 1275 1275 1276 /* check to see if device 0 function 1 is enabled; if it isn't, we 1276 1277 * assume the BIOS has reserved it for a reason and is expecting ··· 1300 1301 if (mci == NULL) 1301 1302 return -ENOMEM; 1302 1303 1303 - debugf3("init mci\n"); 1304 + edac_dbg(3, "init mci\n"); 1304 1305 mci->mtype_cap = MEM_FLAG_RDDR; 1305 1306 /* 3100 IMCH supports SECDEC only */ 1306 1307 mci->edac_ctl_cap = (dev_idx == I3100) ? EDAC_FLAG_SECDED : ··· 1310 1311 mci->mod_ver = E752X_REVISION; 1311 1312 mci->pdev = &pdev->dev; 1312 1313 1313 - debugf3("init pvt\n"); 1314 + edac_dbg(3, "init pvt\n"); 1314 1315 pvt = (struct e752x_pvt *)mci->pvt_info; 1315 1316 pvt->dev_info = &e752x_devs[dev_idx]; 1316 1317 pvt->mc_symmetric = ((ddrcsr & 0x10) != 0); ··· 1320 1321 return -ENODEV; 1321 1322 } 1322 1323 1323 - debugf3("more mci init\n"); 1324 + edac_dbg(3, "more mci init\n"); 1324 1325 mci->ctl_name = pvt->dev_info->ctl_name; 1325 1326 mci->dev_name = pci_name(pdev); 1326 1327 mci->edac_check = e752x_check; ··· 1342 1343 mci->edac_cap = EDAC_FLAG_SECDED; /* the only mode supported */ 1343 1344 else 1344 1345 mci->edac_cap |= EDAC_FLAG_NONE; 1345 - debugf3("tolm, remapbase, remaplimit\n"); 1346 + edac_dbg(3, "tolm, remapbase, remaplimit\n"); 1346 1347 1347 1348 /* load the top of low memory, remap base, and remap limit vars */ 1348 1349 pci_read_config_word(pdev, E752X_TOLM, &pci_data); ··· 1359 1360 * type of memory controller. The ID is therefore hardcoded to 0. 1360 1361 */ 1361 1362 if (edac_mc_add_mc(mci)) { 1362 - debugf3("failed edac_mc_add_mc()\n"); 1363 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 1363 1364 goto fail; 1364 1365 } 1365 1366 ··· 1377 1378 } 1378 1379 1379 1380 /* get this far and it's successful */ 1380 - debugf3("success\n"); 1381 + edac_dbg(3, "success\n"); 1381 1382 return 0; 1382 1383 1383 1384 fail: ··· 1393 1394 static int __devinit e752x_init_one(struct pci_dev *pdev, 1394 1395 const struct pci_device_id *ent) 1395 1396 { 1396 - debugf0("\n"); 1397 + edac_dbg(0, "\n"); 1397 1398 1398 1399 /* wake up and enable device */ 1399 1400 if (pci_enable_device(pdev) < 0) ··· 1407 1408 struct mem_ctl_info *mci; 1408 1409 struct e752x_pvt *pvt; 1409 1410 1410 - debugf0("\n"); 1411 + edac_dbg(0, "\n"); 1411 1412 1412 1413 if (e752x_pci) 1413 1414 edac_pci_release_generic_ctl(e752x_pci); ··· 1453 1454 { 1454 1455 int pci_rc; 1455 1456 1456 - debugf3("\n"); 1457 + edac_dbg(3, "\n"); 1457 1458 1458 1459 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1459 1460 opstate_init(); ··· 1464 1465 1465 1466 static void __exit e752x_exit(void) 1466 1467 { 1467 - debugf3("\n"); 1468 + edac_dbg(3, "\n"); 1468 1469 pci_unregister_driver(&e752x_driver); 1469 1470 } 1470 1471
+17 -18
drivers/edac/e7xxx_edac.c
··· 166 166 /* FIXME - is this valid for both SECDED and S4ECD4ED? */ 167 167 static inline int e7xxx_find_channel(u16 syndrome) 168 168 { 169 - debugf3("\n"); 169 + edac_dbg(3, "\n"); 170 170 171 171 if ((syndrome & 0xff00) == 0) 172 172 return 0; ··· 186 186 u32 remap; 187 187 struct e7xxx_pvt *pvt = (struct e7xxx_pvt *)mci->pvt_info; 188 188 189 - debugf3("\n"); 189 + edac_dbg(3, "\n"); 190 190 191 191 if ((page < pvt->tolm) || 192 192 ((page >= 0x100000) && (page < pvt->remapbase))) ··· 208 208 int row; 209 209 int channel; 210 210 211 - debugf3("\n"); 211 + edac_dbg(3, "\n"); 212 212 /* read the error address */ 213 213 error_1b = info->dram_celog_add; 214 214 /* FIXME - should use PAGE_SHIFT */ ··· 225 225 226 226 static void process_ce_no_info(struct mem_ctl_info *mci) 227 227 { 228 - debugf3("\n"); 228 + edac_dbg(3, "\n"); 229 229 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, 230 230 "e7xxx CE log register overflow", "", NULL); 231 231 } ··· 235 235 u32 error_2b, block_page; 236 236 int row; 237 237 238 - debugf3("\n"); 238 + edac_dbg(3, "\n"); 239 239 /* read the error address */ 240 240 error_2b = info->dram_uelog_add; 241 241 /* FIXME - should use PAGE_SHIFT */ ··· 248 248 249 249 static void process_ue_no_info(struct mem_ctl_info *mci) 250 250 { 251 - debugf3("\n"); 251 + edac_dbg(3, "\n"); 252 252 253 253 edac_mc_handle_error(HW_EVENT_ERR_UNCORRECTED, mci, 0, 0, 0, -1, -1, -1, 254 254 "e7xxx UE log register overflow", "", NULL); ··· 334 334 { 335 335 struct e7xxx_error_info info; 336 336 337 - debugf3("\n"); 337 + edac_dbg(3, "\n"); 338 338 e7xxx_get_error_info(mci, &info); 339 339 e7xxx_process_error_info(mci, &info, 1); 340 340 } ··· 383 383 pci_read_config_byte(pdev, E7XXX_DRB + index, &value); 384 384 /* convert a 64 or 32 MiB DRB to a page size. */ 385 385 cumul_size = value << (25 + drc_drbg - PAGE_SHIFT); 386 - debugf3("(%d) cumul_size 0x%x\n", index, 387 - cumul_size); 386 + edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); 388 387 if (cumul_size == last_cumul_size) 389 388 continue; /* not populated */ 390 389 ··· 429 430 int drc_chan; 430 431 struct e7xxx_error_info discard; 431 432 432 - debugf0("mci\n"); 433 + edac_dbg(0, "mci\n"); 433 434 434 435 pci_read_config_dword(pdev, E7XXX_DRC, &drc); 435 436 ··· 452 453 if (mci == NULL) 453 454 return -ENOMEM; 454 455 455 - debugf3("init mci\n"); 456 + edac_dbg(3, "init mci\n"); 456 457 mci->mtype_cap = MEM_FLAG_RDDR; 457 458 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED | 458 459 EDAC_FLAG_S4ECD4ED; ··· 460 461 mci->mod_name = EDAC_MOD_STR; 461 462 mci->mod_ver = E7XXX_REVISION; 462 463 mci->pdev = &pdev->dev; 463 - debugf3("init pvt\n"); 464 + edac_dbg(3, "init pvt\n"); 464 465 pvt = (struct e7xxx_pvt *)mci->pvt_info; 465 466 pvt->dev_info = &e7xxx_devs[dev_idx]; 466 467 pvt->bridge_ck = pci_get_device(PCI_VENDOR_ID_INTEL, ··· 473 474 goto fail0; 474 475 } 475 476 476 - debugf3("more mci init\n"); 477 + edac_dbg(3, "more mci init\n"); 477 478 mci->ctl_name = pvt->dev_info->ctl_name; 478 479 mci->dev_name = pci_name(pdev); 479 480 mci->edac_check = e7xxx_check; 480 481 mci->ctl_page_to_phys = ctl_page_to_phys; 481 482 e7xxx_init_csrows(mci, pdev, dev_idx, drc); 482 483 mci->edac_cap |= EDAC_FLAG_NONE; 483 - debugf3("tolm, remapbase, remaplimit\n"); 484 + edac_dbg(3, "tolm, remapbase, remaplimit\n"); 484 485 /* load the top of low memory, remap base, and remap limit vars */ 485 486 pci_read_config_word(pdev, E7XXX_TOLM, &pci_data); 486 487 pvt->tolm = ((u32) pci_data) << 4; ··· 499 500 * type of memory controller. The ID is therefore hardcoded to 0. 500 501 */ 501 502 if (edac_mc_add_mc(mci)) { 502 - debugf3("failed edac_mc_add_mc()\n"); 503 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 503 504 goto fail1; 504 505 } 505 506 ··· 515 516 } 516 517 517 518 /* get this far and it's successful */ 518 - debugf3("success\n"); 519 + edac_dbg(3, "success\n"); 519 520 return 0; 520 521 521 522 fail1: ··· 531 532 static int __devinit e7xxx_init_one(struct pci_dev *pdev, 532 533 const struct pci_device_id *ent) 533 534 { 534 - debugf0("\n"); 535 + edac_dbg(0, "\n"); 535 536 536 537 /* wake up and enable device */ 537 538 return pci_enable_device(pdev) ? ··· 543 544 struct mem_ctl_info *mci; 544 545 struct e7xxx_pvt *pvt; 545 546 546 - debugf0("\n"); 547 + edac_dbg(0, "\n"); 547 548 548 549 if (e7xxx_pci) 549 550 edac_pci_release_generic_ctl(e7xxx_pci);
+2 -8
drivers/edac/edac_core.h
··· 71 71 #ifdef CONFIG_EDAC_DEBUG 72 72 extern int edac_debug_level; 73 73 74 - #define edac_debug_printk(level, fmt, ...) \ 74 + #define edac_dbg(level, fmt, ...) \ 75 75 do { \ 76 76 if (level <= edac_debug_level) \ 77 77 edac_printk(KERN_DEBUG, EDAC_DEBUG, \ ··· 80 80 81 81 #else /* !CONFIG_EDAC_DEBUG */ 82 82 83 - #define edac_debug_printk(level, fmt, ...) \ 83 + #define edac_dbg(level, fmt, ...) \ 84 84 do { \ 85 85 if (0) \ 86 86 edac_printk(KERN_DEBUG, EDAC_DEBUG, \ ··· 88 88 } while (0) 89 89 90 90 #endif /* !CONFIG_EDAC_DEBUG */ 91 - 92 - #define debugf0(fmt, ...) edac_debug_printk(0, fmt, ##__VA_ARGS__) 93 - #define debugf1(fmt, ...) edac_debug_printk(1, fmt, ##__VA_ARGS__) 94 - #define debugf2(fmt, ...) edac_debug_printk(2, fmt, ##__VA_ARGS__) 95 - #define debugf3(fmt, ...) edac_debug_printk(3, fmt, ##__VA_ARGS__) 96 - #define debugf4(fmt, ...) edac_debug_printk(4, fmt, ##__VA_ARGS__) 97 91 98 92 #define PCI_VEND_DEV(vend, dev) PCI_VENDOR_ID_ ## vend, \ 99 93 PCI_DEVICE_ID_ ## vend ## _ ## dev
+22 -25
drivers/edac/edac_device.c
··· 40 40 #ifdef CONFIG_EDAC_DEBUG 41 41 static void edac_device_dump_device(struct edac_device_ctl_info *edac_dev) 42 42 { 43 - debugf3("\tedac_dev = %p dev_idx=%d \n", edac_dev, edac_dev->dev_idx); 44 - debugf4("\tedac_dev->edac_check = %p\n", edac_dev->edac_check); 45 - debugf3("\tdev = %p\n", edac_dev->dev); 46 - debugf3("\tmod_name:ctl_name = %s:%s\n", 47 - edac_dev->mod_name, edac_dev->ctl_name); 48 - debugf3("\tpvt_info = %p\n\n", edac_dev->pvt_info); 43 + edac_dbg(3, "\tedac_dev = %p dev_idx=%d\n", 44 + edac_dev, edac_dev->dev_idx); 45 + edac_dbg(4, "\tedac_dev->edac_check = %p\n", edac_dev->edac_check); 46 + edac_dbg(3, "\tdev = %p\n", edac_dev->dev); 47 + edac_dbg(3, "\tmod_name:ctl_name = %s:%s\n", 48 + edac_dev->mod_name, edac_dev->ctl_name); 49 + edac_dbg(3, "\tpvt_info = %p\n\n", edac_dev->pvt_info); 49 50 } 50 51 #endif /* CONFIG_EDAC_DEBUG */ 51 52 ··· 83 82 void *pvt, *p; 84 83 int err; 85 84 86 - debugf4("instances=%d blocks=%d\n", 87 - nr_instances, nr_blocks); 85 + edac_dbg(4, "instances=%d blocks=%d\n", nr_instances, nr_blocks); 88 86 89 87 /* Calculate the size of memory we need to allocate AND 90 88 * determine the offsets of the various item arrays ··· 156 156 /* Name of this edac device */ 157 157 snprintf(dev_ctl->name,sizeof(dev_ctl->name),"%s",edac_device_name); 158 158 159 - debugf4("edac_dev=%p next after end=%p\n", 160 - dev_ctl, pvt + sz_private ); 159 + edac_dbg(4, "edac_dev=%p next after end=%p\n", 160 + dev_ctl, pvt + sz_private); 161 161 162 162 /* Initialize every Instance */ 163 163 for (instance = 0; instance < nr_instances; instance++) { ··· 178 178 snprintf(blk->name, sizeof(blk->name), 179 179 "%s%d", edac_block_name, block+offset_value); 180 180 181 - debugf4("instance=%d inst_p=%p block=#%d " 182 - "block_p=%p name='%s'\n", 183 - instance, inst, block, 184 - blk, blk->name); 181 + edac_dbg(4, "instance=%d inst_p=%p block=#%d block_p=%p name='%s'\n", 182 + instance, inst, block, blk, blk->name); 185 183 186 184 /* if there are NO attributes OR no attribute pointer 187 185 * then continue on to next block iteration ··· 192 194 attrib_p = &dev_attrib[block*nr_instances*nr_attrib]; 193 195 blk->block_attributes = attrib_p; 194 196 195 - debugf4("THIS BLOCK_ATTRIB=%p\n", 196 - blk->block_attributes); 197 + edac_dbg(4, "THIS BLOCK_ATTRIB=%p\n", 198 + blk->block_attributes); 197 199 198 200 /* Initialize every user specified attribute in this 199 201 * block with the data the caller passed in ··· 212 214 213 215 attrib->block = blk; /* up link */ 214 216 215 - debugf4("alloc-attrib=%p attrib_name='%s' " 216 - "attrib-spec=%p spec-name=%s\n", 217 - attrib, attrib->attr.name, 218 - &attrib_spec[attr], 219 - attrib_spec[attr].attr.name 217 + edac_dbg(4, "alloc-attrib=%p attrib_name='%s' attrib-spec=%p spec-name=%s\n", 218 + attrib, attrib->attr.name, 219 + &attrib_spec[attr], 220 + attrib_spec[attr].attr.name 220 221 ); 221 222 } 222 223 } ··· 270 273 struct edac_device_ctl_info *edac_dev; 271 274 struct list_head *item; 272 275 273 - debugf0("\n"); 276 + edac_dbg(0, "\n"); 274 277 275 278 list_for_each(item, &edac_device_list) { 276 279 edac_dev = list_entry(item, struct edac_device_ctl_info, link); ··· 405 408 void edac_device_workq_setup(struct edac_device_ctl_info *edac_dev, 406 409 unsigned msec) 407 410 { 408 - debugf0("\n"); 411 + edac_dbg(0, "\n"); 409 412 410 413 /* take the arg 'msec' and set it into the control structure 411 414 * to used in the time period calculation ··· 493 496 */ 494 497 int edac_device_add_device(struct edac_device_ctl_info *edac_dev) 495 498 { 496 - debugf0("\n"); 499 + edac_dbg(0, "\n"); 497 500 498 501 #ifdef CONFIG_EDAC_DEBUG 499 502 if (edac_debug_level >= 3) ··· 567 570 { 568 571 struct edac_device_ctl_info *edac_dev; 569 572 570 - debugf0("\n"); 573 + edac_dbg(0, "\n"); 571 574 572 575 mutex_lock(&device_ctls_mutex); 573 576
+32 -38
drivers/edac/edac_device_sysfs.c
··· 202 202 { 203 203 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); 204 204 205 - debugf4("control index=%d\n", edac_dev->dev_idx); 205 + edac_dbg(4, "control index=%d\n", edac_dev->dev_idx); 206 206 207 207 /* decrement the EDAC CORE module ref count */ 208 208 module_put(edac_dev->owner); ··· 233 233 struct bus_type *edac_subsys; 234 234 int err; 235 235 236 - debugf1("\n"); 236 + edac_dbg(1, "\n"); 237 237 238 238 /* get the /sys/devices/system/edac reference */ 239 239 edac_subsys = edac_get_sysfs_subsys(); 240 240 if (edac_subsys == NULL) { 241 - debugf1("no edac_subsys error\n"); 241 + edac_dbg(1, "no edac_subsys error\n"); 242 242 err = -ENODEV; 243 243 goto err_out; 244 244 } ··· 264 264 &edac_subsys->dev_root->kobj, 265 265 "%s", edac_dev->name); 266 266 if (err) { 267 - debugf1("Failed to register '.../edac/%s'\n", 268 - edac_dev->name); 267 + edac_dbg(1, "Failed to register '.../edac/%s'\n", 268 + edac_dev->name); 269 269 goto err_kobj_reg; 270 270 } 271 271 kobject_uevent(&edac_dev->kobj, KOBJ_ADD); ··· 274 274 * edac_device_unregister_sysfs_main_kobj() must be used 275 275 */ 276 276 277 - debugf4("Registered '.../edac/%s' kobject\n", 278 - edac_dev->name); 277 + edac_dbg(4, "Registered '.../edac/%s' kobject\n", edac_dev->name); 279 278 280 279 return 0; 281 280 ··· 295 296 */ 296 297 void edac_device_unregister_sysfs_main_kobj(struct edac_device_ctl_info *dev) 297 298 { 298 - debugf0("\n"); 299 - debugf4("name of kobject is: %s\n", 300 - kobject_name(&dev->kobj)); 299 + edac_dbg(0, "\n"); 300 + edac_dbg(4, "name of kobject is: %s\n", kobject_name(&dev->kobj)); 301 301 302 302 /* 303 303 * Unregister the edac device's kobject and ··· 334 336 { 335 337 struct edac_device_instance *instance; 336 338 337 - debugf1("\n"); 339 + edac_dbg(1, "\n"); 338 340 339 341 /* map from this kobj to the main control struct 340 342 * and then dec the main kobj count ··· 440 442 { 441 443 struct edac_device_block *block; 442 444 443 - debugf1("\n"); 445 + edac_dbg(1, "\n"); 444 446 445 447 /* get the container of the kobj */ 446 448 block = to_block(kobj); ··· 522 524 struct edac_dev_sysfs_block_attribute *sysfs_attrib; 523 525 struct kobject *main_kobj; 524 526 525 - debugf4("Instance '%s' inst_p=%p block '%s' block_p=%p\n", 526 - instance->name, instance, block->name, block); 527 - debugf4("block kobj=%p block kobj->parent=%p\n", 528 - &block->kobj, &block->kobj.parent); 527 + edac_dbg(4, "Instance '%s' inst_p=%p block '%s' block_p=%p\n", 528 + instance->name, instance, block->name, block); 529 + edac_dbg(4, "block kobj=%p block kobj->parent=%p\n", 530 + &block->kobj, &block->kobj.parent); 529 531 530 532 /* init this block's kobject */ 531 533 memset(&block->kobj, 0, sizeof(struct kobject)); ··· 544 546 &instance->kobj, 545 547 "%s", block->name); 546 548 if (err) { 547 - debugf1("Failed to register instance '%s'\n", 548 - block->name); 549 + edac_dbg(1, "Failed to register instance '%s'\n", block->name); 549 550 kobject_put(main_kobj); 550 551 err = -ENODEV; 551 552 goto err_out; ··· 557 560 if (sysfs_attrib && block->nr_attribs) { 558 561 for (i = 0; i < block->nr_attribs; i++, sysfs_attrib++) { 559 562 560 - debugf4("creating block attrib='%s' " 561 - "attrib->%p to kobj=%p\n", 562 - sysfs_attrib->attr.name, 563 - sysfs_attrib, &block->kobj); 563 + edac_dbg(4, "creating block attrib='%s' attrib->%p to kobj=%p\n", 564 + sysfs_attrib->attr.name, 565 + sysfs_attrib, &block->kobj); 564 566 565 567 /* Create each block_attribute file */ 566 568 err = sysfs_create_file(&block->kobj, ··· 642 646 err = kobject_init_and_add(&instance->kobj, &ktype_instance_ctrl, 643 647 &edac_dev->kobj, "%s", instance->name); 644 648 if (err != 0) { 645 - debugf2("Failed to register instance '%s'\n", 646 - instance->name); 649 + edac_dbg(2, "Failed to register instance '%s'\n", 650 + instance->name); 647 651 kobject_put(main_kobj); 648 652 goto err_out; 649 653 } 650 654 651 - debugf4("now register '%d' blocks for instance %d\n", 652 - instance->nr_blocks, idx); 655 + edac_dbg(4, "now register '%d' blocks for instance %d\n", 656 + instance->nr_blocks, idx); 653 657 654 658 /* register all blocks of this instance */ 655 659 for (i = 0; i < instance->nr_blocks; i++) { ··· 665 669 } 666 670 kobject_uevent(&instance->kobj, KOBJ_ADD); 667 671 668 - debugf4("Registered instance %d '%s' kobject\n", 669 - idx, instance->name); 672 + edac_dbg(4, "Registered instance %d '%s' kobject\n", 673 + idx, instance->name); 670 674 671 675 return 0; 672 676 ··· 710 714 int i, j; 711 715 int err; 712 716 713 - debugf0("\n"); 717 + edac_dbg(0, "\n"); 714 718 715 719 /* iterate over creation of the instances */ 716 720 for (i = 0; i < edac_dev->nr_instances; i++) { ··· 812 816 int err; 813 817 struct kobject *edac_kobj = &edac_dev->kobj; 814 818 815 - debugf0("idx=%d\n", edac_dev->dev_idx); 819 + edac_dbg(0, "idx=%d\n", edac_dev->dev_idx); 816 820 817 821 /* go create any main attributes callers wants */ 818 822 err = edac_device_add_main_sysfs_attributes(edac_dev); 819 823 if (err) { 820 - debugf0("failed to add sysfs attribs\n"); 824 + edac_dbg(0, "failed to add sysfs attribs\n"); 821 825 goto err_out; 822 826 } 823 827 ··· 827 831 err = sysfs_create_link(edac_kobj, 828 832 &edac_dev->dev->kobj, EDAC_DEVICE_SYMLINK); 829 833 if (err) { 830 - debugf0("sysfs_create_link() returned err= %d\n", 831 - err); 834 + edac_dbg(0, "sysfs_create_link() returned err= %d\n", err); 832 835 goto err_remove_main_attribs; 833 836 } 834 837 ··· 837 842 */ 838 843 err = edac_device_create_instances(edac_dev); 839 844 if (err) { 840 - debugf0("edac_device_create_instances() " 841 - "returned err= %d\n", err); 845 + edac_dbg(0, "edac_device_create_instances() returned err= %d\n", 846 + err); 842 847 goto err_remove_link; 843 848 } 844 849 845 850 846 - debugf4("create-instances done, idx=%d\n", 847 - edac_dev->dev_idx); 851 + edac_dbg(4, "create-instances done, idx=%d\n", edac_dev->dev_idx); 848 852 849 853 return 0; 850 854 ··· 866 872 */ 867 873 void edac_device_remove_sysfs(struct edac_device_ctl_info *edac_dev) 868 874 { 869 - debugf0("\n"); 875 + edac_dbg(0, "\n"); 870 876 871 877 /* remove any main attributes for this device */ 872 878 edac_device_remove_main_sysfs_attributes(edac_dev);
+60 -61
drivers/edac/edac_mc.c
··· 46 46 47 47 static void edac_mc_dump_channel(struct rank_info *chan) 48 48 { 49 - debugf4("\tchannel = %p\n", chan); 50 - debugf4("\tchannel->chan_idx = %d\n", chan->chan_idx); 51 - debugf4("\tchannel->csrow = %p\n\n", chan->csrow); 52 - debugf4("\tchannel->dimm = %p\n", chan->dimm); 49 + edac_dbg(4, "\tchannel = %p\n", chan); 50 + edac_dbg(4, "\tchannel->chan_idx = %d\n", chan->chan_idx); 51 + edac_dbg(4, "\tchannel->csrow = %p\n", chan->csrow); 52 + edac_dbg(4, "\tchannel->dimm = %p\n", chan->dimm); 53 53 } 54 54 55 55 static void edac_mc_dump_dimm(struct dimm_info *dimm) 56 56 { 57 57 int i; 58 58 59 - debugf4("\tdimm = %p\n", dimm); 60 - debugf4("\tdimm->label = '%s'\n", dimm->label); 61 - debugf4("\tdimm->nr_pages = 0x%x\n", dimm->nr_pages); 62 - debugf4("\tdimm location "); 59 + edac_dbg(4, "\tdimm = %p\n", dimm); 60 + edac_dbg(4, "\tdimm->label = '%s'\n", dimm->label); 61 + edac_dbg(4, "\tdimm->nr_pages = 0x%x\n", dimm->nr_pages); 62 + edac_dbg(4, "\tdimm location "); 63 63 for (i = 0; i < dimm->mci->n_layers; i++) { 64 64 printk(KERN_CONT "%d", dimm->location[i]); 65 65 if (i < dimm->mci->n_layers - 1) 66 66 printk(KERN_CONT "."); 67 67 } 68 68 printk(KERN_CONT "\n"); 69 - debugf4("\tdimm->grain = %d\n", dimm->grain); 70 - debugf4("\tdimm->nr_pages = 0x%x\n", dimm->nr_pages); 69 + edac_dbg(4, "\tdimm->grain = %d\n", dimm->grain); 70 + edac_dbg(4, "\tdimm->nr_pages = 0x%x\n", dimm->nr_pages); 71 71 } 72 72 73 73 static void edac_mc_dump_csrow(struct csrow_info *csrow) 74 74 { 75 - debugf4("\tcsrow = %p\n", csrow); 76 - debugf4("\tcsrow->csrow_idx = %d\n", csrow->csrow_idx); 77 - debugf4("\tcsrow->first_page = 0x%lx\n", csrow->first_page); 78 - debugf4("\tcsrow->last_page = 0x%lx\n", csrow->last_page); 79 - debugf4("\tcsrow->page_mask = 0x%lx\n", csrow->page_mask); 80 - debugf4("\tcsrow->nr_channels = %d\n", csrow->nr_channels); 81 - debugf4("\tcsrow->channels = %p\n", csrow->channels); 82 - debugf4("\tcsrow->mci = %p\n\n", csrow->mci); 75 + edac_dbg(4, "\tcsrow = %p\n", csrow); 76 + edac_dbg(4, "\tcsrow->csrow_idx = %d\n", csrow->csrow_idx); 77 + edac_dbg(4, "\tcsrow->first_page = 0x%lx\n", csrow->first_page); 78 + edac_dbg(4, "\tcsrow->last_page = 0x%lx\n", csrow->last_page); 79 + edac_dbg(4, "\tcsrow->page_mask = 0x%lx\n", csrow->page_mask); 80 + edac_dbg(4, "\tcsrow->nr_channels = %d\n", csrow->nr_channels); 81 + edac_dbg(4, "\tcsrow->channels = %p\n", csrow->channels); 82 + edac_dbg(4, "\tcsrow->mci = %p\n", csrow->mci); 83 83 } 84 84 85 85 static void edac_mc_dump_mci(struct mem_ctl_info *mci) 86 86 { 87 - debugf3("\tmci = %p\n", mci); 88 - debugf3("\tmci->mtype_cap = %lx\n", mci->mtype_cap); 89 - debugf3("\tmci->edac_ctl_cap = %lx\n", mci->edac_ctl_cap); 90 - debugf3("\tmci->edac_cap = %lx\n", mci->edac_cap); 91 - debugf4("\tmci->edac_check = %p\n", mci->edac_check); 92 - debugf3("\tmci->nr_csrows = %d, csrows = %p\n", 93 - mci->nr_csrows, mci->csrows); 94 - debugf3("\tmci->nr_dimms = %d, dimms = %p\n", 95 - mci->tot_dimms, mci->dimms); 96 - debugf3("\tdev = %p\n", mci->pdev); 97 - debugf3("\tmod_name:ctl_name = %s:%s\n", mci->mod_name, mci->ctl_name); 98 - debugf3("\tpvt_info = %p\n\n", mci->pvt_info); 87 + edac_dbg(3, "\tmci = %p\n", mci); 88 + edac_dbg(3, "\tmci->mtype_cap = %lx\n", mci->mtype_cap); 89 + edac_dbg(3, "\tmci->edac_ctl_cap = %lx\n", mci->edac_ctl_cap); 90 + edac_dbg(3, "\tmci->edac_cap = %lx\n", mci->edac_cap); 91 + edac_dbg(4, "\tmci->edac_check = %p\n", mci->edac_check); 92 + edac_dbg(3, "\tmci->nr_csrows = %d, csrows = %p\n", 93 + mci->nr_csrows, mci->csrows); 94 + edac_dbg(3, "\tmci->nr_dimms = %d, dimms = %p\n", 95 + mci->tot_dimms, mci->dimms); 96 + edac_dbg(3, "\tdev = %p\n", mci->pdev); 97 + edac_dbg(3, "\tmod_name:ctl_name = %s:%s\n", 98 + mci->mod_name, mci->ctl_name); 99 + edac_dbg(3, "\tpvt_info = %p\n\n", mci->pvt_info); 99 100 } 100 101 101 102 #endif /* CONFIG_EDAC_DEBUG */ ··· 247 246 layer = edac_align_ptr(&ptr, sizeof(*layer), n_layers); 248 247 for (i = 0; i < n_layers; i++) { 249 248 count *= layers[i].size; 250 - debugf4("errcount layer %d size %d\n", i, count); 249 + edac_dbg(4, "errcount layer %d size %d\n", i, count); 251 250 ce_per_layer[i] = edac_align_ptr(&ptr, sizeof(u32), count); 252 251 ue_per_layer[i] = edac_align_ptr(&ptr, sizeof(u32), count); 253 252 tot_errcount += 2 * count; 254 253 } 255 254 256 - debugf4("allocating %d error counters\n", tot_errcount); 255 + edac_dbg(4, "allocating %d error counters\n", tot_errcount); 257 256 pvt = edac_align_ptr(&ptr, sz_pvt, 1); 258 257 size = ((unsigned long)pvt) + sz_pvt; 259 258 260 - debugf1("allocating %u bytes for mci data (%d %s, %d csrows/channels)\n", 261 - size, 262 - tot_dimms, 263 - per_rank ? "ranks" : "dimms", 264 - tot_csrows * tot_channels); 259 + edac_dbg(1, "allocating %u bytes for mci data (%d %s, %d csrows/channels)\n", 260 + size, 261 + tot_dimms, 262 + per_rank ? "ranks" : "dimms", 263 + tot_csrows * tot_channels); 265 264 266 265 mci = kzalloc(size, GFP_KERNEL); 267 266 if (mci == NULL) ··· 327 326 memset(&pos, 0, sizeof(pos)); 328 327 row = 0; 329 328 chn = 0; 330 - debugf4("initializing %d %s\n", tot_dimms, 331 - per_rank ? "ranks" : "dimms"); 329 + edac_dbg(4, "initializing %d %s\n", 330 + tot_dimms, per_rank ? "ranks" : "dimms"); 332 331 for (i = 0; i < tot_dimms; i++) { 333 332 chan = mci->csrows[row]->channels[chn]; 334 333 off = EDAC_DIMM_OFF(layer, n_layers, pos[0], pos[1], pos[2]); ··· 341 340 mci->dimms[off] = dimm; 342 341 dimm->mci = mci; 343 342 344 - debugf2("%d: %s%i (%d:%d:%d): row %d, chan %d\n", i, 345 - per_rank ? "rank" : "dimm", off, 346 - pos[0], pos[1], pos[2], row, chn); 343 + edac_dbg(2, "%d: %s%i (%d:%d:%d): row %d, chan %d\n", 344 + i, per_rank ? "rank" : "dimm", off, 345 + pos[0], pos[1], pos[2], row, chn); 347 346 348 347 /* 349 348 * Copy DIMM location and initialize it. ··· 428 427 */ 429 428 void edac_mc_free(struct mem_ctl_info *mci) 430 429 { 431 - debugf1("\n"); 430 + edac_dbg(1, "\n"); 432 431 433 432 /* the mci instance is freed here, when the sysfs object is dropped */ 434 433 edac_unregister_sysfs(mci); ··· 448 447 struct mem_ctl_info *mci; 449 448 struct list_head *item; 450 449 451 - debugf3("\n"); 450 + edac_dbg(3, "\n"); 452 451 453 452 list_for_each(item, &mc_devices) { 454 453 mci = list_entry(item, struct mem_ctl_info, link); ··· 516 515 */ 517 516 static void edac_mc_workq_setup(struct mem_ctl_info *mci, unsigned msec) 518 517 { 519 - debugf0("\n"); 518 + edac_dbg(0, "\n"); 520 519 521 520 /* if this instance is not in the POLL state, then simply return */ 522 521 if (mci->op_state != OP_RUNNING_POLL) ··· 543 542 544 543 status = cancel_delayed_work(&mci->work); 545 544 if (status == 0) { 546 - debugf0("not canceled, flush the queue\n"); 545 + edac_dbg(0, "not canceled, flush the queue\n"); 547 546 548 547 /* workq instance might be running, wait for it */ 549 548 flush_workqueue(edac_workqueue); ··· 690 689 /* FIXME - should a warning be printed if no error detection? correction? */ 691 690 int edac_mc_add_mc(struct mem_ctl_info *mci) 692 691 { 693 - debugf0("\n"); 692 + edac_dbg(0, "\n"); 694 693 695 694 #ifdef CONFIG_EDAC_DEBUG 696 695 if (edac_debug_level >= 3) ··· 761 760 { 762 761 struct mem_ctl_info *mci; 763 762 764 - debugf0("\n"); 763 + edac_dbg(0, "\n"); 765 764 766 765 mutex_lock(&mem_ctls_mutex); 767 766 ··· 799 798 void *virt_addr; 800 799 unsigned long flags = 0; 801 800 802 - debugf3("\n"); 801 + edac_dbg(3, "\n"); 803 802 804 803 /* ECC error page was not in our memory. Ignore it. */ 805 804 if (!pfn_valid(page)) ··· 829 828 struct csrow_info **csrows = mci->csrows; 830 829 int row, i, j, n; 831 830 832 - debugf1("MC%d: 0x%lx\n", mci->mc_idx, page); 831 + edac_dbg(1, "MC%d: 0x%lx\n", mci->mc_idx, page); 833 832 row = -1; 834 833 835 834 for (i = 0; i < mci->nr_csrows; i++) { ··· 842 841 if (n == 0) 843 842 continue; 844 843 845 - debugf3("MC%d: first(0x%lx) page(0x%lx) last(0x%lx) " 846 - "mask(0x%lx)\n", mci->mc_idx, 847 - csrow->first_page, page, csrow->last_page, 848 - csrow->page_mask); 844 + edac_dbg(3, "MC%d: first(0x%lx) page(0x%lx) last(0x%lx) mask(0x%lx)\n", 845 + mci->mc_idx, 846 + csrow->first_page, page, csrow->last_page, 847 + csrow->page_mask); 849 848 850 849 if ((page >= csrow->first_page) && 851 850 (page <= csrow->last_page) && ··· 1049 1048 u16 error_count; /* FIXME: make it a parameter */ 1050 1049 u8 grain_bits; 1051 1050 1052 - debugf3("MC%d\n", mci->mc_idx); 1051 + edac_dbg(3, "MC%d\n", mci->mc_idx); 1053 1052 1054 1053 /* 1055 1054 * Check if the event report is consistent and if the memory ··· 1127 1126 * get csrow/channel of the DIMM, in order to allow 1128 1127 * incrementing the compat API counters 1129 1128 */ 1130 - debugf4("%s csrows map: (%d,%d)\n", 1131 - mci->mem_is_per_rank ? "rank" : "dimm", 1132 - dimm->csrow, dimm->cschannel); 1133 - 1129 + edac_dbg(4, "%s csrows map: (%d,%d)\n", 1130 + mci->mem_is_per_rank ? "rank" : "dimm", 1131 + dimm->csrow, dimm->cschannel); 1134 1132 if (row == -1) 1135 1133 row = dimm->csrow; 1136 1134 else if (row >= 0 && row != dimm->csrow) ··· 1145 1145 if (!enable_per_layer_report) { 1146 1146 strcpy(label, "any memory"); 1147 1147 } else { 1148 - debugf4("csrow/channel to increment: (%d,%d)\n", 1149 - row, chan); 1148 + edac_dbg(4, "csrow/channel to increment: (%d,%d)\n", row, chan); 1150 1149 if (p == label) 1151 1150 strcpy(label, "unknown memory"); 1152 1151 if (type == HW_EVENT_ERR_CORRECTED) {
+18 -19
drivers/edac/edac_mc_sysfs.c
··· 287 287 { 288 288 struct csrow_info *csrow = container_of(dev, struct csrow_info, dev); 289 289 290 - debugf1("Releasing csrow device %s\n", dev_name(dev)); 290 + edac_dbg(1, "Releasing csrow device %s\n", dev_name(dev)); 291 291 kfree(csrow); 292 292 } 293 293 ··· 376 376 dev_set_name(&csrow->dev, "csrow%d", index); 377 377 dev_set_drvdata(&csrow->dev, csrow); 378 378 379 - debugf0("creating (virtual) csrow node %s\n", dev_name(&csrow->dev)); 379 + edac_dbg(0, "creating (virtual) csrow node %s\n", 380 + dev_name(&csrow->dev)); 380 381 381 382 err = device_add(&csrow->dev); 382 383 if (err < 0) ··· 461 460 for (chan = csrow->nr_channels - 1; chan >= 0; chan--) { 462 461 if (!csrow->channels[chan]->dimm->nr_pages) 463 462 continue; 464 - debugf1("Removing csrow %d channel %d sysfs nodes\n", 465 - i, chan); 463 + edac_dbg(1, "Removing csrow %d channel %d sysfs nodes\n", 464 + i, chan); 466 465 device_remove_file(&csrow->dev, 467 466 dynamic_csrow_dimm_attr[chan]); 468 467 device_remove_file(&csrow->dev, ··· 592 591 { 593 592 struct dimm_info *dimm = container_of(dev, struct dimm_info, dev); 594 593 595 - debugf1("Releasing dimm device %s\n", dev_name(dev)); 594 + edac_dbg(1, "Releasing dimm device %s\n", dev_name(dev)); 596 595 kfree(dimm); 597 596 } 598 597 ··· 623 622 624 623 err = device_add(&dimm->dev); 625 624 626 - debugf0("creating rank/dimm device %s\n", dev_name(&dimm->dev)); 625 + edac_dbg(0, "creating rank/dimm device %s\n", dev_name(&dimm->dev)); 627 626 628 627 return err; 629 628 } ··· 898 897 { 899 898 struct mem_ctl_info *mci = container_of(dev, struct mem_ctl_info, dev); 900 899 901 - debugf1("Releasing csrow device %s\n", dev_name(dev)); 900 + edac_dbg(1, "Releasing csrow device %s\n", dev_name(dev)); 902 901 kfree(mci); 903 902 } 904 903 ··· 965 964 mci->bus.name = kasprintf(GFP_KERNEL, "mc%d", mci->mc_idx); 966 965 if (!mci->bus.name) 967 966 return -ENOMEM; 968 - debugf0("creating bus %s\n",mci->bus.name); 967 + edac_dbg(0, "creating bus %s\n", mci->bus.name); 969 968 err = bus_register(&mci->bus); 970 969 if (err < 0) 971 970 return err; ··· 980 979 dev_set_drvdata(&mci->dev, mci); 981 980 pm_runtime_forbid(&mci->dev); 982 981 983 - debugf0("creating device %s\n", dev_name(&mci->dev)); 982 + edac_dbg(0, "creating device %s\n", dev_name(&mci->dev)); 984 983 err = device_add(&mci->dev); 985 984 if (err < 0) { 986 985 bus_unregister(&mci->bus); ··· 997 996 if (dimm->nr_pages == 0) 998 997 continue; 999 998 #ifdef CONFIG_EDAC_DEBUG 1000 - debugf1("creating dimm%d, located at ", 1001 - i); 999 + edac_dbg(1, "creating dimm%d, located at ", i); 1002 1000 if (edac_debug_level >= 1) { 1003 1001 int lay; 1004 1002 for (lay = 0; lay < mci->n_layers; lay++) ··· 1009 1009 #endif 1010 1010 err = edac_create_dimm_object(mci, dimm, i); 1011 1011 if (err) { 1012 - debugf1("failure: create dimm %d obj\n", 1013 - i); 1012 + edac_dbg(1, "failure: create dimm %d obj\n", i); 1014 1013 goto fail; 1015 1014 } 1016 1015 } ··· 1047 1048 { 1048 1049 int i; 1049 1050 1050 - debugf0("\n"); 1051 + edac_dbg(0, "\n"); 1051 1052 1052 1053 #ifdef CONFIG_EDAC_DEBUG 1053 1054 debugfs_remove(mci->debugfs); ··· 1060 1061 struct dimm_info *dimm = mci->dimms[i]; 1061 1062 if (dimm->nr_pages == 0) 1062 1063 continue; 1063 - debugf0("removing device %s\n", dev_name(&dimm->dev)); 1064 + edac_dbg(0, "removing device %s\n", dev_name(&dimm->dev)); 1064 1065 put_device(&dimm->dev); 1065 1066 device_del(&dimm->dev); 1066 1067 } ··· 1068 1069 1069 1070 void edac_unregister_sysfs(struct mem_ctl_info *mci) 1070 1071 { 1071 - debugf1("Unregistering device %s\n", dev_name(&mci->dev)); 1072 + edac_dbg(1, "Unregistering device %s\n", dev_name(&mci->dev)); 1072 1073 put_device(&mci->dev); 1073 1074 device_del(&mci->dev); 1074 1075 bus_unregister(&mci->bus); ··· 1082 1083 * parent device, used to create the /sys/devices/mc sysfs node. 1083 1084 * So, there are no attributes on it. 1084 1085 */ 1085 - debugf1("Releasing device %s\n", dev_name(dev)); 1086 + edac_dbg(1, "Releasing device %s\n", dev_name(dev)); 1086 1087 kfree(dev); 1087 1088 } 1088 1089 ··· 1100 1101 /* get the /sys/devices/system/edac subsys reference */ 1101 1102 edac_subsys = edac_get_sysfs_subsys(); 1102 1103 if (edac_subsys == NULL) { 1103 - debugf1("no edac_subsys\n"); 1104 + edac_dbg(1, "no edac_subsys\n"); 1104 1105 return -EINVAL; 1105 1106 } 1106 1107 ··· 1115 1116 if (err < 0) 1116 1117 return err; 1117 1118 1118 - debugf0("device %s created\n", dev_name(mci_pdev)); 1119 + edac_dbg(0, "device %s created\n", dev_name(mci_pdev)); 1119 1120 1120 1121 return 0; 1121 1122 }
+1 -1
drivers/edac/edac_module.c
··· 113 113 */ 114 114 static void __exit edac_exit(void) 115 115 { 116 - debugf0("\n"); 116 + edac_dbg(0, "\n"); 117 117 118 118 /* tear down the various subsystems */ 119 119 edac_workqueue_teardown();
+13 -13
drivers/edac/edac_pci.c
··· 45 45 void *p = NULL, *pvt; 46 46 unsigned int size; 47 47 48 - debugf1("\n"); 48 + edac_dbg(1, "\n"); 49 49 50 50 pci = edac_align_ptr(&p, sizeof(*pci), 1); 51 51 pvt = edac_align_ptr(&p, 1, sz_pvt); ··· 80 80 */ 81 81 void edac_pci_free_ctl_info(struct edac_pci_ctl_info *pci) 82 82 { 83 - debugf1("\n"); 83 + edac_dbg(1, "\n"); 84 84 85 85 edac_pci_remove_sysfs(pci); 86 86 } ··· 97 97 struct edac_pci_ctl_info *pci; 98 98 struct list_head *item; 99 99 100 - debugf1("\n"); 100 + edac_dbg(1, "\n"); 101 101 102 102 list_for_each(item, &edac_pci_list) { 103 103 pci = list_entry(item, struct edac_pci_ctl_info, link); ··· 122 122 struct list_head *item, *insert_before; 123 123 struct edac_pci_ctl_info *rover; 124 124 125 - debugf1("\n"); 125 + edac_dbg(1, "\n"); 126 126 127 127 insert_before = &edac_pci_list; 128 128 ··· 226 226 int msec; 227 227 unsigned long delay; 228 228 229 - debugf3("checking\n"); 229 + edac_dbg(3, "checking\n"); 230 230 231 231 mutex_lock(&edac_pci_ctls_mutex); 232 232 ··· 261 261 static void edac_pci_workq_setup(struct edac_pci_ctl_info *pci, 262 262 unsigned int msec) 263 263 { 264 - debugf0("\n"); 264 + edac_dbg(0, "\n"); 265 265 266 266 INIT_DELAYED_WORK(&pci->work, edac_pci_workq_function); 267 267 queue_delayed_work(edac_workqueue, &pci->work, ··· 276 276 { 277 277 int status; 278 278 279 - debugf0("\n"); 279 + edac_dbg(0, "\n"); 280 280 281 281 status = cancel_delayed_work(&pci->work); 282 282 if (status == 0) ··· 293 293 void edac_pci_reset_delay_period(struct edac_pci_ctl_info *pci, 294 294 unsigned long value) 295 295 { 296 - debugf0("\n"); 296 + edac_dbg(0, "\n"); 297 297 298 298 edac_pci_workq_teardown(pci); 299 299 ··· 333 333 */ 334 334 int edac_pci_add_device(struct edac_pci_ctl_info *pci, int edac_idx) 335 335 { 336 - debugf0("\n"); 336 + edac_dbg(0, "\n"); 337 337 338 338 pci->pci_idx = edac_idx; 339 339 pci->start_time = jiffies; ··· 393 393 { 394 394 struct edac_pci_ctl_info *pci; 395 395 396 - debugf0("\n"); 396 + edac_dbg(0, "\n"); 397 397 398 398 mutex_lock(&edac_pci_ctls_mutex); 399 399 ··· 430 430 */ 431 431 static void edac_pci_generic_check(struct edac_pci_ctl_info *pci) 432 432 { 433 - debugf4("\n"); 433 + edac_dbg(4, "\n"); 434 434 edac_pci_do_parity_check(); 435 435 } 436 436 ··· 475 475 pdata->edac_idx = edac_pci_idx++; 476 476 477 477 if (edac_pci_add_device(pci, pdata->edac_idx) > 0) { 478 - debugf3("failed edac_pci_add_device()\n"); 478 + edac_dbg(3, "failed edac_pci_add_device()\n"); 479 479 edac_pci_free_ctl_info(pci); 480 480 return NULL; 481 481 } ··· 491 491 */ 492 492 void edac_pci_release_generic_ctl(struct edac_pci_ctl_info *pci) 493 493 { 494 - debugf0("pci mod=%s\n", pci->mod_name); 494 + edac_dbg(0, "pci mod=%s\n", pci->mod_name); 495 495 496 496 edac_pci_del_device(pci->dev); 497 497 edac_pci_free_ctl_info(pci);
+24 -24
drivers/edac/edac_pci_sysfs.c
··· 78 78 { 79 79 struct edac_pci_ctl_info *pci; 80 80 81 - debugf0("\n"); 81 + edac_dbg(0, "\n"); 82 82 83 83 /* Form pointer to containing struct, the pci control struct */ 84 84 pci = to_instance(kobj); ··· 161 161 struct kobject *main_kobj; 162 162 int err; 163 163 164 - debugf0("\n"); 164 + edac_dbg(0, "\n"); 165 165 166 166 /* First bump the ref count on the top main kobj, which will 167 167 * track the number of PCI instances we have, and thus nest ··· 177 177 err = kobject_init_and_add(&pci->kobj, &ktype_pci_instance, 178 178 edac_pci_top_main_kobj, "pci%d", idx); 179 179 if (err != 0) { 180 - debugf2("failed to register instance pci%d\n", 181 - idx); 180 + edac_dbg(2, "failed to register instance pci%d\n", idx); 182 181 kobject_put(edac_pci_top_main_kobj); 183 182 goto error_out; 184 183 } 185 184 186 185 kobject_uevent(&pci->kobj, KOBJ_ADD); 187 - debugf1("Register instance 'pci%d' kobject\n", idx); 186 + edac_dbg(1, "Register instance 'pci%d' kobject\n", idx); 188 187 189 188 return 0; 190 189 ··· 200 201 static void edac_pci_unregister_sysfs_instance_kobj( 201 202 struct edac_pci_ctl_info *pci) 202 203 { 203 - debugf0("\n"); 204 + edac_dbg(0, "\n"); 204 205 205 206 /* Unregister the instance kobject and allow its release 206 207 * function release the main reference count and then ··· 316 317 */ 317 318 static void edac_pci_release_main_kobj(struct kobject *kobj) 318 319 { 319 - debugf0("here to module_put(THIS_MODULE)\n"); 320 + edac_dbg(0, "here to module_put(THIS_MODULE)\n"); 320 321 321 322 kfree(kobj); 322 323 ··· 344 345 int err; 345 346 struct bus_type *edac_subsys; 346 347 347 - debugf0("\n"); 348 + edac_dbg(0, "\n"); 348 349 349 350 /* check and count if we have already created the main kobject */ 350 351 if (atomic_inc_return(&edac_pci_sysfs_refcount) != 1) ··· 355 356 */ 356 357 edac_subsys = edac_get_sysfs_subsys(); 357 358 if (edac_subsys == NULL) { 358 - debugf1("no edac_subsys\n"); 359 + edac_dbg(1, "no edac_subsys\n"); 359 360 err = -ENODEV; 360 361 goto decrement_count_fail; 361 362 } ··· 365 366 * level main kobj for EDAC PCI 366 367 */ 367 368 if (!try_module_get(THIS_MODULE)) { 368 - debugf1("try_module_get() failed\n"); 369 + edac_dbg(1, "try_module_get() failed\n"); 369 370 err = -ENODEV; 370 371 goto mod_get_fail; 371 372 } 372 373 373 374 edac_pci_top_main_kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL); 374 375 if (!edac_pci_top_main_kobj) { 375 - debugf1("Failed to allocate\n"); 376 + edac_dbg(1, "Failed to allocate\n"); 376 377 err = -ENOMEM; 377 378 goto kzalloc_fail; 378 379 } ··· 382 383 &ktype_edac_pci_main_kobj, 383 384 &edac_subsys->dev_root->kobj, "pci"); 384 385 if (err) { 385 - debugf1("Failed to register '.../edac/pci'\n"); 386 + edac_dbg(1, "Failed to register '.../edac/pci'\n"); 386 387 goto kobject_init_and_add_fail; 387 388 } 388 389 ··· 391 392 * must be used, for resources to be cleaned up properly 392 393 */ 393 394 kobject_uevent(edac_pci_top_main_kobj, KOBJ_ADD); 394 - debugf1("Registered '.../edac/pci' kobject\n"); 395 + edac_dbg(1, "Registered '.../edac/pci' kobject\n"); 395 396 396 397 return 0; 397 398 ··· 420 421 */ 421 422 static void edac_pci_main_kobj_teardown(void) 422 423 { 423 - debugf0("\n"); 424 + edac_dbg(0, "\n"); 424 425 425 426 /* Decrement the count and only if no more controller instances 426 427 * are connected perform the unregisteration of the top level 427 428 * main kobj 428 429 */ 429 430 if (atomic_dec_return(&edac_pci_sysfs_refcount) == 0) { 430 - debugf0("called kobject_put on main kobj\n"); 431 + edac_dbg(0, "called kobject_put on main kobj\n"); 431 432 kobject_put(edac_pci_top_main_kobj); 432 433 } 433 434 edac_put_sysfs_subsys(); ··· 444 445 int err; 445 446 struct kobject *edac_kobj = &pci->kobj; 446 447 447 - debugf0("idx=%d\n", pci->pci_idx); 448 + edac_dbg(0, "idx=%d\n", pci->pci_idx); 448 449 449 450 /* create the top main EDAC PCI kobject, IF needed */ 450 451 err = edac_pci_main_kobj_setup(); ··· 458 459 459 460 err = sysfs_create_link(edac_kobj, &pci->dev->kobj, EDAC_PCI_SYMLINK); 460 461 if (err) { 461 - debugf0("sysfs_create_link() returned err= %d\n", 462 - err); 462 + edac_dbg(0, "sysfs_create_link() returned err= %d\n", err); 463 463 goto symlink_fail; 464 464 } 465 465 ··· 481 483 */ 482 484 void edac_pci_remove_sysfs(struct edac_pci_ctl_info *pci) 483 485 { 484 - debugf0("index=%d\n", pci->pci_idx); 486 + edac_dbg(0, "index=%d\n", pci->pci_idx); 485 487 486 488 /* Remove the symlink */ 487 489 sysfs_remove_link(&pci->kobj, EDAC_PCI_SYMLINK); ··· 493 495 * if this 'pci' is the last instance. 494 496 * If it is, the main kobject will be unregistered as a result 495 497 */ 496 - debugf0("calling edac_pci_main_kobj_teardown()\n"); 498 + edac_dbg(0, "calling edac_pci_main_kobj_teardown()\n"); 497 499 edac_pci_main_kobj_teardown(); 498 500 } 499 501 ··· 569 571 570 572 local_irq_restore(flags); 571 573 572 - debugf4("PCI STATUS= 0x%04x %s\n", status, dev_name(&dev->dev)); 574 + edac_dbg(4, "PCI STATUS= 0x%04x %s\n", status, dev_name(&dev->dev)); 573 575 574 576 /* check the status reg for errors on boards NOT marked as broken 575 577 * if broken, we cannot trust any of the status bits ··· 600 602 } 601 603 602 604 603 - debugf4("PCI HEADER TYPE= 0x%02x %s\n", header_type, dev_name(&dev->dev)); 605 + edac_dbg(4, "PCI HEADER TYPE= 0x%02x %s\n", 606 + header_type, dev_name(&dev->dev)); 604 607 605 608 if ((header_type & 0x7F) == PCI_HEADER_TYPE_BRIDGE) { 606 609 /* On bridges, need to examine secondary status register */ 607 610 status = get_pci_parity_status(dev, 1); 608 611 609 - debugf4("PCI SEC_STATUS= 0x%04x %s\n", status, dev_name(&dev->dev)); 612 + edac_dbg(4, "PCI SEC_STATUS= 0x%04x %s\n", 613 + status, dev_name(&dev->dev)); 610 614 611 615 /* check the secondary status reg for errors, 612 616 * on NOT broken boards ··· 670 670 { 671 671 int before_count; 672 672 673 - debugf3("\n"); 673 + edac_dbg(3, "\n"); 674 674 675 675 /* if policy has PCI check off, leave now */ 676 676 if (!check_pci_errors)
+12 -13
drivers/edac/i3000_edac.c
··· 275 275 { 276 276 struct i3000_error_info info; 277 277 278 - debugf1("MC%d\n", mci->mc_idx); 278 + edac_dbg(1, "MC%d\n", mci->mc_idx); 279 279 i3000_get_error_info(mci, &info); 280 280 i3000_process_error_info(mci, &info, 1); 281 281 } ··· 322 322 unsigned long mchbar; 323 323 void __iomem *window; 324 324 325 - debugf0("MC:\n"); 325 + edac_dbg(0, "MC:\n"); 326 326 327 327 pci_read_config_dword(pdev, I3000_MCHBAR, (u32 *) & mchbar); 328 328 mchbar &= I3000_MCHBAR_MASK; ··· 366 366 if (!mci) 367 367 return -ENOMEM; 368 368 369 - debugf3("MC: init mci\n"); 369 + edac_dbg(3, "MC: init mci\n"); 370 370 371 371 mci->pdev = &pdev->dev; 372 372 mci->mtype_cap = MEM_FLAG_DDR2; ··· 399 399 cumul_size = value << (I3000_DRB_SHIFT - PAGE_SHIFT); 400 400 if (interleaved) 401 401 cumul_size <<= 1; 402 - debugf3("MC: (%d) cumul_size 0x%x\n", 403 - i, cumul_size); 402 + edac_dbg(3, "MC: (%d) cumul_size 0x%x\n", i, cumul_size); 404 403 if (cumul_size == last_cumul_size) 405 404 continue; 406 405 ··· 428 429 429 430 rc = -ENODEV; 430 431 if (edac_mc_add_mc(mci)) { 431 - debugf3("MC: failed edac_mc_add_mc()\n"); 432 + edac_dbg(3, "MC: failed edac_mc_add_mc()\n"); 432 433 goto fail; 433 434 } 434 435 ··· 444 445 } 445 446 446 447 /* get this far and it's successful */ 447 - debugf3("MC: success\n"); 448 + edac_dbg(3, "MC: success\n"); 448 449 return 0; 449 450 450 451 fail: ··· 460 461 { 461 462 int rc; 462 463 463 - debugf0("MC:\n"); 464 + edac_dbg(0, "MC:\n"); 464 465 465 466 if (pci_enable_device(pdev) < 0) 466 467 return -EIO; ··· 476 477 { 477 478 struct mem_ctl_info *mci; 478 479 479 - debugf0("\n"); 480 + edac_dbg(0, "\n"); 480 481 481 482 if (i3000_pci) 482 483 edac_pci_release_generic_ctl(i3000_pci); ··· 510 511 { 511 512 int pci_rc; 512 513 513 - debugf3("MC:\n"); 514 + edac_dbg(3, "MC:\n"); 514 515 515 516 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 516 517 opstate_init(); ··· 524 525 mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 525 526 PCI_DEVICE_ID_INTEL_3000_HB, NULL); 526 527 if (!mci_pdev) { 527 - debugf0("i3000 pci_get_device fail\n"); 528 + edac_dbg(0, "i3000 pci_get_device fail\n"); 528 529 pci_rc = -ENODEV; 529 530 goto fail1; 530 531 } 531 532 532 533 pci_rc = i3000_init_one(mci_pdev, i3000_pci_tbl); 533 534 if (pci_rc < 0) { 534 - debugf0("i3000 init fail\n"); 535 + edac_dbg(0, "i3000 init fail\n"); 535 536 pci_rc = -ENODEV; 536 537 goto fail1; 537 538 } ··· 551 552 552 553 static void __exit i3000_exit(void) 553 554 { 554 - debugf3("MC:\n"); 555 + edac_dbg(3, "MC:\n"); 555 556 556 557 pci_unregister_driver(&i3000_driver); 557 558 if (!i3000_registered) {
+13 -13
drivers/edac/i3200_edac.c
··· 110 110 111 111 pci_read_config_byte(pdev, I3200_CAPID0 + 8, &capid0_8b); 112 112 if (capid0_8b & 0x20) { /* check DCD: Dual Channel Disable */ 113 - debugf0("In single channel mode.\n"); 113 + edac_dbg(0, "In single channel mode\n"); 114 114 return 1; 115 115 } else { 116 - debugf0("In dual channel mode.\n"); 116 + edac_dbg(0, "In dual channel mode\n"); 117 117 return 2; 118 118 } 119 119 } ··· 245 245 { 246 246 struct i3200_error_info info; 247 247 248 - debugf1("MC%d\n", mci->mc_idx); 248 + edac_dbg(1, "MC%d\n", mci->mc_idx); 249 249 i3200_get_and_clear_error_info(mci, &info); 250 250 i3200_process_error_info(mci, &info); 251 251 } ··· 332 332 void __iomem *window; 333 333 struct i3200_priv *priv; 334 334 335 - debugf0("MC:\n"); 335 + edac_dbg(0, "MC:\n"); 336 336 337 337 window = i3200_map_mchbar(pdev); 338 338 if (!window) ··· 352 352 if (!mci) 353 353 return -ENOMEM; 354 354 355 - debugf3("MC: init mci\n"); 355 + edac_dbg(3, "MC: init mci\n"); 356 356 357 357 mci->pdev = &pdev->dev; 358 358 mci->mtype_cap = MEM_FLAG_DDR2; ··· 403 403 404 404 rc = -ENODEV; 405 405 if (edac_mc_add_mc(mci)) { 406 - debugf3("MC: failed edac_mc_add_mc()\n"); 406 + edac_dbg(3, "MC: failed edac_mc_add_mc()\n"); 407 407 goto fail; 408 408 } 409 409 410 410 /* get this far and it's successful */ 411 - debugf3("MC: success\n"); 411 + edac_dbg(3, "MC: success\n"); 412 412 return 0; 413 413 414 414 fail: ··· 424 424 { 425 425 int rc; 426 426 427 - debugf0("MC:\n"); 427 + edac_dbg(0, "MC:\n"); 428 428 429 429 if (pci_enable_device(pdev) < 0) 430 430 return -EIO; ··· 441 441 struct mem_ctl_info *mci; 442 442 struct i3200_priv *priv; 443 443 444 - debugf0("\n"); 444 + edac_dbg(0, "\n"); 445 445 446 446 mci = edac_mc_del_mc(&pdev->dev); 447 447 if (!mci) ··· 475 475 { 476 476 int pci_rc; 477 477 478 - debugf3("MC:\n"); 478 + edac_dbg(3, "MC:\n"); 479 479 480 480 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 481 481 opstate_init(); ··· 489 489 mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 490 490 PCI_DEVICE_ID_INTEL_3200_HB, NULL); 491 491 if (!mci_pdev) { 492 - debugf0("i3200 pci_get_device fail\n"); 492 + edac_dbg(0, "i3200 pci_get_device fail\n"); 493 493 pci_rc = -ENODEV; 494 494 goto fail1; 495 495 } 496 496 497 497 pci_rc = i3200_init_one(mci_pdev, i3200_pci_tbl); 498 498 if (pci_rc < 0) { 499 - debugf0("i3200 init fail\n"); 499 + edac_dbg(0, "i3200 init fail\n"); 500 500 pci_rc = -ENODEV; 501 501 goto fail1; 502 502 } ··· 516 516 517 517 static void __exit i3200_exit(void) 518 518 { 519 - debugf3("MC:\n"); 519 + edac_dbg(3, "MC:\n"); 520 520 521 521 pci_unregister_driver(&i3200_driver); 522 522 if (!i3200_registered) {
+81 -82
drivers/edac/i5000_edac.c
··· 478 478 ras = NREC_RAS(info->nrecmemb); 479 479 cas = NREC_CAS(info->nrecmemb); 480 480 481 - debugf0("\t\tCSROW= %d Channel= %d " 482 - "(DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 483 - rank, channel, bank, 484 - rdwr ? "Write" : "Read", ras, cas); 481 + edac_dbg(0, "\t\tCSROW= %d Channel= %d (DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 482 + rank, channel, bank, 483 + rdwr ? "Write" : "Read", ras, cas); 485 484 486 485 /* Only 1 bit will be on */ 487 486 switch (allErrors) { ··· 557 558 /* ONLY ONE of the possible error bits will be set, as per the docs */ 558 559 ue_errors = allErrors & FERR_NF_UNCORRECTABLE; 559 560 if (ue_errors) { 560 - debugf0("\tUncorrected bits= 0x%x\n", ue_errors); 561 + edac_dbg(0, "\tUncorrected bits= 0x%x\n", ue_errors); 561 562 562 563 branch = EXTRACT_FBDCHAN_INDX(info->ferr_nf_fbd); 563 564 ··· 573 574 ras = NREC_RAS(info->nrecmemb); 574 575 cas = NREC_CAS(info->nrecmemb); 575 576 576 - debugf0 577 - ("\t\tCSROW= %d Channels= %d,%d (Branch= %d " 578 - "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 579 - rank, channel, channel + 1, branch >> 1, bank, 580 - rdwr ? "Write" : "Read", ras, cas); 577 + edac_dbg(0, "\t\tCSROW= %d Channels= %d,%d (Branch= %d DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 578 + rank, channel, channel + 1, branch >> 1, bank, 579 + rdwr ? "Write" : "Read", ras, cas); 581 580 582 581 switch (ue_errors) { 583 582 case FERR_NF_M12ERR: ··· 627 630 /* Check correctable errors */ 628 631 ce_errors = allErrors & FERR_NF_CORRECTABLE; 629 632 if (ce_errors) { 630 - debugf0("\tCorrected bits= 0x%x\n", ce_errors); 633 + edac_dbg(0, "\tCorrected bits= 0x%x\n", ce_errors); 631 634 632 635 branch = EXTRACT_FBDCHAN_INDX(info->ferr_nf_fbd); 633 636 ··· 645 648 ras = REC_RAS(info->recmemb); 646 649 cas = REC_CAS(info->recmemb); 647 650 648 - debugf0("\t\tCSROW= %d Channel= %d (Branch %d " 649 - "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 650 - rank, channel, branch >> 1, bank, 651 - rdwr ? "Write" : "Read", ras, cas); 651 + edac_dbg(0, "\t\tCSROW= %d Channel= %d (Branch %d DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 652 + rank, channel, branch >> 1, bank, 653 + rdwr ? "Write" : "Read", ras, cas); 652 654 653 655 switch (ce_errors) { 654 656 case FERR_NF_M17ERR: ··· 759 763 static void i5000_check_error(struct mem_ctl_info *mci) 760 764 { 761 765 struct i5000_error_info info; 762 - debugf4("MC%d\n", mci->mc_idx); 766 + edac_dbg(4, "MC%d\n", mci->mc_idx); 763 767 i5000_get_error_info(mci, &info); 764 768 i5000_process_error_info(mci, &info, 1); 765 769 } ··· 830 834 831 835 pvt->fsb_error_regs = pdev; 832 836 833 - debugf1("System Address, processor bus- PCI Bus ID: %s %x:%x\n", 834 - pci_name(pvt->system_address), 835 - pvt->system_address->vendor, pvt->system_address->device); 836 - debugf1("Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 837 - pci_name(pvt->branchmap_werrors), 838 - pvt->branchmap_werrors->vendor, pvt->branchmap_werrors->device); 839 - debugf1("FSB Error Regs - PCI Bus ID: %s %x:%x\n", 840 - pci_name(pvt->fsb_error_regs), 841 - pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); 837 + edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n", 838 + pci_name(pvt->system_address), 839 + pvt->system_address->vendor, pvt->system_address->device); 840 + edac_dbg(1, "Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 841 + pci_name(pvt->branchmap_werrors), 842 + pvt->branchmap_werrors->vendor, 843 + pvt->branchmap_werrors->device); 844 + edac_dbg(1, "FSB Error Regs - PCI Bus ID: %s %x:%x\n", 845 + pci_name(pvt->fsb_error_regs), 846 + pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); 842 847 843 848 pdev = NULL; 844 849 pdev = pci_get_device(PCI_VENDOR_ID_INTEL, ··· 962 965 963 966 ans = MTR_DIMMS_PRESENT(mtr); 964 967 965 - debugf2("\tMTR%d=0x%x: DIMMs are %s\n", slot_row, mtr, 966 - ans ? "Present" : "NOT Present"); 968 + edac_dbg(2, "\tMTR%d=0x%x: DIMMs are %sPresent\n", 969 + slot_row, mtr, ans ? "" : "NOT "); 967 970 if (!ans) 968 971 return; 969 972 970 - debugf2("\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 971 - debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 972 - debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANK(mtr) ? "double" : "single"); 973 - debugf2("\t\tNUMROW: %s\n", 974 - MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 975 - MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 976 - MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 977 - "reserved"); 978 - debugf2("\t\tNUMCOL: %s\n", 979 - MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 980 - MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 981 - MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 982 - "reserved"); 973 + edac_dbg(2, "\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 974 + edac_dbg(2, "\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 975 + edac_dbg(2, "\t\tNUMRANK: %s\n", 976 + MTR_DIMM_RANK(mtr) ? "double" : "single"); 977 + edac_dbg(2, "\t\tNUMROW: %s\n", 978 + MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 979 + MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 980 + MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 981 + "reserved"); 982 + edac_dbg(2, "\t\tNUMCOL: %s\n", 983 + MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 984 + MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 985 + MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 986 + "reserved"); 983 987 } 984 988 985 989 static void handle_channel(struct i5000_pvt *pvt, int slot, int channel, ··· 1051 1053 "--------------------------------"); 1052 1054 p += n; 1053 1055 space -= n; 1054 - debugf2("%s\n", mem_buffer); 1056 + edac_dbg(2, "%s\n", mem_buffer); 1055 1057 p = mem_buffer; 1056 1058 space = PAGE_SIZE; 1057 1059 } ··· 1072 1074 } 1073 1075 p += n; 1074 1076 space -= n; 1075 - debugf2("%s\n", mem_buffer); 1077 + edac_dbg(2, "%s\n", mem_buffer); 1076 1078 p = mem_buffer; 1077 1079 space = PAGE_SIZE; 1078 1080 } ··· 1082 1084 "--------------------------------"); 1083 1085 p += n; 1084 1086 space -= n; 1085 - debugf2("%s\n", mem_buffer); 1087 + edac_dbg(2, "%s\n", mem_buffer); 1086 1088 p = mem_buffer; 1087 1089 space = PAGE_SIZE; 1088 1090 ··· 1095 1097 p += n; 1096 1098 space -= n; 1097 1099 } 1098 - debugf2("%s\n", mem_buffer); 1100 + edac_dbg(2, "%s\n", mem_buffer); 1099 1101 p = mem_buffer; 1100 1102 space = PAGE_SIZE; 1101 1103 ··· 1108 1110 } 1109 1111 1110 1112 /* output the last message and free buffer */ 1111 - debugf2("%s\n", mem_buffer); 1113 + edac_dbg(2, "%s\n", mem_buffer); 1112 1114 kfree(mem_buffer); 1113 1115 } 1114 1116 ··· 1138 1140 maxdimmperch = pvt->maxdimmperch; 1139 1141 maxch = pvt->maxch; 1140 1142 1141 - debugf2("AMBASE= 0x%lx MAXCH= %d MAX-DIMM-Per-CH= %d\n", 1142 - (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); 1143 + edac_dbg(2, "AMBASE= 0x%lx MAXCH= %d MAX-DIMM-Per-CH= %d\n", 1144 + (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); 1143 1145 1144 1146 /* Get the Branch Map regs */ 1145 1147 pci_read_config_word(pvt->branchmap_werrors, TOLM, &pvt->tolm); 1146 1148 pvt->tolm >>= 12; 1147 - debugf2("\nTOLM (number of 256M regions) =%u (0x%x)\n", pvt->tolm, 1148 - pvt->tolm); 1149 + edac_dbg(2, "TOLM (number of 256M regions) =%u (0x%x)\n", 1150 + pvt->tolm, pvt->tolm); 1149 1151 1150 1152 actual_tolm = pvt->tolm << 28; 1151 - debugf2("Actual TOLM byte addr=%u (0x%x)\n", actual_tolm, actual_tolm); 1153 + edac_dbg(2, "Actual TOLM byte addr=%u (0x%x)\n", 1154 + actual_tolm, actual_tolm); 1152 1155 1153 1156 pci_read_config_word(pvt->branchmap_werrors, MIR0, &pvt->mir0); 1154 1157 pci_read_config_word(pvt->branchmap_werrors, MIR1, &pvt->mir1); ··· 1159 1160 limit = (pvt->mir0 >> 4) & 0x0FFF; 1160 1161 way0 = pvt->mir0 & 0x1; 1161 1162 way1 = pvt->mir0 & 0x2; 1162 - debugf2("MIR0: limit= 0x%x WAY1= %u WAY0= %x\n", limit, way1, way0); 1163 + edac_dbg(2, "MIR0: limit= 0x%x WAY1= %u WAY0= %x\n", 1164 + limit, way1, way0); 1163 1165 limit = (pvt->mir1 >> 4) & 0x0FFF; 1164 1166 way0 = pvt->mir1 & 0x1; 1165 1167 way1 = pvt->mir1 & 0x2; 1166 - debugf2("MIR1: limit= 0x%x WAY1= %u WAY0= %x\n", limit, way1, way0); 1168 + edac_dbg(2, "MIR1: limit= 0x%x WAY1= %u WAY0= %x\n", 1169 + limit, way1, way0); 1167 1170 limit = (pvt->mir2 >> 4) & 0x0FFF; 1168 1171 way0 = pvt->mir2 & 0x1; 1169 1172 way1 = pvt->mir2 & 0x2; 1170 - debugf2("MIR2: limit= 0x%x WAY1= %u WAY0= %x\n", limit, way1, way0); 1173 + edac_dbg(2, "MIR2: limit= 0x%x WAY1= %u WAY0= %x\n", 1174 + limit, way1, way0); 1171 1175 1172 1176 /* Get the MTR[0-3] regs */ 1173 1177 for (slot_row = 0; slot_row < NUM_MTRS; slot_row++) { ··· 1179 1177 pci_read_config_word(pvt->branch_0, where, 1180 1178 &pvt->b0_mtr[slot_row]); 1181 1179 1182 - debugf2("MTR%d where=0x%x B0 value=0x%x\n", slot_row, where, 1183 - pvt->b0_mtr[slot_row]); 1180 + edac_dbg(2, "MTR%d where=0x%x B0 value=0x%x\n", 1181 + slot_row, where, pvt->b0_mtr[slot_row]); 1184 1182 1185 1183 if (pvt->maxch >= CHANNELS_PER_BRANCH) { 1186 1184 pci_read_config_word(pvt->branch_1, where, 1187 1185 &pvt->b1_mtr[slot_row]); 1188 - debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, 1189 - where, pvt->b1_mtr[slot_row]); 1186 + edac_dbg(2, "MTR%d where=0x%x B1 value=0x%x\n", 1187 + slot_row, where, pvt->b1_mtr[slot_row]); 1190 1188 } else { 1191 1189 pvt->b1_mtr[slot_row] = 0; 1192 1190 } 1193 1191 } 1194 1192 1195 1193 /* Read and dump branch 0's MTRs */ 1196 - debugf2("\nMemory Technology Registers:\n"); 1197 - debugf2(" Branch 0:\n"); 1194 + edac_dbg(2, "Memory Technology Registers:\n"); 1195 + edac_dbg(2, " Branch 0:\n"); 1198 1196 for (slot_row = 0; slot_row < NUM_MTRS; slot_row++) { 1199 1197 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); 1200 1198 } 1201 1199 pci_read_config_word(pvt->branch_0, AMB_PRESENT_0, 1202 1200 &pvt->b0_ambpresent0); 1203 - debugf2("\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); 1201 + edac_dbg(2, "\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); 1204 1202 pci_read_config_word(pvt->branch_0, AMB_PRESENT_1, 1205 1203 &pvt->b0_ambpresent1); 1206 - debugf2("\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); 1204 + edac_dbg(2, "\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); 1207 1205 1208 1206 /* Only if we have 2 branchs (4 channels) */ 1209 1207 if (pvt->maxch < CHANNELS_PER_BRANCH) { ··· 1211 1209 pvt->b1_ambpresent1 = 0; 1212 1210 } else { 1213 1211 /* Read and dump branch 1's MTRs */ 1214 - debugf2(" Branch 1:\n"); 1212 + edac_dbg(2, " Branch 1:\n"); 1215 1213 for (slot_row = 0; slot_row < NUM_MTRS; slot_row++) { 1216 1214 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); 1217 1215 } 1218 1216 pci_read_config_word(pvt->branch_1, AMB_PRESENT_0, 1219 1217 &pvt->b1_ambpresent0); 1220 - debugf2("\t\tAMB-Branch 1-present0 0x%x:\n", 1221 - pvt->b1_ambpresent0); 1218 + edac_dbg(2, "\t\tAMB-Branch 1-present0 0x%x:\n", 1219 + pvt->b1_ambpresent0); 1222 1220 pci_read_config_word(pvt->branch_1, AMB_PRESENT_1, 1223 1221 &pvt->b1_ambpresent1); 1224 - debugf2("\t\tAMB-Branch 1-present1 0x%x:\n", 1225 - pvt->b1_ambpresent1); 1222 + edac_dbg(2, "\t\tAMB-Branch 1-present1 0x%x:\n", 1223 + pvt->b1_ambpresent1); 1226 1224 } 1227 1225 1228 1226 /* Go and determine the size of each DIMM and place in an ··· 1357 1355 int num_channels; 1358 1356 int num_dimms_per_channel; 1359 1357 1360 - debugf0("MC: %s(), pdev bus %u dev=0x%x fn=0x%x\n", 1361 - __FILE__, pdev->bus->number, 1362 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1358 + edac_dbg(0, "MC: pdev bus %u dev=0x%x fn=0x%x\n", 1359 + pdev->bus->number, 1360 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1363 1361 1364 1362 /* We only are looking for func 0 of the set */ 1365 1363 if (PCI_FUNC(pdev->devfn) != 0) ··· 1381 1379 i5000_get_dimm_and_channel_counts(pdev, &num_dimms_per_channel, 1382 1380 &num_channels); 1383 1381 1384 - debugf0("MC: Number of Branches=2 Channels= %d DIMMS= %d\n", 1385 - num_channels, num_dimms_per_channel); 1382 + edac_dbg(0, "MC: Number of Branches=2 Channels= %d DIMMS= %d\n", 1383 + num_channels, num_dimms_per_channel); 1386 1384 1387 1385 /* allocate a new MC control structure */ 1388 1386 ··· 1399 1397 if (mci == NULL) 1400 1398 return -ENOMEM; 1401 1399 1402 - debugf0("MC: %s(): mci = %p\n", __FILE__, mci); 1400 + edac_dbg(0, "MC: mci = %p\n", mci); 1403 1401 1404 1402 mci->pdev = &pdev->dev; /* record ptr to the generic device */ 1405 1403 ··· 1431 1429 /* initialize the MC control structure 'csrows' table 1432 1430 * with the mapping and control information */ 1433 1431 if (i5000_init_csrows(mci)) { 1434 - debugf0("MC: Setting mci->edac_cap to EDAC_FLAG_NONE\n" 1435 - " because i5000_init_csrows() returned nonzero " 1436 - "value\n"); 1432 + edac_dbg(0, "MC: Setting mci->edac_cap to EDAC_FLAG_NONE because i5000_init_csrows() returned nonzero value\n"); 1437 1433 mci->edac_cap = EDAC_FLAG_NONE; /* no csrows found */ 1438 1434 } else { 1439 - debugf1("MC: Enable error reporting now\n"); 1435 + edac_dbg(1, "MC: Enable error reporting now\n"); 1440 1436 i5000_enable_error_reporting(mci); 1441 1437 } 1442 1438 1443 1439 /* add this new MC control structure to EDAC's list of MCs */ 1444 1440 if (edac_mc_add_mc(mci)) { 1445 - debugf0("MC: %s(): failed edac_mc_add_mc()\n", 1446 - __FILE__); 1441 + edac_dbg(0, "MC: failed edac_mc_add_mc()\n"); 1447 1442 /* FIXME: perhaps some code should go here that disables error 1448 1443 * reporting if we just enabled it 1449 1444 */ ··· 1484 1485 { 1485 1486 int rc; 1486 1487 1487 - debugf0("MC: %s()\n", __FILE__); 1488 + edac_dbg(0, "MC:\n"); 1488 1489 1489 1490 /* wake up device */ 1490 1491 rc = pci_enable_device(pdev); ··· 1503 1504 { 1504 1505 struct mem_ctl_info *mci; 1505 1506 1506 - debugf0("%s()\n", __FILE__); 1507 + edac_dbg(0, "\n"); 1507 1508 1508 1509 if (i5000_pci) 1509 1510 edac_pci_release_generic_ctl(i5000_pci); ··· 1549 1550 { 1550 1551 int pci_rc; 1551 1552 1552 - debugf2("MC: %s()\n", __FILE__); 1553 + edac_dbg(2, "MC:\n"); 1553 1554 1554 1555 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1555 1556 opstate_init(); ··· 1565 1566 */ 1566 1567 static void __exit i5000_exit(void) 1567 1568 { 1568 - debugf2("MC: %s()\n", __FILE__); 1569 + edac_dbg(2, "MC:\n"); 1569 1570 pci_unregister_driver(&i5000_driver); 1570 1571 } 1571 1572
+2 -2
drivers/edac/i5100_edac.c
··· 859 859 i5100_rank_to_slot(mci, chan, rank)); 860 860 } 861 861 862 - debugf2("dimm channel %d, rank %d, size %ld\n", 863 - chan, rank, (long)PAGES_TO_MiB(npages)); 862 + edac_dbg(2, "dimm channel %d, rank %d, size %ld\n", 863 + chan, rank, (long)PAGES_TO_MiB(npages)); 864 864 } 865 865 } 866 866
+80 -81
drivers/edac/i5400_edac.c
··· 542 542 ras = nrec_ras(info); 543 543 cas = nrec_cas(info); 544 544 545 - debugf0("\t\tDIMM= %d Channels= %d,%d (Branch= %d " 546 - "DRAM Bank= %d Buffer ID = %d rdwr= %s ras= %d cas= %d)\n", 547 - rank, channel, channel + 1, branch >> 1, bank, 548 - buf_id, rdwr_str(rdwr), ras, cas); 545 + edac_dbg(0, "\t\tDIMM= %d Channels= %d,%d (Branch= %d DRAM Bank= %d Buffer ID = %d rdwr= %s ras= %d cas= %d)\n", 546 + rank, channel, channel + 1, branch >> 1, bank, 547 + buf_id, rdwr_str(rdwr), ras, cas); 549 548 550 549 /* Only 1 bit will be on */ 551 550 errnum = find_first_bit(&allErrors, ARRAY_SIZE(error_name)); ··· 594 595 595 596 /* Correctable errors */ 596 597 if (allErrors & ERROR_NF_CORRECTABLE) { 597 - debugf0("\tCorrected bits= 0x%lx\n", allErrors); 598 + edac_dbg(0, "\tCorrected bits= 0x%lx\n", allErrors); 598 599 599 600 branch = extract_fbdchan_indx(info->ferr_nf_fbd); 600 601 ··· 615 616 /* Only 1 bit will be on */ 616 617 errnum = find_first_bit(&allErrors, ARRAY_SIZE(error_name)); 617 618 618 - debugf0("\t\tDIMM= %d Channel= %d (Branch %d " 619 - "DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 620 - rank, channel, branch >> 1, bank, 621 - rdwr_str(rdwr), ras, cas); 619 + edac_dbg(0, "\t\tDIMM= %d Channel= %d (Branch %d DRAM Bank= %d rdwr= %s ras= %d cas= %d)\n", 620 + rank, channel, branch >> 1, bank, 621 + rdwr_str(rdwr), ras, cas); 622 622 623 623 /* Form out message */ 624 624 snprintf(msg, sizeof(msg), ··· 680 682 static void i5400_check_error(struct mem_ctl_info *mci) 681 683 { 682 684 struct i5400_error_info info; 683 - debugf4("MC%d\n", mci->mc_idx); 685 + edac_dbg(4, "MC%d\n", mci->mc_idx); 684 686 i5400_get_error_info(mci, &info); 685 687 i5400_process_error_info(mci, &info); 686 688 } ··· 766 768 } 767 769 pvt->fsb_error_regs = pdev; 768 770 769 - debugf1("System Address, processor bus- PCI Bus ID: %s %x:%x\n", 770 - pci_name(pvt->system_address), 771 - pvt->system_address->vendor, pvt->system_address->device); 772 - debugf1("Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 773 - pci_name(pvt->branchmap_werrors), 774 - pvt->branchmap_werrors->vendor, pvt->branchmap_werrors->device); 775 - debugf1("FSB Error Regs - PCI Bus ID: %s %x:%x\n", 776 - pci_name(pvt->fsb_error_regs), 777 - pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); 771 + edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n", 772 + pci_name(pvt->system_address), 773 + pvt->system_address->vendor, pvt->system_address->device); 774 + edac_dbg(1, "Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 775 + pci_name(pvt->branchmap_werrors), 776 + pvt->branchmap_werrors->vendor, 777 + pvt->branchmap_werrors->device); 778 + edac_dbg(1, "FSB Error Regs - PCI Bus ID: %s %x:%x\n", 779 + pci_name(pvt->fsb_error_regs), 780 + pvt->fsb_error_regs->vendor, pvt->fsb_error_regs->device); 778 781 779 782 pvt->branch_0 = pci_get_device(PCI_VENDOR_ID_INTEL, 780 783 PCI_DEVICE_ID_INTEL_5400_FBD0, NULL); ··· 863 864 n = dimm; 864 865 865 866 if (n >= DIMMS_PER_CHANNEL) { 866 - debugf0("ERROR: trying to access an invalid dimm: %d\n", 867 - dimm); 867 + edac_dbg(0, "ERROR: trying to access an invalid dimm: %d\n", 868 + dimm); 868 869 return 0; 869 870 } 870 871 ··· 884 885 885 886 ans = MTR_DIMMS_PRESENT(mtr); 886 887 887 - debugf2("\tMTR%d=0x%x: DIMMs are %s\n", slot_row, mtr, 888 - ans ? "Present" : "NOT Present"); 888 + edac_dbg(2, "\tMTR%d=0x%x: DIMMs are %sPresent\n", 889 + slot_row, mtr, ans ? "" : "NOT "); 889 890 if (!ans) 890 891 return; 891 892 892 - debugf2("\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 893 + edac_dbg(2, "\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 893 894 894 - debugf2("\t\tELECTRICAL THROTTLING is %s\n", 895 - MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 895 + edac_dbg(2, "\t\tELECTRICAL THROTTLING is %s\n", 896 + MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 896 897 897 - debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 898 - debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANK(mtr) ? "double" : "single"); 899 - debugf2("\t\tNUMROW: %s\n", 900 - MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 901 - MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 902 - MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 903 - "65,536 - 16 rows"); 904 - debugf2("\t\tNUMCOL: %s\n", 905 - MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 906 - MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 907 - MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 908 - "reserved"); 898 + edac_dbg(2, "\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 899 + edac_dbg(2, "\t\tNUMRANK: %s\n", 900 + MTR_DIMM_RANK(mtr) ? "double" : "single"); 901 + edac_dbg(2, "\t\tNUMROW: %s\n", 902 + MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 903 + MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 904 + MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 905 + "65,536 - 16 rows"); 906 + edac_dbg(2, "\t\tNUMCOL: %s\n", 907 + MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 908 + MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 909 + MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 910 + "reserved"); 909 911 } 910 912 911 913 static void handle_channel(struct i5400_pvt *pvt, int dimm, int channel, ··· 979 979 "-------------------------------"); 980 980 p += n; 981 981 space -= n; 982 - debugf2("%s\n", mem_buffer); 982 + edac_dbg(2, "%s\n", mem_buffer); 983 983 p = mem_buffer; 984 984 space = PAGE_SIZE; 985 985 } ··· 994 994 p += n; 995 995 space -= n; 996 996 } 997 - debugf2("%s\n", mem_buffer); 997 + edac_dbg(2, "%s\n", mem_buffer); 998 998 p = mem_buffer; 999 999 space = PAGE_SIZE; 1000 1000 } ··· 1004 1004 "-------------------------------"); 1005 1005 p += n; 1006 1006 space -= n; 1007 - debugf2("%s\n", mem_buffer); 1007 + edac_dbg(2, "%s\n", mem_buffer); 1008 1008 p = mem_buffer; 1009 1009 space = PAGE_SIZE; 1010 1010 ··· 1019 1019 } 1020 1020 1021 1021 space -= n; 1022 - debugf2("%s\n", mem_buffer); 1022 + edac_dbg(2, "%s\n", mem_buffer); 1023 1023 p = mem_buffer; 1024 1024 space = PAGE_SIZE; 1025 1025 ··· 1032 1032 } 1033 1033 1034 1034 /* output the last message and free buffer */ 1035 - debugf2("%s\n", mem_buffer); 1035 + edac_dbg(2, "%s\n", mem_buffer); 1036 1036 kfree(mem_buffer); 1037 1037 } 1038 1038 ··· 1062 1062 maxdimmperch = pvt->maxdimmperch; 1063 1063 maxch = pvt->maxch; 1064 1064 1065 - debugf2("AMBASE= 0x%lx MAXCH= %d MAX-DIMM-Per-CH= %d\n", 1066 - (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); 1065 + edac_dbg(2, "AMBASE= 0x%lx MAXCH= %d MAX-DIMM-Per-CH= %d\n", 1066 + (long unsigned int)pvt->ambase, pvt->maxch, pvt->maxdimmperch); 1067 1067 1068 1068 /* Get the Branch Map regs */ 1069 1069 pci_read_config_word(pvt->branchmap_werrors, TOLM, &pvt->tolm); 1070 1070 pvt->tolm >>= 12; 1071 - debugf2("\nTOLM (number of 256M regions) =%u (0x%x)\n", pvt->tolm, 1072 - pvt->tolm); 1071 + edac_dbg(2, "\nTOLM (number of 256M regions) =%u (0x%x)\n", 1072 + pvt->tolm, pvt->tolm); 1073 1073 1074 1074 actual_tolm = (u32) ((1000l * pvt->tolm) >> (30 - 28)); 1075 - debugf2("Actual TOLM byte addr=%u.%03u GB (0x%x)\n", 1076 - actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); 1075 + edac_dbg(2, "Actual TOLM byte addr=%u.%03u GB (0x%x)\n", 1076 + actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); 1077 1077 1078 1078 pci_read_config_word(pvt->branchmap_werrors, MIR0, &pvt->mir0); 1079 1079 pci_read_config_word(pvt->branchmap_werrors, MIR1, &pvt->mir1); ··· 1082 1082 limit = (pvt->mir0 >> 4) & 0x0fff; 1083 1083 way0 = pvt->mir0 & 0x1; 1084 1084 way1 = pvt->mir0 & 0x2; 1085 - debugf2("MIR0: limit= 0x%x WAY1= %u WAY0= %x\n", limit, way1, way0); 1085 + edac_dbg(2, "MIR0: limit= 0x%x WAY1= %u WAY0= %x\n", 1086 + limit, way1, way0); 1086 1087 limit = (pvt->mir1 >> 4) & 0xfff; 1087 1088 way0 = pvt->mir1 & 0x1; 1088 1089 way1 = pvt->mir1 & 0x2; 1089 - debugf2("MIR1: limit= 0x%x WAY1= %u WAY0= %x\n", limit, way1, way0); 1090 + edac_dbg(2, "MIR1: limit= 0x%x WAY1= %u WAY0= %x\n", 1091 + limit, way1, way0); 1090 1092 1091 1093 /* Get the set of MTR[0-3] regs by each branch */ 1092 1094 for (slot_row = 0; slot_row < DIMMS_PER_CHANNEL; slot_row++) { ··· 1098 1096 pci_read_config_word(pvt->branch_0, where, 1099 1097 &pvt->b0_mtr[slot_row]); 1100 1098 1101 - debugf2("MTR%d where=0x%x B0 value=0x%x\n", slot_row, where, 1102 - pvt->b0_mtr[slot_row]); 1099 + edac_dbg(2, "MTR%d where=0x%x B0 value=0x%x\n", 1100 + slot_row, where, pvt->b0_mtr[slot_row]); 1103 1101 1104 1102 if (pvt->maxch < CHANNELS_PER_BRANCH) { 1105 1103 pvt->b1_mtr[slot_row] = 0; ··· 1109 1107 /* Branch 1 set of MTR registers */ 1110 1108 pci_read_config_word(pvt->branch_1, where, 1111 1109 &pvt->b1_mtr[slot_row]); 1112 - debugf2("MTR%d where=0x%x B1 value=0x%x\n", slot_row, where, 1113 - pvt->b1_mtr[slot_row]); 1110 + edac_dbg(2, "MTR%d where=0x%x B1 value=0x%x\n", 1111 + slot_row, where, pvt->b1_mtr[slot_row]); 1114 1112 } 1115 1113 1116 1114 /* Read and dump branch 0's MTRs */ 1117 - debugf2("\nMemory Technology Registers:\n"); 1118 - debugf2(" Branch 0:\n"); 1115 + edac_dbg(2, "Memory Technology Registers:\n"); 1116 + edac_dbg(2, " Branch 0:\n"); 1119 1117 for (slot_row = 0; slot_row < DIMMS_PER_CHANNEL; slot_row++) 1120 1118 decode_mtr(slot_row, pvt->b0_mtr[slot_row]); 1121 1119 1122 1120 pci_read_config_word(pvt->branch_0, AMBPRESENT_0, 1123 1121 &pvt->b0_ambpresent0); 1124 - debugf2("\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); 1122 + edac_dbg(2, "\t\tAMB-Branch 0-present0 0x%x:\n", pvt->b0_ambpresent0); 1125 1123 pci_read_config_word(pvt->branch_0, AMBPRESENT_1, 1126 1124 &pvt->b0_ambpresent1); 1127 - debugf2("\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); 1125 + edac_dbg(2, "\t\tAMB-Branch 0-present1 0x%x:\n", pvt->b0_ambpresent1); 1128 1126 1129 1127 /* Only if we have 2 branchs (4 channels) */ 1130 1128 if (pvt->maxch < CHANNELS_PER_BRANCH) { ··· 1132 1130 pvt->b1_ambpresent1 = 0; 1133 1131 } else { 1134 1132 /* Read and dump branch 1's MTRs */ 1135 - debugf2(" Branch 1:\n"); 1133 + edac_dbg(2, " Branch 1:\n"); 1136 1134 for (slot_row = 0; slot_row < DIMMS_PER_CHANNEL; slot_row++) 1137 1135 decode_mtr(slot_row, pvt->b1_mtr[slot_row]); 1138 1136 1139 1137 pci_read_config_word(pvt->branch_1, AMBPRESENT_0, 1140 1138 &pvt->b1_ambpresent0); 1141 - debugf2("\t\tAMB-Branch 1-present0 0x%x:\n", 1142 - pvt->b1_ambpresent0); 1139 + edac_dbg(2, "\t\tAMB-Branch 1-present0 0x%x:\n", 1140 + pvt->b1_ambpresent0); 1143 1141 pci_read_config_word(pvt->branch_1, AMBPRESENT_1, 1144 1142 &pvt->b1_ambpresent1); 1145 - debugf2("\t\tAMB-Branch 1-present1 0x%x:\n", 1146 - pvt->b1_ambpresent1); 1143 + edac_dbg(2, "\t\tAMB-Branch 1-present1 0x%x:\n", 1144 + pvt->b1_ambpresent1); 1147 1145 } 1148 1146 1149 1147 /* Go and determine the size of each DIMM and place in an ··· 1195 1193 1196 1194 size_mb = pvt->dimm_info[slot][channel].megabytes; 1197 1195 1198 - debugf2("dimm (branch %d channel %d slot %d): %d.%03d GB\n", 1199 - channel / 2, channel % 2, slot, 1200 - size_mb / 1000, size_mb % 1000); 1196 + edac_dbg(2, "dimm (branch %d channel %d slot %d): %d.%03d GB\n", 1197 + channel / 2, channel % 2, slot, 1198 + size_mb / 1000, size_mb % 1000); 1201 1199 1202 1200 dimm->nr_pages = size_mb << 8; 1203 1201 dimm->grain = 8; ··· 1261 1259 if (dev_idx >= ARRAY_SIZE(i5400_devs)) 1262 1260 return -EINVAL; 1263 1261 1264 - debugf0("MC: %s(), pdev bus %u dev=0x%x fn=0x%x\n", 1265 - __FILE__, pdev->bus->number, 1266 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1262 + edac_dbg(0, "MC: pdev bus %u dev=0x%x fn=0x%x\n", 1263 + pdev->bus->number, 1264 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1267 1265 1268 1266 /* We only are looking for func 0 of the set */ 1269 1267 if (PCI_FUNC(pdev->devfn) != 0) ··· 1287 1285 if (mci == NULL) 1288 1286 return -ENOMEM; 1289 1287 1290 - debugf0("MC: %s(): mci = %p\n", __FILE__, mci); 1288 + edac_dbg(0, "MC: mci = %p\n", mci); 1291 1289 1292 1290 mci->pdev = &pdev->dev; /* record ptr to the generic device */ 1293 1291 ··· 1319 1317 /* initialize the MC control structure 'dimms' table 1320 1318 * with the mapping and control information */ 1321 1319 if (i5400_init_dimms(mci)) { 1322 - debugf0("MC: Setting mci->edac_cap to EDAC_FLAG_NONE\n" 1323 - " because i5400_init_dimms() returned nonzero " 1324 - "value\n"); 1320 + edac_dbg(0, "MC: Setting mci->edac_cap to EDAC_FLAG_NONE because i5400_init_dimms() returned nonzero value\n"); 1325 1321 mci->edac_cap = EDAC_FLAG_NONE; /* no dimms found */ 1326 1322 } else { 1327 - debugf1("MC: Enable error reporting now\n"); 1323 + edac_dbg(1, "MC: Enable error reporting now\n"); 1328 1324 i5400_enable_error_reporting(mci); 1329 1325 } 1330 1326 1331 1327 /* add this new MC control structure to EDAC's list of MCs */ 1332 1328 if (edac_mc_add_mc(mci)) { 1333 - debugf0("MC: %s(): failed edac_mc_add_mc()\n", 1334 - __FILE__); 1329 + edac_dbg(0, "MC: failed edac_mc_add_mc()\n"); 1335 1330 /* FIXME: perhaps some code should go here that disables error 1336 1331 * reporting if we just enabled it 1337 1332 */ ··· 1372 1373 { 1373 1374 int rc; 1374 1375 1375 - debugf0("MC: %s()\n", __FILE__); 1376 + edac_dbg(0, "MC:\n"); 1376 1377 1377 1378 /* wake up device */ 1378 1379 rc = pci_enable_device(pdev); ··· 1391 1392 { 1392 1393 struct mem_ctl_info *mci; 1393 1394 1394 - debugf0("%s()\n", __FILE__); 1395 + edac_dbg(0, "\n"); 1395 1396 1396 1397 if (i5400_pci) 1397 1398 edac_pci_release_generic_ctl(i5400_pci); ··· 1437 1438 { 1438 1439 int pci_rc; 1439 1440 1440 - debugf2("MC: %s()\n", __FILE__); 1441 + edac_dbg(2, "MC:\n"); 1441 1442 1442 1443 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1443 1444 opstate_init(); ··· 1453 1454 */ 1454 1455 static void __exit i5400_exit(void) 1455 1456 { 1456 - debugf2("MC: %s()\n", __FILE__); 1457 + edac_dbg(2, "MC:\n"); 1457 1458 pci_unregister_driver(&i5400_driver); 1458 1459 } 1459 1460
+72 -75
drivers/edac/i7300_edac.c
··· 596 596 mtr = pvt->mtr[slot][branch]; 597 597 ans = MTR_DIMMS_PRESENT(mtr) ? 1 : 0; 598 598 599 - debugf2("\tMTR%d CH%d: DIMMs are %s (mtr)\n", 600 - slot, channel, 601 - ans ? "Present" : "NOT Present"); 599 + edac_dbg(2, "\tMTR%d CH%d: DIMMs are %sPresent (mtr)\n", 600 + slot, channel, ans ? "" : "NOT "); 602 601 603 602 /* Determine if there is a DIMM present in this DIMM slot */ 604 603 if (!ans) ··· 619 620 620 621 dinfo->megabytes = 1 << addrBits; 621 622 622 - debugf2("\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 623 + edac_dbg(2, "\t\tWIDTH: x%d\n", MTR_DRAM_WIDTH(mtr)); 623 624 624 - debugf2("\t\tELECTRICAL THROTTLING is %s\n", 625 - MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 625 + edac_dbg(2, "\t\tELECTRICAL THROTTLING is %s\n", 626 + MTR_DIMMS_ETHROTTLE(mtr) ? "enabled" : "disabled"); 626 627 627 - debugf2("\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 628 - debugf2("\t\tNUMRANK: %s\n", MTR_DIMM_RANKS(mtr) ? "double" : "single"); 629 - debugf2("\t\tNUMROW: %s\n", 630 - MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 631 - MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 632 - MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 633 - "65,536 - 16 rows"); 634 - debugf2("\t\tNUMCOL: %s\n", 635 - MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 636 - MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 637 - MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 638 - "reserved"); 639 - debugf2("\t\tSIZE: %d MB\n", dinfo->megabytes); 628 + edac_dbg(2, "\t\tNUMBANK: %d bank(s)\n", MTR_DRAM_BANKS(mtr)); 629 + edac_dbg(2, "\t\tNUMRANK: %s\n", 630 + MTR_DIMM_RANKS(mtr) ? "double" : "single"); 631 + edac_dbg(2, "\t\tNUMROW: %s\n", 632 + MTR_DIMM_ROWS(mtr) == 0 ? "8,192 - 13 rows" : 633 + MTR_DIMM_ROWS(mtr) == 1 ? "16,384 - 14 rows" : 634 + MTR_DIMM_ROWS(mtr) == 2 ? "32,768 - 15 rows" : 635 + "65,536 - 16 rows"); 636 + edac_dbg(2, "\t\tNUMCOL: %s\n", 637 + MTR_DIMM_COLS(mtr) == 0 ? "1,024 - 10 columns" : 638 + MTR_DIMM_COLS(mtr) == 1 ? "2,048 - 11 columns" : 639 + MTR_DIMM_COLS(mtr) == 2 ? "4,096 - 12 columns" : 640 + "reserved"); 641 + edac_dbg(2, "\t\tSIZE: %d MB\n", dinfo->megabytes); 640 642 641 643 /* 642 644 * The type of error detection actually depends of the ··· 653 653 dimm->mtype = MEM_FB_DDR2; 654 654 if (IS_SINGLE_MODE(pvt->mc_settings_a)) { 655 655 dimm->edac_mode = EDAC_SECDED; 656 - debugf2("\t\tECC code is 8-byte-over-32-byte SECDED+ code\n"); 656 + edac_dbg(2, "\t\tECC code is 8-byte-over-32-byte SECDED+ code\n"); 657 657 } else { 658 - debugf2("\t\tECC code is on Lockstep mode\n"); 658 + edac_dbg(2, "\t\tECC code is on Lockstep mode\n"); 659 659 if (MTR_DRAM_WIDTH(mtr) == 8) 660 660 dimm->edac_mode = EDAC_S8ECD8ED; 661 661 else ··· 664 664 665 665 /* ask what device type on this row */ 666 666 if (MTR_DRAM_WIDTH(mtr) == 8) { 667 - debugf2("\t\tScrub algorithm for x8 is on %s mode\n", 668 - IS_SCRBALGO_ENHANCED(pvt->mc_settings) ? 669 - "enhanced" : "normal"); 667 + edac_dbg(2, "\t\tScrub algorithm for x8 is on %s mode\n", 668 + IS_SCRBALGO_ENHANCED(pvt->mc_settings) ? 669 + "enhanced" : "normal"); 670 670 671 671 dimm->dtype = DEV_X8; 672 672 } else ··· 700 700 p += n; 701 701 space -= n; 702 702 } 703 - debugf2("%s\n", pvt->tmp_prt_buffer); 703 + edac_dbg(2, "%s\n", pvt->tmp_prt_buffer); 704 704 p = pvt->tmp_prt_buffer; 705 705 space = PAGE_SIZE; 706 706 n = snprintf(p, space, "-------------------------------" 707 707 "------------------------------"); 708 708 p += n; 709 709 space -= n; 710 - debugf2("%s\n", pvt->tmp_prt_buffer); 710 + edac_dbg(2, "%s\n", pvt->tmp_prt_buffer); 711 711 p = pvt->tmp_prt_buffer; 712 712 space = PAGE_SIZE; 713 713 ··· 723 723 space -= n; 724 724 } 725 725 726 - debugf2("%s\n", pvt->tmp_prt_buffer); 726 + edac_dbg(2, "%s\n", pvt->tmp_prt_buffer); 727 727 p = pvt->tmp_prt_buffer; 728 728 space = PAGE_SIZE; 729 729 } ··· 732 732 "------------------------------"); 733 733 p += n; 734 734 space -= n; 735 - debugf2("%s\n", pvt->tmp_prt_buffer); 735 + edac_dbg(2, "%s\n", pvt->tmp_prt_buffer); 736 736 p = pvt->tmp_prt_buffer; 737 737 space = PAGE_SIZE; 738 738 #endif ··· 755 755 756 756 pvt = mci->pvt_info; 757 757 758 - debugf2("Memory Technology Registers:\n"); 758 + edac_dbg(2, "Memory Technology Registers:\n"); 759 759 760 760 /* Get the AMB present registers for the four channels */ 761 761 for (branch = 0; branch < MAX_BRANCHES; branch++) { ··· 764 764 pci_read_config_word(pvt->pci_dev_2x_0_fbd_branch[branch], 765 765 AMBPRESENT_0, 766 766 &pvt->ambpresent[channel]); 767 - debugf2("\t\tAMB-present CH%d = 0x%x:\n", 768 - channel, pvt->ambpresent[channel]); 767 + edac_dbg(2, "\t\tAMB-present CH%d = 0x%x:\n", 768 + channel, pvt->ambpresent[channel]); 769 769 770 770 channel = to_channel(1, branch); 771 771 pci_read_config_word(pvt->pci_dev_2x_0_fbd_branch[branch], 772 772 AMBPRESENT_1, 773 773 &pvt->ambpresent[channel]); 774 - debugf2("\t\tAMB-present CH%d = 0x%x:\n", 775 - channel, pvt->ambpresent[channel]); 774 + edac_dbg(2, "\t\tAMB-present CH%d = 0x%x:\n", 775 + channel, pvt->ambpresent[channel]); 776 776 } 777 777 778 778 /* Get the set of MTR[0-7] regs by each branch */ ··· 814 814 static void decode_mir(int mir_no, u16 mir[MAX_MIR]) 815 815 { 816 816 if (mir[mir_no] & 3) 817 - debugf2("MIR%d: limit= 0x%x Branch(es) that participate:" 818 - " %s %s\n", 819 - mir_no, 820 - (mir[mir_no] >> 4) & 0xfff, 821 - (mir[mir_no] & 1) ? "B0" : "", 822 - (mir[mir_no] & 2) ? "B1" : ""); 817 + edac_dbg(2, "MIR%d: limit= 0x%x Branch(es) that participate: %s %s\n", 818 + mir_no, 819 + (mir[mir_no] >> 4) & 0xfff, 820 + (mir[mir_no] & 1) ? "B0" : "", 821 + (mir[mir_no] & 2) ? "B1" : ""); 823 822 } 824 823 825 824 /** ··· 838 839 pci_read_config_dword(pvt->pci_dev_16_0_fsb_ctlr, AMBASE, 839 840 (u32 *) &pvt->ambase); 840 841 841 - debugf2("AMBASE= 0x%lx\n", (long unsigned int)pvt->ambase); 842 + edac_dbg(2, "AMBASE= 0x%lx\n", (long unsigned int)pvt->ambase); 842 843 843 844 /* Get the Branch Map regs */ 844 845 pci_read_config_word(pvt->pci_dev_16_1_fsb_addr_map, TOLM, &pvt->tolm); 845 846 pvt->tolm >>= 12; 846 - debugf2("TOLM (number of 256M regions) =%u (0x%x)\n", pvt->tolm, 847 - pvt->tolm); 847 + edac_dbg(2, "TOLM (number of 256M regions) =%u (0x%x)\n", 848 + pvt->tolm, pvt->tolm); 848 849 849 850 actual_tolm = (u32) ((1000l * pvt->tolm) >> (30 - 28)); 850 - debugf2("Actual TOLM byte addr=%u.%03u GB (0x%x)\n", 851 - actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); 851 + edac_dbg(2, "Actual TOLM byte addr=%u.%03u GB (0x%x)\n", 852 + actual_tolm/1000, actual_tolm % 1000, pvt->tolm << 28); 852 853 853 854 /* Get memory controller settings */ 854 855 pci_read_config_dword(pvt->pci_dev_16_1_fsb_addr_map, MC_SETTINGS, ··· 857 858 &pvt->mc_settings_a); 858 859 859 860 if (IS_SINGLE_MODE(pvt->mc_settings_a)) 860 - debugf0("Memory controller operating on single mode\n"); 861 + edac_dbg(0, "Memory controller operating on single mode\n"); 861 862 else 862 - debugf0("Memory controller operating on %s mode\n", 863 - IS_MIRRORED(pvt->mc_settings) ? "mirrored" : "non-mirrored"); 863 + edac_dbg(0, "Memory controller operating on %smirrored mode\n", 864 + IS_MIRRORED(pvt->mc_settings) ? "" : "non-"); 864 865 865 - debugf0("Error detection is %s\n", 866 - IS_ECC_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); 867 - debugf0("Retry is %s\n", 868 - IS_RETRY_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); 866 + edac_dbg(0, "Error detection is %s\n", 867 + IS_ECC_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); 868 + edac_dbg(0, "Retry is %s\n", 869 + IS_RETRY_ENABLED(pvt->mc_settings) ? "enabled" : "disabled"); 869 870 870 871 /* Get Memory Interleave Range registers */ 871 872 pci_read_config_word(pvt->pci_dev_16_1_fsb_addr_map, MIR0, ··· 959 960 } 960 961 } 961 962 962 - debugf1("System Address, processor bus- PCI Bus ID: %s %x:%x\n", 963 - pci_name(pvt->pci_dev_16_0_fsb_ctlr), 964 - pvt->pci_dev_16_0_fsb_ctlr->vendor, 965 - pvt->pci_dev_16_0_fsb_ctlr->device); 966 - debugf1("Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 967 - pci_name(pvt->pci_dev_16_1_fsb_addr_map), 968 - pvt->pci_dev_16_1_fsb_addr_map->vendor, 969 - pvt->pci_dev_16_1_fsb_addr_map->device); 970 - debugf1("FSB Error Regs - PCI Bus ID: %s %x:%x\n", 971 - pci_name(pvt->pci_dev_16_2_fsb_err_regs), 972 - pvt->pci_dev_16_2_fsb_err_regs->vendor, 973 - pvt->pci_dev_16_2_fsb_err_regs->device); 963 + edac_dbg(1, "System Address, processor bus- PCI Bus ID: %s %x:%x\n", 964 + pci_name(pvt->pci_dev_16_0_fsb_ctlr), 965 + pvt->pci_dev_16_0_fsb_ctlr->vendor, 966 + pvt->pci_dev_16_0_fsb_ctlr->device); 967 + edac_dbg(1, "Branchmap, control and errors - PCI Bus ID: %s %x:%x\n", 968 + pci_name(pvt->pci_dev_16_1_fsb_addr_map), 969 + pvt->pci_dev_16_1_fsb_addr_map->vendor, 970 + pvt->pci_dev_16_1_fsb_addr_map->device); 971 + edac_dbg(1, "FSB Error Regs - PCI Bus ID: %s %x:%x\n", 972 + pci_name(pvt->pci_dev_16_2_fsb_err_regs), 973 + pvt->pci_dev_16_2_fsb_err_regs->vendor, 974 + pvt->pci_dev_16_2_fsb_err_regs->device); 974 975 975 976 pvt->pci_dev_2x_0_fbd_branch[0] = pci_get_device(PCI_VENDOR_ID_INTEL, 976 977 PCI_DEVICE_ID_INTEL_I7300_MCH_FB0, ··· 1021 1022 if (rc == -EIO) 1022 1023 return rc; 1023 1024 1024 - debugf0("MC: pdev bus %u dev=0x%x fn=0x%x\n", 1025 - pdev->bus->number, 1026 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1025 + edac_dbg(0, "MC: pdev bus %u dev=0x%x fn=0x%x\n", 1026 + pdev->bus->number, 1027 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1027 1028 1028 1029 /* We only are looking for func 0 of the set */ 1029 1030 if (PCI_FUNC(pdev->devfn) != 0) ··· 1043 1044 if (mci == NULL) 1044 1045 return -ENOMEM; 1045 1046 1046 - debugf0("MC: mci = %p\n", mci); 1047 + edac_dbg(0, "MC: mci = %p\n", mci); 1047 1048 1048 1049 mci->pdev = &pdev->dev; /* record ptr to the generic device */ 1049 1050 ··· 1076 1077 /* initialize the MC control structure 'csrows' table 1077 1078 * with the mapping and control information */ 1078 1079 if (i7300_get_mc_regs(mci)) { 1079 - debugf0("MC: Setting mci->edac_cap to EDAC_FLAG_NONE\n" 1080 - " because i7300_init_csrows() returned nonzero " 1081 - "value\n"); 1080 + edac_dbg(0, "MC: Setting mci->edac_cap to EDAC_FLAG_NONE because i7300_init_csrows() returned nonzero value\n"); 1082 1081 mci->edac_cap = EDAC_FLAG_NONE; /* no csrows found */ 1083 1082 } else { 1084 - debugf1("MC: Enable error reporting now\n"); 1083 + edac_dbg(1, "MC: Enable error reporting now\n"); 1085 1084 i7300_enable_error_reporting(mci); 1086 1085 } 1087 1086 1088 1087 /* add this new MC control structure to EDAC's list of MCs */ 1089 1088 if (edac_mc_add_mc(mci)) { 1090 - debugf0("MC: failed edac_mc_add_mc()\n"); 1089 + edac_dbg(0, "MC: failed edac_mc_add_mc()\n"); 1091 1090 /* FIXME: perhaps some code should go here that disables error 1092 1091 * reporting if we just enabled it 1093 1092 */ ··· 1127 1130 struct mem_ctl_info *mci; 1128 1131 char *tmp; 1129 1132 1130 - debugf0("\n"); 1133 + edac_dbg(0, "\n"); 1131 1134 1132 1135 if (i7300_pci) 1133 1136 edac_pci_release_generic_ctl(i7300_pci); ··· 1174 1177 { 1175 1178 int pci_rc; 1176 1179 1177 - debugf2("\n"); 1180 + edac_dbg(2, "\n"); 1178 1181 1179 1182 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1180 1183 opstate_init(); ··· 1189 1192 */ 1190 1193 static void __exit i7300_exit(void) 1191 1194 { 1192 - debugf2("\n"); 1195 + edac_dbg(2, "\n"); 1193 1196 pci_unregister_driver(&i7300_driver); 1194 1197 } 1195 1198
+70 -74
drivers/edac/i7core_edac.c
··· 516 516 pci_read_config_dword(pdev, MC_MAX_DOD, &pvt->info.max_dod); 517 517 pci_read_config_dword(pdev, MC_CHANNEL_MAPPER, &pvt->info.ch_map); 518 518 519 - debugf0("QPI %d control=0x%08x status=0x%08x dod=0x%08x map=0x%08x\n", 520 - pvt->i7core_dev->socket, pvt->info.mc_control, pvt->info.mc_status, 521 - pvt->info.max_dod, pvt->info.ch_map); 519 + edac_dbg(0, "QPI %d control=0x%08x status=0x%08x dod=0x%08x map=0x%08x\n", 520 + pvt->i7core_dev->socket, pvt->info.mc_control, 521 + pvt->info.mc_status, pvt->info.max_dod, pvt->info.ch_map); 522 522 523 523 if (ECC_ENABLED(pvt)) { 524 - debugf0("ECC enabled with x%d SDCC\n", ECCx8(pvt) ? 8 : 4); 524 + edac_dbg(0, "ECC enabled with x%d SDCC\n", ECCx8(pvt) ? 8 : 4); 525 525 if (ECCx8(pvt)) 526 526 mode = EDAC_S8ECD8ED; 527 527 else 528 528 mode = EDAC_S4ECD4ED; 529 529 } else { 530 - debugf0("ECC disabled\n"); 530 + edac_dbg(0, "ECC disabled\n"); 531 531 mode = EDAC_NONE; 532 532 } 533 533 534 534 /* FIXME: need to handle the error codes */ 535 - debugf0("DOD Max limits: DIMMS: %d, %d-ranked, %d-banked " 536 - "x%x x 0x%x\n", 537 - numdimms(pvt->info.max_dod), 538 - numrank(pvt->info.max_dod >> 2), 539 - numbank(pvt->info.max_dod >> 4), 540 - numrow(pvt->info.max_dod >> 6), 541 - numcol(pvt->info.max_dod >> 9)); 535 + edac_dbg(0, "DOD Max limits: DIMMS: %d, %d-ranked, %d-banked x%x x 0x%x\n", 536 + numdimms(pvt->info.max_dod), 537 + numrank(pvt->info.max_dod >> 2), 538 + numbank(pvt->info.max_dod >> 4), 539 + numrow(pvt->info.max_dod >> 6), 540 + numcol(pvt->info.max_dod >> 9)); 542 541 543 542 for (i = 0; i < NUM_CHANS; i++) { 544 543 u32 data, dimm_dod[3], value[8]; ··· 546 547 continue; 547 548 548 549 if (!CH_ACTIVE(pvt, i)) { 549 - debugf0("Channel %i is not active\n", i); 550 + edac_dbg(0, "Channel %i is not active\n", i); 550 551 continue; 551 552 } 552 553 if (CH_DISABLED(pvt, i)) { 553 - debugf0("Channel %i is disabled\n", i); 554 + edac_dbg(0, "Channel %i is disabled\n", i); 554 555 continue; 555 556 } 556 557 ··· 581 582 pci_read_config_dword(pvt->pci_ch[i][1], 582 583 MC_DOD_CH_DIMM2, &dimm_dod[2]); 583 584 584 - debugf0("Ch%d phy rd%d, wr%d (0x%08x): " 585 - "%s%s%s%cDIMMs\n", 586 - i, 587 - RDLCH(pvt->info.ch_map, i), WRLCH(pvt->info.ch_map, i), 588 - data, 589 - pvt->channel[i].is_3dimms_present ? "3DIMMS " : "", 590 - pvt->channel[i].is_3dimms_present ? "SINGLE_4R " : "", 591 - pvt->channel[i].has_4rank ? "HAS_4R " : "", 592 - (data & REGISTERED_DIMM) ? 'R' : 'U'); 585 + edac_dbg(0, "Ch%d phy rd%d, wr%d (0x%08x): %s%s%s%cDIMMs\n", 586 + i, 587 + RDLCH(pvt->info.ch_map, i), WRLCH(pvt->info.ch_map, i), 588 + data, 589 + pvt->channel[i].is_3dimms_present ? "3DIMMS " : "", 590 + pvt->channel[i].is_3dimms_present ? "SINGLE_4R " : "", 591 + pvt->channel[i].has_4rank ? "HAS_4R " : "", 592 + (data & REGISTERED_DIMM) ? 'R' : 'U'); 593 593 594 594 for (j = 0; j < 3; j++) { 595 595 u32 banks, ranks, rows, cols; ··· 607 609 /* DDR3 has 8 I/O banks */ 608 610 size = (rows * cols * banks * ranks) >> (20 - 3); 609 611 610 - debugf0("\tdimm %d %d Mb offset: %x, " 611 - "bank: %d, rank: %d, row: %#x, col: %#x\n", 612 - j, size, 613 - RANKOFFSET(dimm_dod[j]), 614 - banks, ranks, rows, cols); 612 + edac_dbg(0, "\tdimm %d %d Mb offset: %x, bank: %d, rank: %d, row: %#x, col: %#x\n", 613 + j, size, 614 + RANKOFFSET(dimm_dod[j]), 615 + banks, ranks, rows, cols); 615 616 616 617 npages = MiB_TO_PAGES(size); 617 618 ··· 646 649 pci_read_config_dword(pdev, MC_SAG_CH_5, &value[5]); 647 650 pci_read_config_dword(pdev, MC_SAG_CH_6, &value[6]); 648 651 pci_read_config_dword(pdev, MC_SAG_CH_7, &value[7]); 649 - debugf1("\t[%i] DIVBY3\tREMOVED\tOFFSET\n", i); 652 + edac_dbg(1, "\t[%i] DIVBY3\tREMOVED\tOFFSET\n", i); 650 653 for (j = 0; j < 8; j++) 651 - debugf1("\t\t%#x\t%#x\t%#x\n", 652 - (value[j] >> 27) & 0x1, 653 - (value[j] >> 24) & 0x7, 654 - (value[j] & ((1 << 24) - 1))); 654 + edac_dbg(1, "\t\t%#x\t%#x\t%#x\n", 655 + (value[j] >> 27) & 0x1, 656 + (value[j] >> 24) & 0x7, 657 + (value[j] & ((1 << 24) - 1))); 655 658 } 656 659 657 660 return 0; ··· 821 824 long value; \ 822 825 int rc; \ 823 826 \ 824 - debugf1("\n"); \ 827 + edac_dbg(1, "\n"); \ 825 828 pvt = mci->pvt_info; \ 826 829 \ 827 830 if (pvt->inject.enable) \ ··· 849 852 struct i7core_pvt *pvt; \ 850 853 \ 851 854 pvt = mci->pvt_info; \ 852 - debugf1("pvt=%p\n", pvt); \ 855 + edac_dbg(1, "pvt=%p\n", pvt); \ 853 856 if (pvt->inject.param < 0) \ 854 857 return sprintf(data, "any\n"); \ 855 858 else \ ··· 880 883 u32 read; 881 884 int count; 882 885 883 - debugf0("setting pci %02x:%02x.%x reg=%02x value=%08x\n", 884 - dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), 885 - where, val); 886 + edac_dbg(0, "setting pci %02x:%02x.%x reg=%02x value=%08x\n", 887 + dev->bus->number, PCI_SLOT(dev->devfn), PCI_FUNC(dev->devfn), 888 + where, val); 886 889 887 890 for (count = 0; count < 10; count++) { 888 891 if (count) ··· 1017 1020 pci_write_config_dword(pvt->pci_noncore, 1018 1021 MC_CFG_CONTROL, 8); 1019 1022 1020 - debugf0("Error inject addr match 0x%016llx, ecc 0x%08x," 1021 - " inject 0x%08x\n", 1022 - mask, pvt->inject.eccmask, injectmask); 1023 + edac_dbg(0, "Error inject addr match 0x%016llx, ecc 0x%08x, inject 0x%08x\n", 1024 + mask, pvt->inject.eccmask, injectmask); 1023 1025 1024 1026 1025 1027 return count; ··· 1038 1042 pci_read_config_dword(pvt->pci_ch[pvt->inject.channel][0], 1039 1043 MC_CHANNEL_ERROR_INJECT, &injectmask); 1040 1044 1041 - debugf0("Inject error read: 0x%018x\n", injectmask); 1045 + edac_dbg(0, "Inject error read: 0x%018x\n", injectmask); 1042 1046 1043 1047 if (injectmask & 0x0c) 1044 1048 pvt->inject.enable = 1; ··· 1055 1059 struct mem_ctl_info *mci = to_mci(dev); \ 1056 1060 struct i7core_pvt *pvt = mci->pvt_info; \ 1057 1061 \ 1058 - debugf1("\n"); \ 1062 + edac_dbg(1, "\n"); \ 1059 1063 if (!pvt->ce_count_available || (pvt->is_registered)) \ 1060 1064 return sprintf(data, "data unavailable\n"); \ 1061 1065 return sprintf(data, "%lu\n", \ ··· 1100 1104 1101 1105 static void addrmatch_release(struct device *device) 1102 1106 { 1103 - debugf1("Releasing device %s\n", dev_name(device)); 1107 + edac_dbg(1, "Releasing device %s\n", dev_name(device)); 1104 1108 kfree(device); 1105 1109 } 1106 1110 ··· 1131 1135 1132 1136 static void all_channel_counts_release(struct device *device) 1133 1137 { 1134 - debugf1("Releasing device %s\n", dev_name(device)); 1138 + edac_dbg(1, "Releasing device %s\n", dev_name(device)); 1135 1139 kfree(device); 1136 1140 } 1137 1141 ··· 1186 1190 dev_set_name(pvt->addrmatch_dev, "inject_addrmatch"); 1187 1191 dev_set_drvdata(pvt->addrmatch_dev, mci); 1188 1192 1189 - debugf1("creating %s\n", dev_name(pvt->addrmatch_dev)); 1193 + edac_dbg(1, "creating %s\n", dev_name(pvt->addrmatch_dev)); 1190 1194 1191 1195 rc = device_add(pvt->addrmatch_dev); 1192 1196 if (rc < 0) ··· 1208 1212 dev_set_name(pvt->chancounts_dev, "all_channel_counts"); 1209 1213 dev_set_drvdata(pvt->chancounts_dev, mci); 1210 1214 1211 - debugf1("creating %s\n", dev_name(pvt->chancounts_dev)); 1215 + edac_dbg(1, "creating %s\n", dev_name(pvt->chancounts_dev)); 1212 1216 1213 1217 rc = device_add(pvt->chancounts_dev); 1214 1218 if (rc < 0) ··· 1221 1225 { 1222 1226 struct i7core_pvt *pvt = mci->pvt_info; 1223 1227 1224 - debugf1("\n"); 1228 + edac_dbg(1, "\n"); 1225 1229 1226 1230 device_remove_file(&mci->dev, &dev_attr_inject_section); 1227 1231 device_remove_file(&mci->dev, &dev_attr_inject_type); ··· 1248 1252 { 1249 1253 int i; 1250 1254 1251 - debugf0("\n"); 1255 + edac_dbg(0, "\n"); 1252 1256 for (i = 0; i < i7core_dev->n_devs; i++) { 1253 1257 struct pci_dev *pdev = i7core_dev->pdev[i]; 1254 1258 if (!pdev) 1255 1259 continue; 1256 - debugf0("Removing dev %02x:%02x.%d\n", 1257 - pdev->bus->number, 1258 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1260 + edac_dbg(0, "Removing dev %02x:%02x.%d\n", 1261 + pdev->bus->number, 1262 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1259 1263 pci_dev_put(pdev); 1260 1264 } 1261 1265 } ··· 1298 1302 1299 1303 while ((b = pci_find_next_bus(b)) != NULL) { 1300 1304 bus = b->number; 1301 - debugf0("Found bus %d\n", bus); 1305 + edac_dbg(0, "Found bus %d\n", bus); 1302 1306 if (bus > last_bus) 1303 1307 last_bus = bus; 1304 1308 } 1305 1309 1306 - debugf0("Last bus %d\n", last_bus); 1310 + edac_dbg(0, "Last bus %d\n", last_bus); 1307 1311 1308 1312 return last_bus; 1309 1313 } ··· 1410 1414 return -ENODEV; 1411 1415 } 1412 1416 1413 - debugf0("Detected socket %d dev %02x:%02x.%d PCI ID %04x:%04x\n", 1414 - socket, bus, dev_descr->dev, 1415 - dev_descr->func, 1416 - PCI_VENDOR_ID_INTEL, dev_descr->dev_id); 1417 + edac_dbg(0, "Detected socket %d dev %02x:%02x.%d PCI ID %04x:%04x\n", 1418 + socket, bus, dev_descr->dev, 1419 + dev_descr->func, 1420 + PCI_VENDOR_ID_INTEL, dev_descr->dev_id); 1417 1421 1418 1422 /* 1419 1423 * As stated on drivers/pci/search.c, the reference count for ··· 1511 1515 family = "unknown"; 1512 1516 pvt->enable_scrub = false; 1513 1517 } 1514 - debugf0("Detected a processor type %s\n", family); 1518 + edac_dbg(0, "Detected a processor type %s\n", family); 1515 1519 } else 1516 1520 goto error; 1517 1521 1518 - debugf0("Associated fn %d.%d, dev = %p, socket %d\n", 1519 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 1520 - pdev, i7core_dev->socket); 1522 + edac_dbg(0, "Associated fn %d.%d, dev = %p, socket %d\n", 1523 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 1524 + pdev, i7core_dev->socket); 1521 1525 1522 1526 if (PCI_SLOT(pdev->devfn) == 3 && 1523 1527 PCI_FUNC(pdev->devfn) == 2) ··· 1614 1618 pci_read_config_dword(pvt->pci_mcr[2], MC_COR_ECC_CNT_5, 1615 1619 &rcv[2][1]); 1616 1620 for (i = 0 ; i < 3; i++) { 1617 - debugf3("MC_COR_ECC_CNT%d = 0x%x; MC_COR_ECC_CNT%d = 0x%x\n", 1618 - (i * 2), rcv[i][0], (i * 2) + 1, rcv[i][1]); 1621 + edac_dbg(3, "MC_COR_ECC_CNT%d = 0x%x; MC_COR_ECC_CNT%d = 0x%x\n", 1622 + (i * 2), rcv[i][0], (i * 2) + 1, rcv[i][1]); 1619 1623 /*if the channel has 3 dimms*/ 1620 1624 if (pvt->channel[i].dimms > 2) { 1621 1625 new0 = DIMM_BOT_COR_ERR(rcv[i][0]); ··· 1646 1650 int new0, new1, new2; 1647 1651 1648 1652 if (!pvt->pci_mcr[4]) { 1649 - debugf0("MCR registers not found\n"); 1653 + edac_dbg(0, "MCR registers not found\n"); 1650 1654 return; 1651 1655 } 1652 1656 ··· 2184 2188 struct i7core_pvt *pvt; 2185 2189 2186 2190 if (unlikely(!mci || !mci->pvt_info)) { 2187 - debugf0("MC: dev = %p\n", &i7core_dev->pdev[0]->dev); 2191 + edac_dbg(0, "MC: dev = %p\n", &i7core_dev->pdev[0]->dev); 2188 2192 2189 2193 i7core_printk(KERN_ERR, "Couldn't find mci handler\n"); 2190 2194 return; ··· 2192 2196 2193 2197 pvt = mci->pvt_info; 2194 2198 2195 - debugf0("MC: mci = %p, dev = %p\n", mci, &i7core_dev->pdev[0]->dev); 2199 + edac_dbg(0, "MC: mci = %p, dev = %p\n", mci, &i7core_dev->pdev[0]->dev); 2196 2200 2197 2201 /* Disable scrubrate setting */ 2198 2202 if (pvt->enable_scrub) ··· 2207 2211 i7core_delete_sysfs_devices(mci); 2208 2212 edac_mc_del_mc(mci->pdev); 2209 2213 2210 - debugf1("%s: free mci struct\n", mci->ctl_name); 2214 + edac_dbg(1, "%s: free mci struct\n", mci->ctl_name); 2211 2215 kfree(mci->ctl_name); 2212 2216 edac_mc_free(mci); 2213 2217 i7core_dev->mci = NULL; ··· 2233 2237 if (unlikely(!mci)) 2234 2238 return -ENOMEM; 2235 2239 2236 - debugf0("MC: mci = %p, dev = %p\n", mci, &i7core_dev->pdev[0]->dev); 2240 + edac_dbg(0, "MC: mci = %p, dev = %p\n", mci, &i7core_dev->pdev[0]->dev); 2237 2241 2238 2242 pvt = mci->pvt_info; 2239 2243 memset(pvt, 0, sizeof(*pvt)); ··· 2276 2280 2277 2281 /* add this new MC control structure to EDAC's list of MCs */ 2278 2282 if (unlikely(edac_mc_add_mc(mci))) { 2279 - debugf0("MC: failed edac_mc_add_mc()\n"); 2283 + edac_dbg(0, "MC: failed edac_mc_add_mc()\n"); 2280 2284 /* FIXME: perhaps some code should go here that disables error 2281 2285 * reporting if we just enabled it 2282 2286 */ ··· 2285 2289 goto fail0; 2286 2290 } 2287 2291 if (i7core_create_sysfs_devices(mci)) { 2288 - debugf0("MC: failed to create sysfs nodes\n"); 2292 + edac_dbg(0, "MC: failed to create sysfs nodes\n"); 2289 2293 edac_mc_del_mc(mci->pdev); 2290 2294 rc = -EINVAL; 2291 2295 goto fail0; ··· 2391 2395 { 2392 2396 struct i7core_dev *i7core_dev; 2393 2397 2394 - debugf0("\n"); 2398 + edac_dbg(0, "\n"); 2395 2399 2396 2400 /* 2397 2401 * we have a trouble here: pdev value for removal will be wrong, since ··· 2440 2444 { 2441 2445 int pci_rc; 2442 2446 2443 - debugf2("\n"); 2447 + edac_dbg(2, "\n"); 2444 2448 2445 2449 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 2446 2450 opstate_init(); ··· 2465 2469 */ 2466 2470 static void __exit i7core_exit(void) 2467 2471 { 2468 - debugf2("\n"); 2472 + edac_dbg(2, "\n"); 2469 2473 pci_unregister_driver(&i7core_driver); 2470 2474 } 2471 2475
+16 -19
drivers/edac/i82443bxgx_edac.c
··· 178 178 { 179 179 struct i82443bxgx_edacmc_error_info info; 180 180 181 - debugf1("MC%d\n", mci->mc_idx); 181 + edac_dbg(1, "MC%d\n", mci->mc_idx); 182 182 i82443bxgx_edacmc_get_error_info(mci, &info); 183 183 i82443bxgx_edacmc_process_error_info(mci, &info, 1); 184 184 } ··· 201 201 dimm = csrow->channels[0]->dimm; 202 202 203 203 pci_read_config_byte(pdev, I82443BXGX_DRB + index, &drbar); 204 - debugf1("MC%d: Row=%d DRB = %#0x\n", 205 - mci->mc_idx,index, drbar); 204 + edac_dbg(1, "MC%d: Row=%d DRB = %#0x\n", 205 + mci->mc_idx, index, drbar); 206 206 row_high_limit = ((u32) drbar << 23); 207 207 /* find the DRAM Chip Select Base address and mask */ 208 - debugf1("MC%d: Row=%d, " 209 - "Boundary Address=%#0x, Last = %#0x\n", 210 - mci->mc_idx, index, row_high_limit, 211 - row_high_limit_last); 208 + edac_dbg(1, "MC%d: Row=%d, Boundary Address=%#0x, Last = %#0x\n", 209 + mci->mc_idx, index, row_high_limit, 210 + row_high_limit_last); 212 211 213 212 /* 440GX goes to 2GB, represented with a DRB of 0. */ 214 213 if (row_high_limit_last && !row_high_limit) ··· 240 241 enum mem_type mtype; 241 242 enum edac_type edac_mode; 242 243 243 - debugf0("MC: %s()\n", __FILE__); 244 + edac_dbg(0, "MC:\n"); 244 245 245 246 /* Something is really hosed if PCI config space reads from 246 247 * the MC aren't working. ··· 258 259 if (mci == NULL) 259 260 return -ENOMEM; 260 261 261 - debugf0("MC: %s(): mci = %p\n", __FILE__, mci); 262 + edac_dbg(0, "MC: mci = %p\n", mci); 262 263 mci->pdev = &pdev->dev; 263 264 mci->mtype_cap = MEM_FLAG_EDO | MEM_FLAG_SDR | MEM_FLAG_RDR; 264 265 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; ··· 274 275 mtype = MEM_RDR; 275 276 break; 276 277 default: 277 - debugf0("Unknown/reserved DRAM type value " 278 - "in DRAMC register!\n"); 278 + edac_dbg(0, "Unknown/reserved DRAM type value in DRAMC register!\n"); 279 279 mtype = -MEM_UNKNOWN; 280 280 } 281 281 ··· 303 305 edac_mode = EDAC_SECDED; 304 306 break; 305 307 default: 306 - debugf0("Unknown/reserved ECC state " 307 - "in NBXCFG register!\n"); 308 + edac_dbg(0, "Unknown/reserved ECC state in NBXCFG register!\n"); 308 309 edac_mode = EDAC_UNKNOWN; 309 310 break; 310 311 } ··· 327 330 mci->ctl_page_to_phys = NULL; 328 331 329 332 if (edac_mc_add_mc(mci)) { 330 - debugf3("failed edac_mc_add_mc()\n"); 333 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 331 334 goto fail; 332 335 } 333 336 ··· 342 345 __func__); 343 346 } 344 347 345 - debugf3("MC: %s(): success\n", __FILE__); 348 + edac_dbg(3, "MC: success\n"); 346 349 return 0; 347 350 348 351 fail: ··· 358 361 { 359 362 int rc; 360 363 361 - debugf0("MC: %s()\n", __FILE__); 364 + edac_dbg(0, "MC:\n"); 362 365 363 366 /* don't need to call pci_enable_device() */ 364 367 rc = i82443bxgx_edacmc_probe1(pdev, ent->driver_data); ··· 373 376 { 374 377 struct mem_ctl_info *mci; 375 378 376 - debugf0("%s()\n", __FILE__); 379 + edac_dbg(0, "\n"); 377 380 378 381 if (i82443bxgx_pci) 379 382 edac_pci_release_generic_ctl(i82443bxgx_pci); ··· 425 428 id = &i82443bxgx_pci_tbl[i]; 426 429 } 427 430 if (!mci_pdev) { 428 - debugf0("i82443bxgx pci_get_device fail\n"); 431 + edac_dbg(0, "i82443bxgx pci_get_device fail\n"); 429 432 pci_rc = -ENODEV; 430 433 goto fail1; 431 434 } ··· 433 436 pci_rc = i82443bxgx_edacmc_init_one(mci_pdev, i82443bxgx_pci_tbl); 434 437 435 438 if (pci_rc < 0) { 436 - debugf0("i82443bxgx init fail\n"); 439 + edac_dbg(0, "i82443bxgx init fail\n"); 437 440 pci_rc = -ENODEV; 438 441 goto fail1; 439 442 }
+11 -12
drivers/edac/i82860_edac.c
··· 136 136 { 137 137 struct i82860_error_info info; 138 138 139 - debugf1("MC%d\n", mci->mc_idx); 139 + edac_dbg(1, "MC%d\n", mci->mc_idx); 140 140 i82860_get_error_info(mci, &info); 141 141 i82860_process_error_info(mci, &info, 1); 142 142 } ··· 167 167 pci_read_config_word(pdev, I82860_GBA + index * 2, &value); 168 168 cumul_size = (value & I82860_GBA_MASK) << 169 169 (I82860_GBA_SHIFT - PAGE_SHIFT); 170 - debugf3("(%d) cumul_size 0x%x\n", index, 171 - cumul_size); 170 + edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); 172 171 173 172 if (cumul_size == last_cumul_size) 174 173 continue; /* not populated */ ··· 209 210 if (!mci) 210 211 return -ENOMEM; 211 212 212 - debugf3("init mci\n"); 213 + edac_dbg(3, "init mci\n"); 213 214 mci->pdev = &pdev->dev; 214 215 mci->mtype_cap = MEM_FLAG_DDR; 215 216 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; ··· 228 229 * type of memory controller. The ID is therefore hardcoded to 0. 229 230 */ 230 231 if (edac_mc_add_mc(mci)) { 231 - debugf3("failed edac_mc_add_mc()\n"); 232 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 232 233 goto fail; 233 234 } 234 235 ··· 244 245 } 245 246 246 247 /* get this far and it's successful */ 247 - debugf3("success\n"); 248 + edac_dbg(3, "success\n"); 248 249 249 250 return 0; 250 251 ··· 259 260 { 260 261 int rc; 261 262 262 - debugf0("\n"); 263 + edac_dbg(0, "\n"); 263 264 i82860_printk(KERN_INFO, "i82860 init one\n"); 264 265 265 266 if (pci_enable_device(pdev) < 0) ··· 277 278 { 278 279 struct mem_ctl_info *mci; 279 280 280 - debugf0("\n"); 281 + edac_dbg(0, "\n"); 281 282 282 283 if (i82860_pci) 283 284 edac_pci_release_generic_ctl(i82860_pci); ··· 310 311 { 311 312 int pci_rc; 312 313 313 - debugf3("\n"); 314 + edac_dbg(3, "\n"); 314 315 315 316 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 316 317 opstate_init(); ··· 323 324 PCI_DEVICE_ID_INTEL_82860_0, NULL); 324 325 325 326 if (mci_pdev == NULL) { 326 - debugf0("860 pci_get_device fail\n"); 327 + edac_dbg(0, "860 pci_get_device fail\n"); 327 328 pci_rc = -ENODEV; 328 329 goto fail1; 329 330 } ··· 331 332 pci_rc = i82860_init_one(mci_pdev, i82860_pci_tbl); 332 333 333 334 if (pci_rc < 0) { 334 - debugf0("860 init fail\n"); 335 + edac_dbg(0, "860 init fail\n"); 335 336 pci_rc = -ENODEV; 336 337 goto fail1; 337 338 } ··· 351 352 352 353 static void __exit i82860_exit(void) 353 354 { 354 - debugf3("\n"); 355 + edac_dbg(3, "\n"); 355 356 356 357 pci_unregister_driver(&i82860_driver); 357 358
+13 -14
drivers/edac/i82875p_edac.c
··· 263 263 { 264 264 struct i82875p_error_info info; 265 265 266 - debugf1("MC%d\n", mci->mc_idx); 266 + edac_dbg(1, "MC%d\n", mci->mc_idx); 267 267 i82875p_get_error_info(mci, &info); 268 268 i82875p_process_error_info(mci, &info, 1); 269 269 } ··· 371 371 372 372 value = readb(ovrfl_window + I82875P_DRB + index); 373 373 cumul_size = value << (I82875P_DRB_SHIFT - PAGE_SHIFT); 374 - debugf3("(%d) cumul_size 0x%x\n", index, 375 - cumul_size); 374 + edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); 376 375 if (cumul_size == last_cumul_size) 377 376 continue; /* not populated */ 378 377 ··· 404 405 u32 nr_chans; 405 406 struct i82875p_error_info discard; 406 407 407 - debugf0("\n"); 408 + edac_dbg(0, "\n"); 408 409 409 410 ovrfl_pdev = pci_get_device(PCI_VEND_DEV(INTEL, 82875_6), NULL); 410 411 ··· 425 426 goto fail0; 426 427 } 427 428 428 - debugf3("init mci\n"); 429 + edac_dbg(3, "init mci\n"); 429 430 mci->pdev = &pdev->dev; 430 431 mci->mtype_cap = MEM_FLAG_DDR; 431 432 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; ··· 436 437 mci->dev_name = pci_name(pdev); 437 438 mci->edac_check = i82875p_check; 438 439 mci->ctl_page_to_phys = NULL; 439 - debugf3("init pvt\n"); 440 + edac_dbg(3, "init pvt\n"); 440 441 pvt = (struct i82875p_pvt *)mci->pvt_info; 441 442 pvt->ovrfl_pdev = ovrfl_pdev; 442 443 pvt->ovrfl_window = ovrfl_window; ··· 447 448 * type of memory controller. The ID is therefore hardcoded to 0. 448 449 */ 449 450 if (edac_mc_add_mc(mci)) { 450 - debugf3("failed edac_mc_add_mc()\n"); 451 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 451 452 goto fail1; 452 453 } 453 454 ··· 463 464 } 464 465 465 466 /* get this far and it's successful */ 466 - debugf3("success\n"); 467 + edac_dbg(3, "success\n"); 467 468 return 0; 468 469 469 470 fail1: ··· 484 485 { 485 486 int rc; 486 487 487 - debugf0("\n"); 488 + edac_dbg(0, "\n"); 488 489 i82875p_printk(KERN_INFO, "i82875p init one\n"); 489 490 490 491 if (pci_enable_device(pdev) < 0) ··· 503 504 struct mem_ctl_info *mci; 504 505 struct i82875p_pvt *pvt = NULL; 505 506 506 - debugf0("\n"); 507 + edac_dbg(0, "\n"); 507 508 508 509 if (i82875p_pci) 509 510 edac_pci_release_generic_ctl(i82875p_pci); ··· 549 550 { 550 551 int pci_rc; 551 552 552 - debugf3("\n"); 553 + edac_dbg(3, "\n"); 553 554 554 555 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 555 556 opstate_init(); ··· 564 565 PCI_DEVICE_ID_INTEL_82875_0, NULL); 565 566 566 567 if (!mci_pdev) { 567 - debugf0("875p pci_get_device fail\n"); 568 + edac_dbg(0, "875p pci_get_device fail\n"); 568 569 pci_rc = -ENODEV; 569 570 goto fail1; 570 571 } ··· 572 573 pci_rc = i82875p_init_one(mci_pdev, i82875p_pci_tbl); 573 574 574 575 if (pci_rc < 0) { 575 - debugf0("875p init fail\n"); 576 + edac_dbg(0, "875p init fail\n"); 576 577 pci_rc = -ENODEV; 577 578 goto fail1; 578 579 } ··· 592 593 593 594 static void __exit i82875p_exit(void) 594 595 { 595 - debugf3("\n"); 596 + edac_dbg(3, "\n"); 596 597 597 598 i82875p_remove_one(mci_pdev); 598 599 pci_dev_put(mci_pdev);
+14 -15
drivers/edac/i82975x_edac.c
··· 331 331 { 332 332 struct i82975x_error_info info; 333 333 334 - debugf1("MC%d\n", mci->mc_idx); 334 + edac_dbg(1, "MC%d\n", mci->mc_idx); 335 335 i82975x_get_error_info(mci, &info); 336 336 i82975x_process_error_info(mci, &info, 1); 337 337 } ··· 406 406 */ 407 407 if (csrow->nr_channels > 1) 408 408 cumul_size <<= 1; 409 - debugf3("(%d) cumul_size 0x%x\n", index, 410 - cumul_size); 409 + edac_dbg(3, "(%d) cumul_size 0x%x\n", index, cumul_size); 411 410 412 411 nr_pages = cumul_size - last_cumul_size; 413 412 if (!nr_pages) ··· 488 489 u8 c1drb[4]; 489 490 #endif 490 491 491 - debugf0("\n"); 492 + edac_dbg(0, "\n"); 492 493 493 494 pci_read_config_dword(pdev, I82975X_MCHBAR, &mchbar); 494 495 if (!(mchbar & 1)) { 495 - debugf3("failed, MCHBAR disabled!\n"); 496 + edac_dbg(3, "failed, MCHBAR disabled!\n"); 496 497 goto fail0; 497 498 } 498 499 mchbar &= 0xffffc000; /* bits 31:14 used for 16K window */ ··· 557 558 goto fail1; 558 559 } 559 560 560 - debugf3("init mci\n"); 561 + edac_dbg(3, "init mci\n"); 561 562 mci->pdev = &pdev->dev; 562 563 mci->mtype_cap = MEM_FLAG_DDR2; 563 564 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; ··· 568 569 mci->dev_name = pci_name(pdev); 569 570 mci->edac_check = i82975x_check; 570 571 mci->ctl_page_to_phys = NULL; 571 - debugf3("init pvt\n"); 572 + edac_dbg(3, "init pvt\n"); 572 573 pvt = (struct i82975x_pvt *) mci->pvt_info; 573 574 pvt->mch_window = mch_window; 574 575 i82975x_init_csrows(mci, pdev, mch_window); ··· 577 578 578 579 /* finalize this instance of memory controller with edac core */ 579 580 if (edac_mc_add_mc(mci)) { 580 - debugf3("failed edac_mc_add_mc()\n"); 581 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 581 582 goto fail2; 582 583 } 583 584 584 585 /* get this far and it's successful */ 585 - debugf3("success\n"); 586 + edac_dbg(3, "success\n"); 586 587 return 0; 587 588 588 589 fail2: ··· 600 601 { 601 602 int rc; 602 603 603 - debugf0("\n"); 604 + edac_dbg(0, "\n"); 604 605 605 606 if (pci_enable_device(pdev) < 0) 606 607 return -EIO; ··· 618 619 struct mem_ctl_info *mci; 619 620 struct i82975x_pvt *pvt; 620 621 621 - debugf0("\n"); 622 + edac_dbg(0, "\n"); 622 623 623 624 mci = edac_mc_del_mc(&pdev->dev); 624 625 if (mci == NULL) ··· 654 655 { 655 656 int pci_rc; 656 657 657 - debugf3("\n"); 658 + edac_dbg(3, "\n"); 658 659 659 660 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 660 661 opstate_init(); ··· 668 669 PCI_DEVICE_ID_INTEL_82975_0, NULL); 669 670 670 671 if (!mci_pdev) { 671 - debugf0("i82975x pci_get_device fail\n"); 672 + edac_dbg(0, "i82975x pci_get_device fail\n"); 672 673 pci_rc = -ENODEV; 673 674 goto fail1; 674 675 } ··· 676 677 pci_rc = i82975x_init_one(mci_pdev, i82975x_pci_tbl); 677 678 678 679 if (pci_rc < 0) { 679 - debugf0("i82975x init fail\n"); 680 + edac_dbg(0, "i82975x init fail\n"); 680 681 pci_rc = -ENODEV; 681 682 goto fail1; 682 683 } ··· 696 697 697 698 static void __exit i82975x_exit(void) 698 699 { 699 - debugf3("\n"); 700 + edac_dbg(3, "\n"); 700 701 701 702 pci_unregister_driver(&i82975x_driver); 702 703
+11 -11
drivers/edac/mpc85xx_edac.c
··· 280 280 out_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_DR, ~0); 281 281 282 282 if (edac_pci_add_device(pci, pdata->edac_idx) > 0) { 283 - debugf3("failed edac_pci_add_device()\n"); 283 + edac_dbg(3, "failed edac_pci_add_device()\n"); 284 284 goto err; 285 285 } 286 286 ··· 303 303 } 304 304 305 305 devres_remove_group(&op->dev, mpc85xx_pci_err_probe); 306 - debugf3("success\n"); 306 + edac_dbg(3, "success\n"); 307 307 printk(KERN_INFO EDAC_MOD_STR " PCI err registered\n"); 308 308 309 309 return 0; ··· 321 321 struct edac_pci_ctl_info *pci = dev_get_drvdata(&op->dev); 322 322 struct mpc85xx_pci_pdata *pdata = pci->pvt_info; 323 323 324 - debugf0("\n"); 324 + edac_dbg(0, "\n"); 325 325 326 326 out_be32(pdata->pci_vbase + MPC85XX_PCI_ERR_CAP_DR, 327 327 orig_pci_err_cap_dr); ··· 582 582 pdata->edac_idx = edac_dev_idx++; 583 583 584 584 if (edac_device_add_device(edac_dev) > 0) { 585 - debugf3("failed edac_device_add_device()\n"); 585 + edac_dbg(3, "failed edac_device_add_device()\n"); 586 586 goto err; 587 587 } 588 588 ··· 610 610 611 611 devres_remove_group(&op->dev, mpc85xx_l2_err_probe); 612 612 613 - debugf3("success\n"); 613 + edac_dbg(3, "success\n"); 614 614 printk(KERN_INFO EDAC_MOD_STR " L2 err registered\n"); 615 615 616 616 return 0; ··· 628 628 struct edac_device_ctl_info *edac_dev = dev_get_drvdata(&op->dev); 629 629 struct mpc85xx_l2_pdata *pdata = edac_dev->pvt_info; 630 630 631 - debugf0("\n"); 631 + edac_dbg(0, "\n"); 632 632 633 633 if (edac_op_state == EDAC_OPSTATE_INT) { 634 634 out_be32(pdata->l2_vbase + MPC85XX_L2_ERRINTEN, 0); ··· 1037 1037 goto err; 1038 1038 } 1039 1039 1040 - debugf3("init mci\n"); 1040 + edac_dbg(3, "init mci\n"); 1041 1041 mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_RDDR2 | 1042 1042 MEM_FLAG_DDR | MEM_FLAG_DDR2; 1043 1043 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; ··· 1063 1063 out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_DETECT, ~0); 1064 1064 1065 1065 if (edac_mc_add_mc(mci)) { 1066 - debugf3("failed edac_mc_add_mc()\n"); 1066 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 1067 1067 goto err; 1068 1068 } 1069 1069 1070 1070 if (mpc85xx_create_sysfs_attributes(mci)) { 1071 1071 edac_mc_del_mc(mci->pdev); 1072 - debugf3("failed edac_mc_add_mc()\n"); 1072 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 1073 1073 goto err; 1074 1074 } 1075 1075 ··· 1103 1103 } 1104 1104 1105 1105 devres_remove_group(&op->dev, mpc85xx_mc_err_probe); 1106 - debugf3("success\n"); 1106 + edac_dbg(3, "success\n"); 1107 1107 printk(KERN_INFO EDAC_MOD_STR " MC err registered\n"); 1108 1108 1109 1109 return 0; ··· 1121 1121 struct mem_ctl_info *mci = dev_get_drvdata(&op->dev); 1122 1122 struct mpc85xx_mc_pdata *pdata = mci->pvt_info; 1123 1123 1124 - debugf0("\n"); 1124 + edac_dbg(0, "\n"); 1125 1125 1126 1126 if (edac_op_state == EDAC_OPSTATE_INT) { 1127 1127 out_be32(pdata->mc_vbase + MPC85XX_MC_ERR_INT_EN, 0);
+13 -13
drivers/edac/mv64x60_edac.c
··· 169 169 MV64X60_PCIx_ERR_MASK_VAL); 170 170 171 171 if (edac_pci_add_device(pci, pdata->edac_idx) > 0) { 172 - debugf3("failed edac_pci_add_device()\n"); 172 + edac_dbg(3, "failed edac_pci_add_device()\n"); 173 173 goto err; 174 174 } 175 175 ··· 194 194 devres_remove_group(&pdev->dev, mv64x60_pci_err_probe); 195 195 196 196 /* get this far and it's successful */ 197 - debugf3("success\n"); 197 + edac_dbg(3, "success\n"); 198 198 199 199 return 0; 200 200 ··· 210 210 { 211 211 struct edac_pci_ctl_info *pci = platform_get_drvdata(pdev); 212 212 213 - debugf0("\n"); 213 + edac_dbg(0, "\n"); 214 214 215 215 edac_pci_del_device(&pdev->dev); 216 216 ··· 336 336 pdata->edac_idx = edac_dev_idx++; 337 337 338 338 if (edac_device_add_device(edac_dev) > 0) { 339 - debugf3("failed edac_device_add_device()\n"); 339 + edac_dbg(3, "failed edac_device_add_device()\n"); 340 340 goto err; 341 341 } 342 342 ··· 363 363 devres_remove_group(&pdev->dev, mv64x60_sram_err_probe); 364 364 365 365 /* get this far and it's successful */ 366 - debugf3("success\n"); 366 + edac_dbg(3, "success\n"); 367 367 368 368 return 0; 369 369 ··· 379 379 { 380 380 struct edac_device_ctl_info *edac_dev = platform_get_drvdata(pdev); 381 381 382 - debugf0("\n"); 382 + edac_dbg(0, "\n"); 383 383 384 384 edac_device_del_device(&pdev->dev); 385 385 edac_device_free_ctl_info(edac_dev); ··· 531 531 pdata->edac_idx = edac_dev_idx++; 532 532 533 533 if (edac_device_add_device(edac_dev) > 0) { 534 - debugf3("failed edac_device_add_device()\n"); 534 + edac_dbg(3, "failed edac_device_add_device()\n"); 535 535 goto err; 536 536 } 537 537 ··· 558 558 devres_remove_group(&pdev->dev, mv64x60_cpu_err_probe); 559 559 560 560 /* get this far and it's successful */ 561 - debugf3("success\n"); 561 + edac_dbg(3, "success\n"); 562 562 563 563 return 0; 564 564 ··· 574 574 { 575 575 struct edac_device_ctl_info *edac_dev = platform_get_drvdata(pdev); 576 576 577 - debugf0("\n"); 577 + edac_dbg(0, "\n"); 578 578 579 579 edac_device_del_device(&pdev->dev); 580 580 edac_device_free_ctl_info(edac_dev); ··· 766 766 goto err2; 767 767 } 768 768 769 - debugf3("init mci\n"); 769 + edac_dbg(3, "init mci\n"); 770 770 mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR; 771 771 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_SECDED; 772 772 mci->edac_cap = EDAC_FLAG_SECDED; ··· 790 790 out_le32(pdata->mc_vbase + MV64X60_SDRAM_ERR_ECC_CNTL, ctl); 791 791 792 792 if (edac_mc_add_mc(mci)) { 793 - debugf3("failed edac_mc_add_mc()\n"); 793 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 794 794 goto err; 795 795 } 796 796 ··· 815 815 } 816 816 817 817 /* get this far and it's successful */ 818 - debugf3("success\n"); 818 + edac_dbg(3, "success\n"); 819 819 820 820 return 0; 821 821 ··· 831 831 { 832 832 struct mem_ctl_info *mci = platform_get_drvdata(pdev); 833 833 834 - debugf0("\n"); 834 + edac_dbg(0, "\n"); 835 835 836 836 edac_mc_del_mc(&pdev->dev); 837 837 edac_mc_free(mci);
+15 -15
drivers/edac/r82600_edac.c
··· 205 205 { 206 206 struct r82600_error_info info; 207 207 208 - debugf1("MC%d\n", mci->mc_idx); 208 + edac_dbg(1, "MC%d\n", mci->mc_idx); 209 209 r82600_get_error_info(mci, &info); 210 210 r82600_process_error_info(mci, &info, 1); 211 211 } ··· 236 236 /* find the DRAM Chip Select Base address and mask */ 237 237 pci_read_config_byte(pdev, R82600_DRBA + index, &drbar); 238 238 239 - debugf1("Row=%d DRBA = %#0x\n", index, drbar); 239 + edac_dbg(1, "Row=%d DRBA = %#0x\n", index, drbar); 240 240 241 241 row_high_limit = ((u32) drbar << 24); 242 242 /* row_high_limit = ((u32)drbar << 24) | 0xffffffUL; */ 243 243 244 - debugf1("Row=%d, Boundary Address=%#0x, Last = %#0x\n", 245 - index, row_high_limit, row_high_limit_last); 244 + edac_dbg(1, "Row=%d, Boundary Address=%#0x, Last = %#0x\n", 245 + index, row_high_limit, row_high_limit_last); 246 246 247 247 /* Empty row [p.57] */ 248 248 if (row_high_limit == row_high_limit_last) ··· 277 277 u32 sdram_refresh_rate; 278 278 struct r82600_error_info discard; 279 279 280 - debugf0("\n"); 280 + edac_dbg(0, "\n"); 281 281 pci_read_config_byte(pdev, R82600_DRAMC, &dramcr); 282 282 pci_read_config_dword(pdev, R82600_EAP, &eapr); 283 283 scrub_disabled = eapr & BIT(31); 284 284 sdram_refresh_rate = dramcr & (BIT(0) | BIT(1)); 285 - debugf2("sdram refresh rate = %#0x\n", sdram_refresh_rate); 286 - debugf2("DRAMC register = %#0x\n", dramcr); 285 + edac_dbg(2, "sdram refresh rate = %#0x\n", sdram_refresh_rate); 286 + edac_dbg(2, "DRAMC register = %#0x\n", dramcr); 287 287 layers[0].type = EDAC_MC_LAYER_CHIP_SELECT; 288 288 layers[0].size = R82600_NR_CSROWS; 289 289 layers[0].is_virt_csrow = true; ··· 294 294 if (mci == NULL) 295 295 return -ENOMEM; 296 296 297 - debugf0("mci = %p\n", mci); 297 + edac_dbg(0, "mci = %p\n", mci); 298 298 mci->pdev = &pdev->dev; 299 299 mci->mtype_cap = MEM_FLAG_RDDR | MEM_FLAG_DDR; 300 300 mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED; ··· 310 310 311 311 if (ecc_enabled(dramcr)) { 312 312 if (scrub_disabled) 313 - debugf3("mci = %p - Scrubbing disabled! EAP: " 314 - "%#0x\n", mci, eapr); 313 + edac_dbg(3, "mci = %p - Scrubbing disabled! EAP: %#0x\n", 314 + mci, eapr); 315 315 } else 316 316 mci->edac_cap = EDAC_FLAG_NONE; 317 317 ··· 328 328 * type of memory controller. The ID is therefore hardcoded to 0. 329 329 */ 330 330 if (edac_mc_add_mc(mci)) { 331 - debugf3("failed edac_mc_add_mc()\n"); 331 + edac_dbg(3, "failed edac_mc_add_mc()\n"); 332 332 goto fail; 333 333 } 334 334 335 335 /* get this far and it's successful */ 336 336 337 337 if (disable_hardware_scrub) { 338 - debugf3("Disabling Hardware Scrub (scrub on error)\n"); 338 + edac_dbg(3, "Disabling Hardware Scrub (scrub on error)\n"); 339 339 pci_write_bits32(pdev, R82600_EAP, BIT(31), BIT(31)); 340 340 } 341 341 ··· 350 350 __func__); 351 351 } 352 352 353 - debugf3("success\n"); 353 + edac_dbg(3, "success\n"); 354 354 return 0; 355 355 356 356 fail: ··· 362 362 static int __devinit r82600_init_one(struct pci_dev *pdev, 363 363 const struct pci_device_id *ent) 364 364 { 365 - debugf0("\n"); 365 + edac_dbg(0, "\n"); 366 366 367 367 /* don't need to call pci_enable_device() */ 368 368 return r82600_probe1(pdev, ent->driver_data); ··· 372 372 { 373 373 struct mem_ctl_info *mci; 374 374 375 - debugf0("\n"); 375 + edac_dbg(0, "\n"); 376 376 377 377 if (r82600_pci) 378 378 edac_pci_release_generic_ctl(r82600_pci);
+119 -121
drivers/edac/sb_edac.c
··· 381 381 int ranks = (1 << RANK_CNT_BITS(mtr)); 382 382 383 383 if (ranks > 4) { 384 - debugf0("Invalid number of ranks: %d (max = 4) raw value = %x (%04x)", 385 - ranks, (unsigned int)RANK_CNT_BITS(mtr), mtr); 384 + edac_dbg(0, "Invalid number of ranks: %d (max = 4) raw value = %x (%04x)\n", 385 + ranks, (unsigned int)RANK_CNT_BITS(mtr), mtr); 386 386 return -EINVAL; 387 387 } 388 388 ··· 394 394 int rows = (RANK_WIDTH_BITS(mtr) + 12); 395 395 396 396 if (rows < 13 || rows > 18) { 397 - debugf0("Invalid number of rows: %d (should be between 14 and 17) raw value = %x (%04x)", 398 - rows, (unsigned int)RANK_WIDTH_BITS(mtr), mtr); 397 + edac_dbg(0, "Invalid number of rows: %d (should be between 14 and 17) raw value = %x (%04x)\n", 398 + rows, (unsigned int)RANK_WIDTH_BITS(mtr), mtr); 399 399 return -EINVAL; 400 400 } 401 401 ··· 407 407 int cols = (COL_WIDTH_BITS(mtr) + 10); 408 408 409 409 if (cols > 12) { 410 - debugf0("Invalid number of cols: %d (max = 4) raw value = %x (%04x)", 411 - cols, (unsigned int)COL_WIDTH_BITS(mtr), mtr); 410 + edac_dbg(0, "Invalid number of cols: %d (max = 4) raw value = %x (%04x)\n", 411 + cols, (unsigned int)COL_WIDTH_BITS(mtr), mtr); 412 412 return -EINVAL; 413 413 } 414 414 ··· 475 475 476 476 if (PCI_SLOT(sbridge_dev->pdev[i]->devfn) == slot && 477 477 PCI_FUNC(sbridge_dev->pdev[i]->devfn) == func) { 478 - debugf1("Associated %02x.%02x.%d with %p\n", 479 - bus, slot, func, sbridge_dev->pdev[i]); 478 + edac_dbg(1, "Associated %02x.%02x.%d with %p\n", 479 + bus, slot, func, sbridge_dev->pdev[i]); 480 480 return sbridge_dev->pdev[i]; 481 481 } 482 482 } ··· 523 523 524 524 pci_read_config_dword(pvt->pci_br, SAD_CONTROL, &reg); 525 525 pvt->sbridge_dev->node_id = NODE_ID(reg); 526 - debugf0("mc#%d: Node ID: %d, source ID: %d\n", 527 - pvt->sbridge_dev->mc, 528 - pvt->sbridge_dev->node_id, 529 - pvt->sbridge_dev->source_id); 526 + edac_dbg(0, "mc#%d: Node ID: %d, source ID: %d\n", 527 + pvt->sbridge_dev->mc, 528 + pvt->sbridge_dev->node_id, 529 + pvt->sbridge_dev->source_id); 530 530 531 531 pci_read_config_dword(pvt->pci_ras, RASENABLES, &reg); 532 532 if (IS_MIRROR_ENABLED(reg)) { 533 - debugf0("Memory mirror is enabled\n"); 533 + edac_dbg(0, "Memory mirror is enabled\n"); 534 534 pvt->is_mirrored = true; 535 535 } else { 536 - debugf0("Memory mirror is disabled\n"); 536 + edac_dbg(0, "Memory mirror is disabled\n"); 537 537 pvt->is_mirrored = false; 538 538 } 539 539 540 540 pci_read_config_dword(pvt->pci_ta, MCMTR, &pvt->info.mcmtr); 541 541 if (IS_LOCKSTEP_ENABLED(pvt->info.mcmtr)) { 542 - debugf0("Lockstep is enabled\n"); 542 + edac_dbg(0, "Lockstep is enabled\n"); 543 543 mode = EDAC_S8ECD8ED; 544 544 pvt->is_lockstep = true; 545 545 } else { 546 - debugf0("Lockstep is disabled\n"); 546 + edac_dbg(0, "Lockstep is disabled\n"); 547 547 mode = EDAC_S4ECD4ED; 548 548 pvt->is_lockstep = false; 549 549 } 550 550 if (IS_CLOSE_PG(pvt->info.mcmtr)) { 551 - debugf0("address map is on closed page mode\n"); 551 + edac_dbg(0, "address map is on closed page mode\n"); 552 552 pvt->is_close_pg = true; 553 553 } else { 554 - debugf0("address map is on open page mode\n"); 554 + edac_dbg(0, "address map is on open page mode\n"); 555 555 pvt->is_close_pg = false; 556 556 } 557 557 558 558 pci_read_config_dword(pvt->pci_ta, RANK_CFG_A, &reg); 559 559 if (IS_RDIMM_ENABLED(reg)) { 560 560 /* FIXME: Can also be LRDIMM */ 561 - debugf0("Memory is registered\n"); 561 + edac_dbg(0, "Memory is registered\n"); 562 562 mtype = MEM_RDDR3; 563 563 } else { 564 - debugf0("Memory is unregistered\n"); 564 + edac_dbg(0, "Memory is unregistered\n"); 565 565 mtype = MEM_DDR3; 566 566 } 567 567 ··· 576 576 i, j, 0); 577 577 pci_read_config_dword(pvt->pci_tad[i], 578 578 mtr_regs[j], &mtr); 579 - debugf4("Channel #%d MTR%d = %x\n", i, j, mtr); 579 + edac_dbg(4, "Channel #%d MTR%d = %x\n", i, j, mtr); 580 580 if (IS_DIMM_PRESENT(mtr)) { 581 581 pvt->channel[i].dimms++; 582 582 ··· 588 588 size = (rows * cols * banks * ranks) >> (20 - 3); 589 589 npages = MiB_TO_PAGES(size); 590 590 591 - debugf0("mc#%d: channel %d, dimm %d, %d Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n", 592 - pvt->sbridge_dev->mc, i, j, 593 - size, npages, 594 - banks, ranks, rows, cols); 591 + edac_dbg(0, "mc#%d: channel %d, dimm %d, %d Mb (%d pages) bank: %d, rank: %d, row: %#x, col: %#x\n", 592 + pvt->sbridge_dev->mc, i, j, 593 + size, npages, 594 + banks, ranks, rows, cols); 595 595 596 596 dimm->nr_pages = npages; 597 597 dimm->grain = 32; ··· 629 629 tmp_mb = (1 + pvt->tolm) >> 20; 630 630 631 631 mb = div_u64_rem(tmp_mb, 1000, &kb); 632 - debugf0("TOLM: %u.%03u GB (0x%016Lx)\n", 633 - mb, kb, (u64)pvt->tolm); 632 + edac_dbg(0, "TOLM: %u.%03u GB (0x%016Lx)\n", mb, kb, (u64)pvt->tolm); 634 633 635 634 /* Address range is already 45:25 */ 636 635 pci_read_config_dword(pvt->pci_sad1, TOHM, ··· 638 639 tmp_mb = (1 + pvt->tohm) >> 20; 639 640 640 641 mb = div_u64_rem(tmp_mb, 1000, &kb); 641 - debugf0("TOHM: %u.%03u GB (0x%016Lx)", 642 - mb, kb, (u64)pvt->tohm); 642 + edac_dbg(0, "TOHM: %u.%03u GB (0x%016Lx)", mb, kb, (u64)pvt->tohm); 643 643 644 644 /* 645 645 * Step 2) Get SAD range and SAD Interleave list ··· 661 663 662 664 tmp_mb = (limit + 1) >> 20; 663 665 mb = div_u64_rem(tmp_mb, 1000, &kb); 664 - debugf0("SAD#%d %s up to %u.%03u GB (0x%016Lx) %s reg=0x%08x\n", 665 - n_sads, 666 - get_dram_attr(reg), 667 - mb, kb, 668 - ((u64)tmp_mb) << 20L, 669 - INTERLEAVE_MODE(reg) ? "Interleave: 8:6" : "Interleave: [8:6]XOR[18:16]", 670 - reg); 666 + edac_dbg(0, "SAD#%d %s up to %u.%03u GB (0x%016Lx) Interleave: %s reg=0x%08x\n", 667 + n_sads, 668 + get_dram_attr(reg), 669 + mb, kb, 670 + ((u64)tmp_mb) << 20L, 671 + INTERLEAVE_MODE(reg) ? "8:6" : "[8:6]XOR[18:16]", 672 + reg); 671 673 prv = limit; 672 674 673 675 pci_read_config_dword(pvt->pci_sad0, interleave_list[n_sads], ··· 677 679 if (j > 0 && sad_interl == sad_pkg(reg, j)) 678 680 break; 679 681 680 - debugf0("SAD#%d, interleave #%d: %d\n", 681 - n_sads, j, sad_pkg(reg, j)); 682 + edac_dbg(0, "SAD#%d, interleave #%d: %d\n", 683 + n_sads, j, sad_pkg(reg, j)); 682 684 } 683 685 } 684 686 ··· 695 697 tmp_mb = (limit + 1) >> 20; 696 698 697 699 mb = div_u64_rem(tmp_mb, 1000, &kb); 698 - debugf0("TAD#%d: up to %u.%03u GB (0x%016Lx), socket interleave %d, memory interleave %d, TGT: %d, %d, %d, %d, reg=0x%08x\n", 699 - n_tads, mb, kb, 700 - ((u64)tmp_mb) << 20L, 701 - (u32)TAD_SOCK(reg), 702 - (u32)TAD_CH(reg), 703 - (u32)TAD_TGT0(reg), 704 - (u32)TAD_TGT1(reg), 705 - (u32)TAD_TGT2(reg), 706 - (u32)TAD_TGT3(reg), 707 - reg); 700 + edac_dbg(0, "TAD#%d: up to %u.%03u GB (0x%016Lx), socket interleave %d, memory interleave %d, TGT: %d, %d, %d, %d, reg=0x%08x\n", 701 + n_tads, mb, kb, 702 + ((u64)tmp_mb) << 20L, 703 + (u32)TAD_SOCK(reg), 704 + (u32)TAD_CH(reg), 705 + (u32)TAD_TGT0(reg), 706 + (u32)TAD_TGT1(reg), 707 + (u32)TAD_TGT2(reg), 708 + (u32)TAD_TGT3(reg), 709 + reg); 708 710 prv = limit; 709 711 } 710 712 ··· 720 722 &reg); 721 723 tmp_mb = TAD_OFFSET(reg) >> 20; 722 724 mb = div_u64_rem(tmp_mb, 1000, &kb); 723 - debugf0("TAD CH#%d, offset #%d: %u.%03u GB (0x%016Lx), reg=0x%08x\n", 724 - i, j, 725 - mb, kb, 726 - ((u64)tmp_mb) << 20L, 727 - reg); 725 + edac_dbg(0, "TAD CH#%d, offset #%d: %u.%03u GB (0x%016Lx), reg=0x%08x\n", 726 + i, j, 727 + mb, kb, 728 + ((u64)tmp_mb) << 20L, 729 + reg); 728 730 } 729 731 } 730 732 ··· 745 747 tmp_mb = RIR_LIMIT(reg) >> 20; 746 748 rir_way = 1 << RIR_WAY(reg); 747 749 mb = div_u64_rem(tmp_mb, 1000, &kb); 748 - debugf0("CH#%d RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d, reg=0x%08x\n", 749 - i, j, 750 - mb, kb, 751 - ((u64)tmp_mb) << 20L, 752 - rir_way, 753 - reg); 750 + edac_dbg(0, "CH#%d RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d, reg=0x%08x\n", 751 + i, j, 752 + mb, kb, 753 + ((u64)tmp_mb) << 20L, 754 + rir_way, 755 + reg); 754 756 755 757 for (k = 0; k < rir_way; k++) { 756 758 pci_read_config_dword(pvt->pci_tad[i], ··· 759 761 tmp_mb = RIR_OFFSET(reg) << 6; 760 762 761 763 mb = div_u64_rem(tmp_mb, 1000, &kb); 762 - debugf0("CH#%d RIR#%d INTL#%d, offset %u.%03u GB (0x%016Lx), tgt: %d, reg=0x%08x\n", 763 - i, j, k, 764 - mb, kb, 765 - ((u64)tmp_mb) << 20L, 766 - (u32)RIR_RNK_TGT(reg), 767 - reg); 764 + edac_dbg(0, "CH#%d RIR#%d INTL#%d, offset %u.%03u GB (0x%016Lx), tgt: %d, reg=0x%08x\n", 765 + i, j, k, 766 + mb, kb, 767 + ((u64)tmp_mb) << 20L, 768 + (u32)RIR_RNK_TGT(reg), 769 + reg); 768 770 } 769 771 } 770 772 } ··· 851 853 if (sad_way > 0 && sad_interl == sad_pkg(reg, sad_way)) 852 854 break; 853 855 sad_interleave[sad_way] = sad_pkg(reg, sad_way); 854 - debugf0("SAD interleave #%d: %d\n", 855 - sad_way, sad_interleave[sad_way]); 856 + edac_dbg(0, "SAD interleave #%d: %d\n", 857 + sad_way, sad_interleave[sad_way]); 856 858 } 857 - debugf0("mc#%d: Error detected on SAD#%d: address 0x%016Lx < 0x%016Lx, Interleave [%d:6]%s\n", 858 - pvt->sbridge_dev->mc, 859 - n_sads, 860 - addr, 861 - limit, 862 - sad_way + 7, 863 - interleave_mode ? "" : "XOR[18:16]"); 859 + edac_dbg(0, "mc#%d: Error detected on SAD#%d: address 0x%016Lx < 0x%016Lx, Interleave [%d:6]%s\n", 860 + pvt->sbridge_dev->mc, 861 + n_sads, 862 + addr, 863 + limit, 864 + sad_way + 7, 865 + interleave_mode ? "" : "XOR[18:16]"); 864 866 if (interleave_mode) 865 867 idx = ((addr >> 6) ^ (addr >> 16)) & 7; 866 868 else ··· 882 884 return -EINVAL; 883 885 } 884 886 *socket = sad_interleave[idx]; 885 - debugf0("SAD interleave index: %d (wayness %d) = CPU socket %d\n", 886 - idx, sad_way, *socket); 887 + edac_dbg(0, "SAD interleave index: %d (wayness %d) = CPU socket %d\n", 888 + idx, sad_way, *socket); 887 889 888 890 /* 889 891 * Move to the proper node structure, in order to access the ··· 970 972 971 973 offset = TAD_OFFSET(tad_offset); 972 974 973 - debugf0("TAD#%d: address 0x%016Lx < 0x%016Lx, socket interleave %d, channel interleave %d (offset 0x%08Lx), index %d, base ch: %d, ch mask: 0x%02lx\n", 974 - n_tads, 975 - addr, 976 - limit, 977 - (u32)TAD_SOCK(reg), 978 - ch_way, 979 - offset, 980 - idx, 981 - base_ch, 982 - *channel_mask); 975 + edac_dbg(0, "TAD#%d: address 0x%016Lx < 0x%016Lx, socket interleave %d, channel interleave %d (offset 0x%08Lx), index %d, base ch: %d, ch mask: 0x%02lx\n", 976 + n_tads, 977 + addr, 978 + limit, 979 + (u32)TAD_SOCK(reg), 980 + ch_way, 981 + offset, 982 + idx, 983 + base_ch, 984 + *channel_mask); 983 985 984 986 /* Calculate channel address */ 985 987 /* Remove the TAD offset */ ··· 1015 1017 1016 1018 limit = RIR_LIMIT(reg); 1017 1019 mb = div_u64_rem(limit >> 20, 1000, &kb); 1018 - debugf0("RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d\n", 1019 - n_rir, 1020 - mb, kb, 1021 - limit, 1022 - 1 << RIR_WAY(reg)); 1020 + edac_dbg(0, "RIR#%d, limit: %u.%03u GB (0x%016Lx), way: %d\n", 1021 + n_rir, 1022 + mb, kb, 1023 + limit, 1024 + 1 << RIR_WAY(reg)); 1023 1025 if (ch_addr <= limit) 1024 1026 break; 1025 1027 } ··· 1040 1042 &reg); 1041 1043 *rank = RIR_RNK_TGT(reg); 1042 1044 1043 - debugf0("RIR#%d: channel address 0x%08Lx < 0x%08Lx, RIR interleave %d, index %d\n", 1044 - n_rir, 1045 - ch_addr, 1046 - limit, 1047 - rir_way, 1048 - idx); 1045 + edac_dbg(0, "RIR#%d: channel address 0x%08Lx < 0x%08Lx, RIR interleave %d, index %d\n", 1046 + n_rir, 1047 + ch_addr, 1048 + limit, 1049 + rir_way, 1050 + idx); 1049 1051 1050 1052 return 0; 1051 1053 } ··· 1062 1064 { 1063 1065 int i; 1064 1066 1065 - debugf0("\n"); 1067 + edac_dbg(0, "\n"); 1066 1068 for (i = 0; i < sbridge_dev->n_devs; i++) { 1067 1069 struct pci_dev *pdev = sbridge_dev->pdev[i]; 1068 1070 if (!pdev) 1069 1071 continue; 1070 - debugf0("Removing dev %02x:%02x.%d\n", 1071 - pdev->bus->number, 1072 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1072 + edac_dbg(0, "Removing dev %02x:%02x.%d\n", 1073 + pdev->bus->number, 1074 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn)); 1073 1075 pci_dev_put(pdev); 1074 1076 } 1075 1077 } ··· 1175 1177 return -ENODEV; 1176 1178 } 1177 1179 1178 - debugf0("Detected dev %02x:%d.%d PCI ID %04x:%04x\n", 1179 - bus, dev_descr->dev, 1180 - dev_descr->func, 1181 - PCI_VENDOR_ID_INTEL, dev_descr->dev_id); 1180 + edac_dbg(0, "Detected dev %02x:%d.%d PCI ID %04x:%04x\n", 1181 + bus, dev_descr->dev, dev_descr->func, 1182 + PCI_VENDOR_ID_INTEL, dev_descr->dev_id); 1182 1183 1183 1184 /* 1184 1185 * As stated on drivers/pci/search.c, the reference count for ··· 1294 1297 goto error; 1295 1298 } 1296 1299 1297 - debugf0("Associated PCI %02x.%02d.%d with dev = %p\n", 1298 - sbridge_dev->bus, 1299 - PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 1300 - pdev); 1300 + edac_dbg(0, "Associated PCI %02x.%02d.%d with dev = %p\n", 1301 + sbridge_dev->bus, 1302 + PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn), 1303 + pdev); 1301 1304 } 1302 1305 1303 1306 /* Check if everything were registered */ ··· 1442 1445 channel_mask, 1443 1446 rank); 1444 1447 1445 - debugf0("%s", msg); 1448 + edac_dbg(0, "%s\n", msg); 1446 1449 1447 1450 /* FIXME: need support for channel mask */ 1448 1451 ··· 1589 1592 struct sbridge_pvt *pvt; 1590 1593 1591 1594 if (unlikely(!mci || !mci->pvt_info)) { 1592 - debugf0("MC: dev = %p\n", &sbridge_dev->pdev[0]->dev); 1595 + edac_dbg(0, "MC: dev = %p\n", &sbridge_dev->pdev[0]->dev); 1593 1596 1594 1597 sbridge_printk(KERN_ERR, "Couldn't find mci handler\n"); 1595 1598 return; ··· 1597 1600 1598 1601 pvt = mci->pvt_info; 1599 1602 1600 - debugf0("MC: mci = %p, dev = %p\n", 1601 - mci, &sbridge_dev->pdev[0]->dev); 1603 + edac_dbg(0, "MC: mci = %p, dev = %p\n", 1604 + mci, &sbridge_dev->pdev[0]->dev); 1602 1605 1603 1606 mce_unregister_decode_chain(&sbridge_mce_dec); 1604 1607 1605 1608 /* Remove MC sysfs nodes */ 1606 1609 edac_mc_del_mc(mci->pdev); 1607 1610 1608 - debugf1("%s: free mci struct\n", mci->ctl_name); 1611 + edac_dbg(1, "%s: free mci struct\n", mci->ctl_name); 1609 1612 kfree(mci->ctl_name); 1610 1613 edac_mc_free(mci); 1611 1614 sbridge_dev->mci = NULL; ··· 1636 1639 if (unlikely(!mci)) 1637 1640 return -ENOMEM; 1638 1641 1639 - debugf0("MC: mci = %p, dev = %p\n", 1640 - mci, &sbridge_dev->pdev[0]->dev); 1642 + edac_dbg(0, "MC: mci = %p, dev = %p\n", 1643 + mci, &sbridge_dev->pdev[0]->dev); 1641 1644 1642 1645 pvt = mci->pvt_info; 1643 1646 memset(pvt, 0, sizeof(*pvt)); ··· 1672 1675 1673 1676 /* add this new MC control structure to EDAC's list of MCs */ 1674 1677 if (unlikely(edac_mc_add_mc(mci))) { 1675 - debugf0("MC: failed edac_mc_add_mc()\n"); 1678 + edac_dbg(0, "MC: failed edac_mc_add_mc()\n"); 1676 1679 rc = -EINVAL; 1677 1680 goto fail0; 1678 1681 } ··· 1720 1723 mc = 0; 1721 1724 1722 1725 list_for_each_entry(sbridge_dev, &sbridge_edac_list, list) { 1723 - debugf0("Registering MC#%d (%d of %d)\n", mc, mc + 1, num_mc); 1726 + edac_dbg(0, "Registering MC#%d (%d of %d)\n", 1727 + mc, mc + 1, num_mc); 1724 1728 sbridge_dev->mc = mc++; 1725 1729 rc = sbridge_register_mci(sbridge_dev); 1726 1730 if (unlikely(rc < 0)) ··· 1751 1753 { 1752 1754 struct sbridge_dev *sbridge_dev; 1753 1755 1754 - debugf0("\n"); 1756 + edac_dbg(0, "\n"); 1755 1757 1756 1758 /* 1757 1759 * we have a trouble here: pdev value for removal will be wrong, since ··· 1800 1802 { 1801 1803 int pci_rc; 1802 1804 1803 - debugf2("\n"); 1805 + edac_dbg(2, "\n"); 1804 1806 1805 1807 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 1806 1808 opstate_init(); ··· 1822 1824 */ 1823 1825 static void __exit sbridge_exit(void) 1824 1826 { 1825 - debugf2("\n"); 1827 + edac_dbg(2, "\n"); 1826 1828 pci_unregister_driver(&sbridge_driver); 1827 1829 } 1828 1830
+13 -13
drivers/edac/x38_edac.c
··· 103 103 104 104 pci_read_config_byte(pdev, X38_CAPID0 + 8, &capid0_8b); 105 105 if (capid0_8b & 0x20) { /* check DCD: Dual Channel Disable */ 106 - debugf0("In single channel mode.\n"); 106 + edac_dbg(0, "In single channel mode\n"); 107 107 x38_channel_num = 1; 108 108 } else { 109 - debugf0("In dual channel mode.\n"); 109 + edac_dbg(0, "In dual channel mode\n"); 110 110 x38_channel_num = 2; 111 111 } 112 112 ··· 243 243 { 244 244 struct x38_error_info info; 245 245 246 - debugf1("MC%d\n", mci->mc_idx); 246 + edac_dbg(1, "MC%d\n", mci->mc_idx); 247 247 x38_get_and_clear_error_info(mci, &info); 248 248 x38_process_error_info(mci, &info); 249 249 } ··· 331 331 bool stacked; 332 332 void __iomem *window; 333 333 334 - debugf0("MC:\n"); 334 + edac_dbg(0, "MC:\n"); 335 335 336 336 window = x38_map_mchbar(pdev); 337 337 if (!window) ··· 352 352 if (!mci) 353 353 return -ENOMEM; 354 354 355 - debugf3("MC: init mci\n"); 355 + edac_dbg(3, "MC: init mci\n"); 356 356 357 357 mci->pdev = &pdev->dev; 358 358 mci->mtype_cap = MEM_FLAG_DDR2; ··· 402 402 403 403 rc = -ENODEV; 404 404 if (edac_mc_add_mc(mci)) { 405 - debugf3("MC: failed edac_mc_add_mc()\n"); 405 + edac_dbg(3, "MC: failed edac_mc_add_mc()\n"); 406 406 goto fail; 407 407 } 408 408 409 409 /* get this far and it's successful */ 410 - debugf3("MC: success\n"); 410 + edac_dbg(3, "MC: success\n"); 411 411 return 0; 412 412 413 413 fail: ··· 423 423 { 424 424 int rc; 425 425 426 - debugf0("MC:\n"); 426 + edac_dbg(0, "MC:\n"); 427 427 428 428 if (pci_enable_device(pdev) < 0) 429 429 return -EIO; ··· 439 439 { 440 440 struct mem_ctl_info *mci; 441 441 442 - debugf0("\n"); 442 + edac_dbg(0, "\n"); 443 443 444 444 mci = edac_mc_del_mc(&pdev->dev); 445 445 if (!mci) ··· 472 472 { 473 473 int pci_rc; 474 474 475 - debugf3("MC:\n"); 475 + edac_dbg(3, "MC:\n"); 476 476 477 477 /* Ensure that the OPSTATE is set correctly for POLL or NMI */ 478 478 opstate_init(); ··· 486 486 mci_pdev = pci_get_device(PCI_VENDOR_ID_INTEL, 487 487 PCI_DEVICE_ID_INTEL_X38_HB, NULL); 488 488 if (!mci_pdev) { 489 - debugf0("x38 pci_get_device fail\n"); 489 + edac_dbg(0, "x38 pci_get_device fail\n"); 490 490 pci_rc = -ENODEV; 491 491 goto fail1; 492 492 } 493 493 494 494 pci_rc = x38_init_one(mci_pdev, x38_pci_tbl); 495 495 if (pci_rc < 0) { 496 - debugf0("x38 init fail\n"); 496 + edac_dbg(0, "x38 init fail\n"); 497 497 pci_rc = -ENODEV; 498 498 goto fail1; 499 499 } ··· 513 513 514 514 static void __exit x38_exit(void) 515 515 { 516 - debugf3("MC:\n"); 516 + edac_dbg(3, "MC:\n"); 517 517 518 518 pci_unregister_driver(&x38_driver); 519 519 if (!x38_registered) {