From: Xie XiuQi <xiexiuqi@huawei.com>
To: <catalin.marinas@arm.com>, <will.deacon@arm.com>,
<mingo@redhat.com>, <mark.rutland@arm.com>,
<ard.biesheuvel@linaro.org>, <james.morse@arm.com>,
<Dave.Martin@arm.com>, <takahiro.akashi@linaro.org>,
<tbaicar@codeaurora.org>, <stephen.boyd@linaro.org>, <bp@suse.de>,
<julien.thierry@arm.com>, <shiju.jose@huawei.com>,
<zjzhang@codeaurora.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
<linux-kernel@vger.kernel.org>, <linux-acpi@vger.kernel.org>,
<xiexiuqi@huawei.com>, <wangxiongfeng2@huawei.com>,
<zhengqiang10@huawei.com>, <gengdongjiu@huawei.com>,
<huawei.libin@huawei.com>, <wangkefeng.wang@huawei.com>,
<lijinyue@huawei.com>, <guohanjun@huawei.com>,
<hanjun.guo@linaro.org>, <cj.chengjian@huawei.com>
Subject: [PATCH v4 3/4] GHES: add a notify chain for process memory section
Date: Wed, 27 Sep 2017 20:50:19 +0800 [thread overview]
Message-ID: <1506516620-20033-4-git-send-email-xiexiuqi@huawei.com> (raw)
In-Reply-To: <1506516620-20033-1-git-send-email-xiexiuqi@huawei.com>
Add a notify chain for process memory section, with
which other modules might do error recovery.
Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
drivers/acpi/apei/ghes.c | 10 ++++++++++
include/acpi/ghes.h | 8 ++++++++
2 files changed, 18 insertions(+)
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 2abf673..56b7336 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -108,6 +108,9 @@ static inline bool is_hest_type_generic_v2(struct ghes *ghes)
static LIST_HEAD(ghes_hed);
static DEFINE_MUTEX(ghes_list_mutex);
+ATOMIC_NOTIFIER_HEAD(ghes_mem_err_chain);
+EXPORT_SYMBOL(ghes_mem_err_chain);
+
/*
* Because the memory area used to transfer hardware error information
* from BIOS to Linux can be determined only in NMI, IRQ or timer
@@ -485,6 +488,13 @@ static void ghes_do_proc(struct ghes *ghes,
if (guid_equal(sec_type, &CPER_SEC_PLATFORM_MEM)) {
struct cper_sec_mem_err *mem_err = acpi_hest_get_payload(gdata);
+ struct ghes_mem_err mem;
+
+ mem.notify_type = ghes->generic->notify.type;
+ mem.severity = gdata->error_severity;
+ mem.mem_err = mem_err;
+
+ atomic_notifier_call_chain(&ghes_mem_err_chain, 0, &mem);
ghes_edac_report_mem_error(ghes, sev, mem_err);
diff --git a/include/acpi/ghes.h b/include/acpi/ghes.h
index 8bcb8e5..ab51e40 100644
--- a/include/acpi/ghes.h
+++ b/include/acpi/ghes.h
@@ -123,4 +123,12 @@ static inline void *acpi_hest_get_next(struct acpi_hest_generic_data *gdata)
extern void ghes_arm_process_error(struct ghes *ghes,
struct cper_sec_proc_arm *err);
+struct ghes_mem_err {
+ int notify_type;
+ int severity;
+ struct cper_sec_mem_err *mem_err;
+};
+
+extern struct atomic_notifier_head ghes_mem_err_chain;
+
#endif /* GHES_H */
--
1.8.3.1
next prev parent reply other threads:[~2017-09-27 12:47 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 12:50 [PATCH v4 0/4] arm64/ras: support sea error recovery Xie XiuQi
2017-09-27 12:50 ` [PATCH v4 1/4] ACPI, CPER: add arm error info type definition Xie XiuQi
2017-09-27 12:50 ` [PATCH v4 2/4] arm64/ras: support sea error recovery Xie XiuQi
2017-09-27 12:50 ` Xie XiuQi [this message]
2017-09-27 12:50 ` [PATCH v4 4/4] arm64/ras: save error address from memory section for recovery Xie XiuQi
2018-01-25 17:11 ` [PATCH v4 0/4] arm64/ras: support sea error recovery Tyler Baicar
2018-01-26 2:09 ` Xie XiuQi
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=1506516620-20033-4-git-send-email-xiexiuqi@huawei.com \
--to=xiexiuqi@huawei.com \
--cc=Dave.Martin@arm.com \
--cc=ard.biesheuvel@linaro.org \
--cc=bp@suse.de \
--cc=catalin.marinas@arm.com \
--cc=cj.chengjian@huawei.com \
--cc=gengdongjiu@huawei.com \
--cc=guohanjun@huawei.com \
--cc=hanjun.guo@linaro.org \
--cc=huawei.libin@huawei.com \
--cc=james.morse@arm.com \
--cc=julien.thierry@arm.com \
--cc=lijinyue@huawei.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mingo@redhat.com \
--cc=shiju.jose@huawei.com \
--cc=stephen.boyd@linaro.org \
--cc=takahiro.akashi@linaro.org \
--cc=tbaicar@codeaurora.org \
--cc=wangkefeng.wang@huawei.com \
--cc=wangxiongfeng2@huawei.com \
--cc=will.deacon@arm.com \
--cc=zhengqiang10@huawei.com \
--cc=zjzhang@codeaurora.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
all inboxes | Powered by JetHome®