summaryrefslogtreecommitdiffstats
path: root/drivers/edac
diff options
context:
space:
mode:
authorToshi Kani <toshi.kani@hpe.com>2018-05-09 18:20:30 -0400
committerBorislav Petkov <bp@suse.de>2018-05-12 08:16:49 -0400
commitad0d73b324dbc9e5b987fbda08ceb523fbeb0a9f (patch)
tree4e5eb9bad28349886b7daad0e784c7c36cbb6e02 /drivers/edac
parente9918d7fafae2ec5365b193654960f6158751f8c (diff)
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 <elliott@hpe.com> Signed-off-by: Toshi Kani <toshi.kani@hpe.com> Cc: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: linux-edac <linux-edac@vger.kernel.org> Link: http://lkml.kernel.org/r/20180509222030.9299-1-toshi.kani@hpe.com Signed-off-by: Borislav Petkov <bp@suse.de>
Diffstat (limited to 'drivers/edac')
-rw-r--r--drivers/edac/ghes_edac.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index b9bea77b3de8..cb8f2704ffb0 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)
123 dimm->mtype = MEM_FB_DDR2; 123 dimm->mtype = MEM_FB_DDR2;
124 break; 124 break;
125 case 0x18: 125 case 0x18:
126 if (entry->type_detail & 1 << 13) 126 if (entry->type_detail & 1 << 12)
127 dimm->mtype = MEM_NVDIMM;
128 else if (entry->type_detail & 1 << 13)
127 dimm->mtype = MEM_RDDR3; 129 dimm->mtype = MEM_RDDR3;
128 else 130 else
129 dimm->mtype = MEM_DDR3; 131 dimm->mtype = MEM_DDR3;
130 break; 132 break;
133 case 0x1a:
134 if (entry->type_detail & 1 << 12)
135 dimm->mtype = MEM_NVDIMM;
136 else if (entry->type_detail & 1 << 13)
137 dimm->mtype = MEM_RDDR4;
138 else
139 dimm->mtype = MEM_DDR4;
140 break;
131 default: 141 default:
132 if (entry->type_detail & 1 << 6) 142 if (entry->type_detail & 1 << 6)
133 dimm->mtype = MEM_RMBS; 143 dimm->mtype = MEM_RMBS;