From: Shuai Xue <xueshuai@linux.alibaba.com>
To: keescook@chromium.org, tony.luck@intel.com, gpiccoli@igalia.com,
rafael@kernel.org, lenb@kernel.org, james.morse@arm.com,
bp@alien8.de, tglx@linutronix.de, mingo@redhat.com,
dave.hansen@linux.intel.com, x86@kernel.org, hpa@zytor.com,
ardb@kernel.org, robert.moore@intel.com
Cc: linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-acpi@vger.kernel.org, linux-hardening@vger.kernel.org,
baolin.wang@linux.alibaba.com, xueshuai@linux.alibaba.com,
acpica-devel@lists.linuxfoundation.org,
linux-edac@vger.kernel.org
Subject: [Acpica-devel] [RFC PATCH 9/9] ACPI: APEI: ESRT: log ARM processor error
Date: Sat, 16 Sep 2023 13:03:42 -0000 [thread overview]
Message-ID: <20230916130316.65815-10-xueshuai@linux.alibaba.com> (raw)
In-Reply-To: <20230916130316.65815-1-xueshuai@linux.alibaba.com>
Introduce a new pstore_record type, PSTORE_TYPE_CPER_PROC_ARM, so that
serialized ARM processor errors can be retrieved and saved as a file in
pstore file system. While the serialized errors is retrieved from ERST
backend, log it.
Signed-off-by: Shuai Xue <xueshuai@linux.alibaba.com>
---
drivers/acpi/apei/erst.c | 6 ++++++
fs/pstore/platform.c | 1 +
include/linux/pstore.h | 1 +
3 files changed, 8 insertions(+)
diff --git a/drivers/acpi/apei/erst.c b/drivers/acpi/apei/erst.c
index 4f000cb1433a..c92d977d15cd 100644
--- a/drivers/acpi/apei/erst.c
+++ b/drivers/acpi/apei/erst.c
@@ -29,6 +29,7 @@
#include <acpi/ghes.h>
#include <linux/aer.h>
#include <linux/pci.h>
+#include <linux/ras.h>
/* only define CREATE_TRACE_POINTS once */
#include <trace/events/mce.h>
@@ -1088,6 +1089,11 @@ static ssize_t erst_reader(struct pstore_record *record)
cper_print_aer(
pdev, AER_FATAL,
(struct aer_capability_regs *)pcie_err->aer_info);
+ } else if (guid_equal(&rcd->sec_hdr.section_type, &CPER_SEC_PROC_ARM)) {
+ struct cper_sec_proc_arm *err = (struct cper_sec_proc_arm *)rcd->data;
+
+ record->type = PSTORE_TYPE_CPER_PROC_ARM;
+ log_arm_hw_error(err);
}
else
record->type = PSTORE_TYPE_MAX;
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 40a062546fe4..48ad3202284c 100644
--- a/fs/pstore/platform.c
+++ b/fs/pstore/platform.c
@@ -53,6 +53,7 @@ static const char * const pstore_type_names[] = {
"powerpc-opal",
"cper-mem",
"cper-pcie",
+ "cper-proc-arm",
};
static int pstore_new_entry;
diff --git a/include/linux/pstore.h b/include/linux/pstore.h
index e63f51e9c22e..83edff5aab0b 100644
--- a/include/linux/pstore.h
+++ b/include/linux/pstore.h
@@ -43,6 +43,7 @@ enum pstore_type_id {
/* APEI section */
PSTORE_TYPE_CPER_MEM = 9,
PSTORE_TYPE_CPER_PCIE = 10,
+ PSTORE_TYPE_CPER_PROC_ARM = 11,
/* End of the list */
PSTORE_TYPE_MAX
--
2.41.0
prev parent reply other threads:[~2023-09-16 13:03 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-16 13:03 [Acpica-devel] [RFC PATCH 0/9] [RFC PATCH 0/9] Use ERST for persistent storage of MCE and APEI errors Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 1/9] pstore: move pstore creator id, section type and record struct to common header Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 2/9] ACPI: APEI: Use common ERST struct to read/write serialized MCE record Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 3/9] ACPI: APEI: ERST: Emit the mce_record tracepoint Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 4/9] ACPI: tables: change section_type of generic error data as guid_t Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 7/9] ACPI: APEI: ESRT: kick ghes_report_chain notifier to report serialized memory errors Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 6/9] ACPI: APEI: GHES: export ghes_report_chain Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 5/9] ACPI: APEI: GHES: Use ERST to serialize APEI generic error before panic Shuai Xue
2023-09-16 13:03 ` [Acpica-devel] [RFC PATCH 8/9] ACPI: APEI: ESRT: print AER to report serialized PCIe errors Shuai Xue
2023-09-16 13:03 ` Shuai Xue [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=20230916130316.65815-10-xueshuai@linux.alibaba.com \
--to=xueshuai@linux.alibaba.com \
--cc=acpica-devel@lists.linuxfoundation.org \
--cc=ardb@kernel.org \
--cc=baolin.wang@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=gpiccoli@igalia.com \
--cc=hpa@zytor.com \
--cc=james.morse@arm.com \
--cc=keescook@chromium.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-efi@vger.kernel.org \
--cc=linux-hardening@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael@kernel.org \
--cc=robert.moore@intel.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).