Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 708924 Details for
Bug 920586
amd64_edac is reporting twice the memory with the new API
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
patch 1/2: fill the EDAC data with the correct dimm sizes
file_920586.txt (text/plain), 3.22 KB, created by
Mauro Carvalho Chehab
on 2013-03-12 11:56:16 UTC
(
hide
)
Description:
patch 1/2: fill the EDAC data with the correct dimm sizes
Filename:
MIME Type:
Creator:
Mauro Carvalho Chehab
Created:
2013-03-12 11:56:16 UTC
Size:
3.22 KB
patch
obsolete
>From: Mauro Carvalho Chehab <mchehab@redhat.com> >Date: Mon, 11 Mar 2013 12:18:24 +0000 (-0400) >Subject: amd64_edac: Correct dimm sizes >X-Git-Url: http://git.infradead.org/users/mchehab/edac.git/commitdiff_plain/2b6018dbd206e4af16edcfb80497b73105e97803 > >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> >Signed-off-by: Borislav Petkov <bp@suse.de> >--- > >diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c >index ad8bf2a..4830f8b 100644 >--- a/drivers/edac/amd64_edac.c >+++ b/drivers/edac/amd64_edac.c >@@ -2148,12 +2148,18 @@ static int init_csrows(struct mem_ctl_info *mci) > edac_dbg(1, "MC node: %d, csrow: %d\n", > pvt->mc_node_id, i); > >- if (row_dct0) >+ if (row_dct0) { > nr_pages = amd64_csrow_nr_pages(pvt, 0, i); >+ csrow->channels[0]->dimm->nr_pages = nr_pages; >+ } > > /* K8 has only one DCT */ >- if (boot_cpu_data.x86 != 0xf && row_dct1) >- nr_pages += amd64_csrow_nr_pages(pvt, 1, i); >+ if (boot_cpu_data.x86 != 0xf && row_dct1) { >+ int row_dct1_pages = amd64_csrow_nr_pages(pvt, 1, i); >+ >+ csrow->channels[1]->dimm->nr_pages = row_dct1_pages; >+ nr_pages += row_dct1_pages; >+ } > > mtype = amd64_determine_memory_type(pvt, i); > >@@ -2172,9 +2178,7 @@ static int init_csrows(struct mem_ctl_info *mci) > dimm = csrow->channels[j]->dimm; > dimm->mtype = mtype; > dimm->edac_mode = edac_mode; >- dimm->nr_pages = nr_pages; > } >- csrow->nr_pages = nr_pages; > } > > return empty; >diff --git a/drivers/edac/edac_mc_sysfs.c b/drivers/edac/edac_mc_sysfs.c >index 4f4b613..5463ed3 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; > } > } > >diff --git a/include/linux/edac.h b/include/linux/edac.h >index 4fd4999..ab1ea98 100644 >--- a/include/linux/edac.h >+++ b/include/linux/edac.h >@@ -561,7 +561,6 @@ struct csrow_info { > > u32 ue_count; /* Uncorrectable Errors for this csrow */ > u32 ce_count; /* Correctable Errors for this csrow */ >- u32 nr_pages; /* combined pages count of all channels */ > > struct mem_ctl_info *mci; /* the parent */ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 920586
:
708921
| 708924 |
708925