diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-03-11 09:07:46 -0300 |
---|---|---|
committer | Borislav Petkov <bp@suse.de> | 2013-03-16 06:32:02 +0100 |
commit | 1eef1282549d7accdd33ee36d409b039b1f911fb (patch) | |
tree | bf1be1193b2bcf6d2ab45fbcca7755050399be97 /drivers/edac/edac_mc_sysfs.c | |
parent | fbe2d3616cee37418d832b30130811888c5aaf34 (diff) | |
download | linux-1eef1282549d7accdd33ee36d409b039b1f911fb.tar.gz linux-1eef1282549d7accdd33ee36d409b039b1f911fb.tar.bz2 linux-1eef1282549d7accdd33ee36d409b039b1f911fb.zip |
amd64_edac: Correct DIMM sizes
We were filling the csrow size with a wrong value. 16a528ee3975 ("EDAC:
Fix csrow size reported in sysfs") tried to address the issue. It fixed
the report with the old API but not with the new one. Correct it for the
new API too.
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
[ make it a per-csrow accounting regardless of ->channel_count ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac/edac_mc_sysfs.c')
-rw-r--r-- | drivers/edac/edac_mc_sysfs.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c index 0cbf670efa23..4c50a4760db7 100644 --- a/drivers/edac/edac_mc_sysfs.c +++ b/drivers/edac/edac_mc_sysfs.c @@ -180,9 +180,6 @@ static ssize_t csrow_size_show(struct device *dev, int i; u32 nr_pages = 0; - if (csrow->mci->csbased) - return sprintf(data, "%u\n", PAGES_TO_MiB(csrow->nr_pages)); - for (i = 0; i < csrow->nr_channels; i++) nr_pages += csrow->channels[i]->dimm->nr_pages; return sprintf(data, "%u\n", PAGES_TO_MiB(nr_pages)); @@ -778,14 +775,10 @@ static ssize_t mci_size_mb_show(struct device *dev, for (csrow_idx = 0; csrow_idx < mci->nr_csrows; csrow_idx++) { struct csrow_info *csrow = mci->csrows[csrow_idx]; - if (csrow->mci->csbased) { - total_pages += csrow->nr_pages; - } else { - for (j = 0; j < csrow->nr_channels; j++) { - struct dimm_info *dimm = csrow->channels[j]->dimm; + for (j = 0; j < csrow->nr_channels; j++) { + struct dimm_info *dimm = csrow->channels[j]->dimm; - total_pages += dimm->nr_pages; - } + total_pages += dimm->nr_pages; } } |