All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ghes_edac: add DDR4 and NVDIMM memory types
@ 2018-05-09 22:20 ` Toshi Kani
  0 siblings, 0 replies; 4+ messages in thread
From: Toshi Kani @ 2018-05-09 22:20 UTC (permalink / raw)
  To: bp; +Cc: mchehab, linux-edac, elliott, linux-kernel, Toshi Kani

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 set when
memory type is DDR3/4 and non-volatile.

Reported-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 drivers/edac/ghes_edac.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 68b6ee18bea6..d0399273018d 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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* ghes_edac: add DDR4 and NVDIMM memory types
@ 2018-05-09 22:20 ` Toshi Kani
  0 siblings, 0 replies; 4+ messages in thread
From: Toshi Kani @ 2018-05-09 22:20 UTC (permalink / raw)
  To: bp; +Cc: mchehab, linux-edac, elliott, linux-kernel, Toshi Kani

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 set when
memory type is DDR3/4 and non-volatile.

Reported-by: Robert Elliott <elliott@hpe.com>
Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
---
 drivers/edac/ghes_edac.c |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

--
To unsubscribe from this list: send the line "unsubscribe linux-edac" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 68b6ee18bea6..d0399273018d 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;

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] ghes_edac: add DDR4 and NVDIMM memory types
@ 2018-05-12 12:26   ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2018-05-12 12:26 UTC (permalink / raw)
  To: Toshi Kani; +Cc: mchehab, linux-edac, elliott, linux-kernel

On Wed, May 09, 2018 at 04:20:30PM -0600, Toshi Kani wrote:
> 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 set when
> memory type is DDR3/4 and non-volatile.
> 
> Reported-by: Robert Elliott <elliott@hpe.com>
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
>  drivers/edac/ghes_edac.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Good mailing practices for 400: avoid top-posting and trim the reply.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* ghes_edac: add DDR4 and NVDIMM memory types
@ 2018-05-12 12:26   ` Borislav Petkov
  0 siblings, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2018-05-12 12:26 UTC (permalink / raw)
  To: Toshi Kani; +Cc: mchehab, linux-edac, elliott, linux-kernel

On Wed, May 09, 2018 at 04:20:30PM -0600, Toshi Kani wrote:
> 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 set when
> memory type is DDR3/4 and non-volatile.
> 
> Reported-by: Robert Elliott <elliott@hpe.com>
> Signed-off-by: Toshi Kani <toshi.kani@hpe.com>
> Cc: Borislav Petkov <bp@alien8.de>
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> ---
>  drivers/edac/ghes_edac.c |   12 +++++++++++-
>  1 file changed, 11 insertions(+), 1 deletion(-)

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-12 12:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-09 22:20 [PATCH] ghes_edac: add DDR4 and NVDIMM memory types Toshi Kani
2018-05-09 22:20 ` Toshi Kani
2018-05-12 12:26 ` [PATCH] " Borislav Petkov
2018-05-12 12:26   ` Borislav Petkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.