Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

EDAC, GHES: Update ghes error record info

In latest UEFI spec(by now it's 2.4) there are some new
fields for memory error reporting. Add these new fields for
ghes_edac interface.

Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Cc: Mauro Carvalho Chehab <m.chehab@samsung.com>
Signed-off-by: Tony Luck <tony.luck@intel.com>

authored by

Chen, Gong and committed by
Tony Luck
56507694 f6edea77

+12 -1
+11
drivers/edac/ghes_edac.c
··· 314 314 p += sprintf(p, "card:%d ", mem_err->card); 315 315 if (mem_err->validation_bits & CPER_MEM_VALID_MODULE) 316 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 319 if (mem_err->validation_bits & CPER_MEM_VALID_BANK) 318 320 p += sprintf(p, "bank:%d ", mem_err->bank); 319 321 if (mem_err->validation_bits & CPER_MEM_VALID_ROW) ··· 324 322 p += sprintf(p, "col:%d ", mem_err->column); 325 323 if (mem_err->validation_bits & CPER_MEM_VALID_BIT_POSITION) 326 324 p += sprintf(p, "bit_pos:%d ", mem_err->bit_pos); 325 + if (mem_err->validation_bits & CPER_MEM_VALID_MODULE_HANDLE) { 326 + const char *bank = NULL, *device = NULL; 327 + dmi_memdev_name(mem_err->mem_dev_handle, &bank, &device); 328 + if (bank != NULL && device != NULL) 329 + p += sprintf(p, "DIMM location:%s %s ", bank, device); 330 + else 331 + p += sprintf(p, "DIMM DMI handle: 0x%.4x ", 332 + mem_err->mem_dev_handle); 333 + } 327 334 if (p > e->location) 328 335 *(p - 1) = '\0'; 329 336
+1 -1
include/linux/edac.h
··· 51 51 #define EDAC_MC_LABEL_LEN 31 52 52 53 53 /* Maximum size of the location string */ 54 - #define LOCATION_SIZE 80 54 + #define LOCATION_SIZE 256 55 55 56 56 /* Defines the maximum number of labels that can be reported */ 57 57 #define EDAC_MAX_LABELS 8