diff options
-rw-r--r-- | drivers/edac/ghes_edac.c | 17 |
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); |