aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/edac/ghes_edac.c11
-rw-r--r--include/linux/edac.h2
2 files changed, 12 insertions, 1 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 0ad797b9db65..d5a98a45c062 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -314,6 +314,8 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
314 p += sprintf(p, "card:%d ", mem_err->card); 314 p += sprintf(p, "card:%d ", mem_err->card);
315 if (mem_err->validation_bits & CPER_MEM_VALID_MODULE) 315 if (mem_err->validation_bits & CPER_MEM_VALID_MODULE)
316 p += sprintf(p, "module:%d ", mem_err->module); 316 p += sprintf(p, "module:%d ", mem_err->module);
317 if (mem_err->validation_bits & CPER_MEM_VALID_RANK_NUMBER)
318 p += sprintf(p, "rank:%d ", mem_err->rank);
317 if (mem_err->validation_bits & CPER_MEM_VALID_BANK) 319 if (mem_err->validation_bits & CPER_MEM_VALID_BANK)
318 p += sprintf(p, "bank:%d ", mem_err->bank); 320 p += sprintf(p, "bank:%d ", mem_err->bank);
319 if (mem_err->validation_bits & CPER_MEM_VALID_ROW) 321 if (mem_err->validation_bits & CPER_MEM_VALID_ROW)
@@ -322,6 +324,15 @@ void ghes_edac_report_mem_error(struct ghes *ghes, int sev,
322 p += sprintf(p, "col:%d ", mem_err->column); 324 p += sprintf(p, "col:%d ", mem_err->column);
323 if (mem_err->validation_bits & CPER_MEM_VALID_BIT_POSITION) 325 if (mem_err->validation_bits & CPER_MEM_VALID_BIT_POSITION)
324 p += sprintf(p, "bit_pos:%d ", mem_err->bit_pos); 326 p += sprintf(p, "bit_pos:%d ", mem_err->bit_pos);
327 if (mem_err->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) {
328 const char *bank = NULL, *device = NULL;
329 dmi_memdev_name(mem_err->mem_dev_handle, &bank, &device);
330 if (bank != NULL && device != NULL)
331 p += sprintf(p, "DIMM location:%s %s ", bank, device);
332 else
333 p += sprintf(p, "DIMM DMI handle: 0x%.4x ",
334 mem_err->mem_dev_handle);
335 }
325 if (p > e->location) 336 if (p > e->location)
326 *(p - 1) = '\0'; 337 *(p - 1) = '\0';
327 338
diff --git a/include/linux/edac.h b/include/linux/edac.h
index 5c6d7fbaf89e..dbdffe8d4469 100644
--- a/include/linux/edac.h
+++ b/include/linux/edac.h
@@ -51,7 +51,7 @@ static inline void opstate_init(void)
51#define EDAC_MC_LABEL_LEN 31 51#define EDAC_MC_LABEL_LEN 31
52 52
53/* Maximum size of the location string */ 53/* Maximum size of the location string */
54#define LOCATION_SIZE 80 54#define LOCATION_SIZE 256
55 55
56/* Defines the maximum number of labels that can be reported */ 56/* Defines the maximum number of labels that can be reported */
57#define EDAC_MAX_LABELS 8 57#define EDAC_MAX_LABELS 8