From: Borislav Petkov <bp@alien8.de>
To: "Chen, Gong" <gong.chen@linux.intel.com>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
tony.luck@intel.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH v2 1/2] ACPI, APEI, GHES: Remove strict check for memory error handling
Date: Mon, 16 Dec 2013 15:51:29 +0100 [thread overview]
Message-ID: <20131216145129.GA9683@pd.tnic> (raw)
In-Reply-To: <20131214134256.GC2823@gchen.bj.intel.com>
On Sat, Dec 14, 2013 at 08:42:56AM -0500, Chen, Gong wrote:
> Will you pick up this patch in your RAS request pull?
Applied, with commit message massaging and s/corrected/severity/
automatic variable change, version below:
--
From: "Chen, Gong" <gong.chen@linux.intel.com>
Subject: [PATCH] ACPI, APEI, GHES: Do not report only correctable errors with SCI
Currently SCI is employed to handle corrected errors, and memory
corrected errors, more specifically but in fact SCI still can be used to
handle any errors, e.g. uncorrected or even fatal ones if enabled by the
BIOS. Enable logging for those kinds of errors too.
Signed-off-by: Chen, Gong <gong.chen@linux.intel.com>
Acked-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1385363701-12387-1-git-send-email-gong.chen@linux.intel.com
[ Boris: massage commit message, rename automatic variable. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
---
arch/x86/kernel/cpu/mcheck/mce-apei.c | 14 ++++++++++----
drivers/acpi/apei/ghes.c | 3 +--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce-apei.c b/arch/x86/kernel/cpu/mcheck/mce-apei.c
index de8b60a53f69..a1aef9533154 100644
--- a/arch/x86/kernel/cpu/mcheck/mce-apei.c
+++ b/arch/x86/kernel/cpu/mcheck/mce-apei.c
@@ -33,22 +33,28 @@
#include <linux/acpi.h>
#include <linux/cper.h>
#include <acpi/apei.h>
+#include <acpi/ghes.h>
#include <asm/mce.h>
#include "mce-internal.h"
-void apei_mce_report_mem_error(int corrected, struct cper_sec_mem_err *mem_err)
+void apei_mce_report_mem_error(int severity, struct cper_sec_mem_err *mem_err)
{
struct mce m;
- /* Only corrected MC is reported */
- if (!corrected || !(mem_err->validation_bits & CPER_MEM_VALID_PA))
+ if (!(mem_err->validation_bits & CPER_MEM_VALID_PA))
return;
mce_setup(&m);
m.bank = 1;
- /* Fake a memory read corrected error with unknown channel */
+ /* Fake a memory read error with unknown channel */
m.status = MCI_STATUS_VAL | MCI_STATUS_EN | MCI_STATUS_ADDRV | 0x9f;
+
+ if (severity >= GHES_SEV_RECOVERABLE)
+ m.status |= MCI_STATUS_UC;
+ if (severity >= GHES_SEV_PANIC)
+ m.status |= MCI_STATUS_PCC;
+
m.addr = mem_err->physical_addr;
mce_log(&m);
mce_notify_irq();
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index a30bc313787b..ce3683d93a13 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -453,8 +453,7 @@ static void ghes_do_proc(struct ghes *ghes,
ghes_edac_report_mem_error(ghes, sev, mem_err);
#ifdef CONFIG_X86_MCE
- apei_mce_report_mem_error(sev == GHES_SEV_CORRECTED,
- mem_err);
+ apei_mce_report_mem_error(sev, mem_err);
#endif
ghes_handle_memory_failure(gdata, sev);
}
--
1.8.4
--
Regards/Gruss,
Boris.
Sent from a fat crate under my desk. Formatting is fine.
--
next prev parent reply other threads:[~2013-12-16 14:51 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-25 7:15 [PATCH v2 1/2] ACPI, APEI, GHES: Remove strict check for memory error handling Chen, Gong
2013-11-25 7:15 ` [PATCH v2 2/2] ACPI, APEI, GHES: Cleanup ghes codes " Chen, Gong
2013-11-26 6:54 ` Chen, Gong
2013-11-26 7:23 ` Borislav Petkov
2013-11-27 2:15 ` Chen, Gong
2013-12-14 13:42 ` Chen, Gong
2013-11-26 9:04 ` Naveen N. Rao
2013-12-21 12:41 ` Borislav Petkov
2013-11-25 17:13 ` [PATCH v2 1/2] ACPI, APEI, GHES: Remove strict check " Borislav Petkov
2013-11-26 9:02 ` Naveen N. Rao
2013-11-26 9:31 ` Chen, Gong
2013-12-14 13:42 ` Chen, Gong
2013-12-16 14:51 ` Borislav Petkov [this message]
2013-12-16 14:40 ` Chen, Gong
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=20131216145129.GA9683@pd.tnic \
--to=bp@alien8.de \
--cc=gong.chen@linux.intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=naveen.n.rao@linux.vnet.ibm.com \
--cc=tony.luck@intel.com \
/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).