From: Toshi Kani Date: Wed, 9 May 2018 22:20:30 +0000 (-0600) Subject: EDAC, ghes: Add DDR4 and NVDIMM memory types X-Git-Tag: v4.18-rc1~122^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad0d73b324dbc9e5b987fbda08ceb523fbeb0a9f;p=thirdparty%2Fkernel%2Flinux.git EDAC, ghes: Add DDR4 and NVDIMM memory types The ghes_edac driver obtains memory type from SMBIOS type 17, but it does not recognize DDR4 and NVDIMM types. Add support of DDR4 and NVDIMM types. NVDIMM type is denoted by memory type DDR3/4 and non-volatile. Reported-by: Robert Elliott Signed-off-by: Toshi Kani Cc: Mauro Carvalho Chehab Cc: linux-edac Link: http://lkml.kernel.org/r/20180509222030.9299-1-toshi.kani@hpe.com Signed-off-by: Borislav Petkov --- diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c index b9bea77b3de87..cb8f2704ffb0d 100644 --- a/drivers/edac/ghes_edac.c +++ b/drivers/edac/ghes_edac.c @@ -123,11 +123,21 @@ static void ghes_edac_dmidecode(const struct dmi_header *dh, void *arg) dimm->mtype = MEM_FB_DDR2; break; case 0x18: - if (entry->type_detail & 1 << 13) + if (entry->type_detail & 1 << 12) + dimm->mtype = MEM_NVDIMM; + else if (entry->type_detail & 1 << 13) dimm->mtype = MEM_RDDR3; else dimm->mtype = MEM_DDR3; break; + case 0x1a: + if (entry->type_detail & 1 << 12) + dimm->mtype = MEM_NVDIMM; + else if (entry->type_detail & 1 << 13) + dimm->mtype = MEM_RDDR4; + else + dimm->mtype = MEM_DDR4; + break; default: if (entry->type_detail & 1 << 6) dimm->mtype = MEM_RMBS;