diff options
author | Borislav Petkov <borislav.petkov@amd.com> | 2011-02-03 09:59:57 -0500 |
---|---|---|
committer | Borislav Petkov <borislav.petkov@amd.com> | 2011-02-10 08:41:49 -0500 |
commit | 4d7963648f1666ce10cb52391682589af5a62f9a (patch) | |
tree | d4bc1077e2e80f15a7336244fc0bf7048070f41b | |
parent | 100b33c8bd8a3235fd0b7948338d6cbb3db3c63d (diff) |
amd64_edac: Fix DIMMs per DCTs output
amd64_debug_display_dimm_sizes() reports the distribution of the DIMMs
on each DRAM controller and its chip select sizes. Thus, the last don't
have anything to do with whether we're running in ganged DCT mode or not
- their sizes don't change all of a sudden. Fix that by removing the
ganged-check and dump DCT0's config for DCT1 when in ganged mode since
they're identical.
Reported-and-tested-by: Markus Trippelsdorf <markus@trippelsdorf.de>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
-rw-r--r-- | drivers/edac/amd64_edac.c | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c index 4a5ecc58025d..23e03554f0d3 100644 --- a/drivers/edac/amd64_edac.c +++ b/drivers/edac/amd64_edac.c | |||
@@ -826,8 +826,6 @@ static void amd64_dump_dramcfg_low(u32 dclr, int chan) | |||
826 | /* Display and decode various NB registers for debug purposes. */ | 826 | /* Display and decode various NB registers for debug purposes. */ |
827 | static void amd64_dump_misc_regs(struct amd64_pvt *pvt) | 827 | static void amd64_dump_misc_regs(struct amd64_pvt *pvt) |
828 | { | 828 | { |
829 | int ganged; | ||
830 | |||
831 | debugf1("F3xE8 (NB Cap): 0x%08x\n", pvt->nbcap); | 829 | debugf1("F3xE8 (NB Cap): 0x%08x\n", pvt->nbcap); |
832 | 830 | ||
833 | debugf1(" NB two channel DRAM capable: %s\n", | 831 | debugf1(" NB two channel DRAM capable: %s\n", |
@@ -851,28 +849,19 @@ static void amd64_dump_misc_regs(struct amd64_pvt *pvt) | |||
851 | debugf1(" DramHoleValid: %s\n", | 849 | debugf1(" DramHoleValid: %s\n", |
852 | (pvt->dhar & DHAR_VALID) ? "yes" : "no"); | 850 | (pvt->dhar & DHAR_VALID) ? "yes" : "no"); |
853 | 851 | ||
852 | amd64_debug_display_dimm_sizes(0, pvt); | ||
853 | |||
854 | /* everything below this point is Fam10h and above */ | 854 | /* everything below this point is Fam10h and above */ |
855 | if (boot_cpu_data.x86 == 0xf) { | 855 | if (boot_cpu_data.x86 == 0xf) |
856 | amd64_debug_display_dimm_sizes(0, pvt); | ||
857 | return; | 856 | return; |
858 | } | 857 | |
858 | amd64_debug_display_dimm_sizes(1, pvt); | ||
859 | 859 | ||
860 | amd64_info("using %s syndromes.\n", ((pvt->syn_type == 8) ? "x8" : "x4")); | 860 | amd64_info("using %s syndromes.\n", ((pvt->syn_type == 8) ? "x8" : "x4")); |
861 | 861 | ||
862 | /* Only if NOT ganged does dclr1 have valid info */ | 862 | /* Only if NOT ganged does dclr1 have valid info */ |
863 | if (!dct_ganging_enabled(pvt)) | 863 | if (!dct_ganging_enabled(pvt)) |
864 | amd64_dump_dramcfg_low(pvt->dclr1, 1); | 864 | amd64_dump_dramcfg_low(pvt->dclr1, 1); |
865 | |||
866 | /* | ||
867 | * Determine if ganged and then dump memory sizes for first controller, | ||
868 | * and if NOT ganged dump info for 2nd controller. | ||
869 | */ | ||
870 | ganged = dct_ganging_enabled(pvt); | ||
871 | |||
872 | amd64_debug_display_dimm_sizes(0, pvt); | ||
873 | |||
874 | if (!ganged) | ||
875 | amd64_debug_display_dimm_sizes(1, pvt); | ||
876 | } | 865 | } |
877 | 866 | ||
878 | /* Read in both of DBAM registers */ | 867 | /* Read in both of DBAM registers */ |
@@ -1644,11 +1633,10 @@ static void amd64_debug_display_dimm_sizes(int ctrl, struct amd64_pvt *pvt) | |||
1644 | WARN_ON(ctrl != 0); | 1633 | WARN_ON(ctrl != 0); |
1645 | } | 1634 | } |
1646 | 1635 | ||
1647 | debugf1("F2x%d80 (DRAM Bank Address Mapping): 0x%08x\n", | 1636 | dbam = (ctrl && !dct_ganging_enabled(pvt)) ? pvt->dbam1 : pvt->dbam0; |
1648 | ctrl, ctrl ? pvt->dbam1 : pvt->dbam0); | 1637 | dcsb = (ctrl && !dct_ganging_enabled(pvt)) ? pvt->dcsb1 : pvt->dcsb0; |
1649 | 1638 | ||
1650 | dbam = ctrl ? pvt->dbam1 : pvt->dbam0; | 1639 | debugf1("F2x%d80 (DRAM Bank Address Mapping): 0x%08x\n", ctrl, dbam); |
1651 | dcsb = ctrl ? pvt->dcsb1 : pvt->dcsb0; | ||
1652 | 1640 | ||
1653 | edac_printk(KERN_DEBUG, EDAC_MC, "DCT%d chip selects:\n", ctrl); | 1641 | edac_printk(KERN_DEBUG, EDAC_MC, "DCT%d chip selects:\n", ctrl); |
1654 | 1642 | ||