From: tbaicar@codeaurora.org (Tyler Baicar)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] EDAC, ghes: Enable per-layer error reporting for ARM
Date: Mon, 16 Jul 2018 13:26:49 -0400 [thread overview]
Message-ID: <1531762009-15112-1-git-send-email-tbaicar@codeaurora.org> (raw)
Enable per-layer error reporting for ARM systems so that the error
counters are incremented per-DIMM.
On ARM systems that use firmware first error handling it is understood
that card=channel and module=DIMM on that channel. Populate that
information and enable per layer error reporting for ARM systems so that
the EDAC error counters are incremented based on DIMM number as per the
SMBIOS table rather than just incrementing the noinfo counters on the
memory controller.
Signed-off-by: Tyler Baicar <tbaicar@codeaurora.org>
---
drivers/edac/ghes_edac.c | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/drivers/edac/ghes_edac.c b/drivers/edac/ghes_edac.c
index 473aeec..e4c8b6e 100644
--- a/drivers/edac/ghes_edac.c
+++ b/drivers/edac/ghes_edac.c
@@ -213,9 +213,18 @@ void ghes_edac_report_mem_error(int sev, struct cper_sec_mem_err *mem_err)
strcpy(e->label, "unknown label");
e->msg = pvt->msg;
e->other_detail = pvt->other_detail;
- e->top_layer = -1;
- e->mid_layer = -1;
- e->low_layer = -1;
+ if ((IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64))
+ && (mem_err->validation_bits & CPER_MEM_VALID_CARD)
+ && (mem_err->validation_bits & CPER_MEM_VALID_MODULE)) {
+ e->top_layer = mem_err->card;
+ e->mid_layer = mem_err->module;
+ e->low_layer = -1;
+ e->enable_per_layer_report = true;
+ } else {
+ e->top_layer = -1;
+ e->mid_layer = -1;
+ e->low_layer = -1;
+ }
*pvt->other_detail = '\0';
*pvt->msg = '\0';
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
next reply other threads:[~2018-07-16 17:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-16 17:26 Tyler Baicar [this message]
2018-07-19 14:01 ` [RFC PATCH] EDAC, ghes: Enable per-layer error reporting for ARM Borislav Petkov
2018-07-19 14:46 ` James Morse
2018-07-19 18:36 ` Tyler Baicar
2018-07-20 4:10 ` Borislav Petkov
2018-08-23 9:28 ` James Morse
2018-08-23 15:46 ` Tyler Baicar
2018-08-24 9:48 ` James Morse
2018-08-24 12:01 ` Borislav Petkov
2018-08-28 17:09 ` James Morse
2018-08-29 7:38 ` Borislav Petkov
2018-08-29 10:20 ` James Morse
2018-08-30 10:28 ` Borislav Petkov
2018-08-24 14:30 ` wufan
2018-08-28 17:09 ` James Morse
2018-08-24 15:14 ` Tyler Baicar
2018-08-28 17:11 ` James Morse
2018-08-28 20:04 ` Tyler Baicar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1531762009-15112-1-git-send-email-tbaicar@codeaurora.org \
--to=tbaicar@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).