aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/edac/ghes_edac.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2013-02-15 06:45:00 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-02-25 17:42:14 -0500
commit5ee726db521fddf991f261e5c45e04a7d2bf1bc1 (patch)
tree2559aa6d1a06078fb3ef3b8aa78657d8867f518c /drivers/edac/ghes_edac.c
parent32fa1f53c2daf9f55f17ff883b4297f86095b09c (diff)
ghes_edac: Don't credit the same memory dimm twice
On my tests on a 4xE5-4650 CPU's system, the GHES EDAC driver is called twice. As the SMBIOS DMI enumeration call will seek for the entire DIMM sockets in the system, on this machine, equipped with 128 GB of RAM, the memory is displayed twice: +-----------------------+ | mc0 | mc1 | ----------+-----------------------+ memory45: | 8192 MB | 8192 MB | memory44: | 0 MB | 0 MB | ----------+-----------------------+ memory43: | 0 MB | 0 MB | memory42: | 8192 MB | 8192 MB | ----------+-----------------------+ memory41: | 0 MB | 0 MB | memory40: | 0 MB | 0 MB | ----------+-----------------------+ memory39: | 8192 MB | 8192 MB | memory38: | 0 MB | 0 MB | ----------+-----------------------+ memory37: | 0 MB | 0 MB | memory36: | 8192 MB | 8192 MB | ----------+-----------------------+ memory35: | 0 MB | 0 MB | memory34: | 0 MB | 0 MB | ----------+-----------------------+ memory33: | 8192 MB | 8192 MB | memory32: | 0 MB | 0 MB | ----------+-----------------------+ memory31: | 0 MB | 0 MB | memory30: | 8192 MB | 8192 MB | ----------+-----------------------+ memory29: | 0 MB | 0 MB | memory28: | 0 MB | 0 MB | ----------+-----------------------+ memory27: | 8192 MB | 8192 MB | memory26: | 0 MB | 0 MB | ----------+-----------------------+ memory25: | 0 MB | 0 MB | memory24: | 8192 MB | 8192 MB | ----------+-----------------------+ memory23: | 0 MB | 0 MB | memory22: | 0 MB | 0 MB | ----------+-----------------------+ memory21: | 8192 MB | 8192 MB | memory20: | 0 MB | 0 MB | ----------+-----------------------+ memory19: | 0 MB | 0 MB | memory18: | 8192 MB | 8192 MB | ----------+-----------------------+ memory17: | 0 MB | 0 MB | memory16: | 0 MB | 0 MB | ----------+-----------------------+ memory15: | 8192 MB | 8192 MB | memory14: | 0 MB | 0 MB | ----------+-----------------------+ memory13: | 0 MB | 0 MB | memory12: | 8192 MB | 8192 MB | ----------+-----------------------+ memory11: | 0 MB | 0 MB | memory10: | 0 MB | 0 MB | ----------+-----------------------+ memory9: | 8192 MB | 8192 MB | memory8: | 0 MB | 0 MB | ----------+-----------------------+ memory7: | 0 MB | 0 MB | memory6: | 8192 MB | 8192 MB | ----------+-----------------------+ memory5: | 0 MB | 0 MB | memory4: | 0 MB | 0 MB | ----------+-----------------------+ memory3: | 8192 MB | 8192 MB | memory2: | 0 MB | 0 MB | ----------+-----------------------+ memory1: | 0 MB | 0 MB | memory0: | 8192 MB | 8192 MB | ----------+-----------------------+ Total sum of 256 GB. As there's no reliable way to credit DIMMS to the right memory controller, just put everything on memory controller 0 (with should always exist). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/edac/ghes_edac.c')
-rw-r--r--drivers/edac/ghes_edac.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 22ac29e4733f..fb866804820c 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -287,10 +287,19 @@ int ghes_edac_register(struct ghes *ghes, struct device *dev)
287 mci->dev_name = "ghes"; 287 mci->dev_name = "ghes";
288 288
289 if (!fake) { 289 if (!fake) {
290 /* Fill DIMM info from DMI */ 290 /*
291 dimm_fill.count = 0; 291 * Fill DIMM info from DMI for the memory controller #0
292 dimm_fill.mci = mci; 292 *
293 dmi_walk(ghes_edac_dmidecode, &dimm_fill); 293 * Keep it in blank for the other memory controllers, as
294 * there's no reliable way to properly credit each DIMM to
295 * the memory controller, as different BIOSes fill the
296 * DMI bank location fields on different ways
297 */
298 if (!ghes_edac_mc_num) {
299 dimm_fill.count = 0;
300 dimm_fill.mci = mci;
301 dmi_walk(ghes_edac_dmidecode, &dimm_fill);
302 }
294 } else { 303 } else {
295 struct dimm_info *dimm = EDAC_DIMM_PTR(mci->layers, mci->dimms, 304 struct dimm_info *dimm = EDAC_DIMM_PTR(mci->layers, mci->dimms,
296 mci->n_layers, 0, 0, 0); 305 mci->n_layers, 0, 0, 0);