public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: xiexiuqi@huawei.com (Xie XiuQi)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH v1 3/3] arm64/apei: get error address from memory section for recovery
Date: Fri, 1 Sep 2017 18:32:01 +0800	[thread overview]
Message-ID: <1504261921-39308-4-git-send-email-xiexiuqi@huawei.com> (raw)
In-Reply-To: <1504261921-39308-1-git-send-email-xiexiuqi@huawei.com>

In some platform, when SEA triggerred, physical address might be
reported by memory section, so we save it for error recovery later.

Signed-off-by: Xie XiuQi <xiexiuqi@huawei.com>
---
 arch/arm64/kernel/ras.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/kernel/ras.c b/arch/arm64/kernel/ras.c
index 8562ec7..2b400b8 100644
--- a/arch/arm64/kernel/ras.c
+++ b/arch/arm64/kernel/ras.c
@@ -136,3 +136,20 @@ void arm_proc_error_check(struct ghes *ghes, struct cper_sec_proc_arm *err)
 	if (!ret)
 		set_thread_flag(TIF_SEA_NOTIFY);
 }
+
+void arch_apei_report_mem_error(struct ghes *ghes, int sev,
+				struct cper_sec_mem_err *mem)
+{
+	int ret = -1;
+
+	if ((ghes->generic->notify.type != ACPI_HEST_NOTIFY_SEA) ||
+	    (ghes->estatus->error_severity != CPER_SEV_RECOVERABLE))
+		return;
+
+	if (mem->validation_bits & CPER_MEM_VALID_PA) {
+		ret = sea_save_info(mem->physical_addr);
+	}
+
+	if (!ret)
+		set_thread_flag(TIF_SEA_NOTIFY);
+}
-- 
1.8.3.1

      parent reply	other threads:[~2017-09-01 10:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-01 10:31 [RFC PATCH v1 0/3] arm64/ras: support sea error recovery Xie XiuQi
2017-09-01 10:31 ` [RFC PATCH v1 1/3] " Xie XiuQi
2017-09-01 11:16   ` Borislav Petkov
2017-09-01 15:51   ` Julien Thierry
2017-09-04  2:58     ` Xie XiuQi
2017-09-01 10:32 ` [RFC PATCH v1 2/3] apei: add ghes param for arch_apei_report_mem_error Xie XiuQi
2017-09-01 11:15   ` Borislav Petkov
2017-09-05  2:20     ` Xie XiuQi
2017-09-01 10:32 ` Xie XiuQi [this message]

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=1504261921-39308-4-git-send-email-xiexiuqi@huawei.com \
    --to=xiexiuqi@huawei.com \
    --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