From: Ruidong Tian <tianruidong@linux.alibaba.com>
To: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will@kernel.org>,
Lorenzo Pieralisi <lpieralisi@kernel.org>,
Hanjun Guo <guohanjun@huawei.com>,
Sudeep Holla <sudeep.holla@kernel.org>,
"Rafael J . Wysocki" <rafael@kernel.org>,
Len Brown <lenb@kernel.org>, Tony Luck <tony.luck@intel.com>,
Borislav Petkov <bp@alien8.de>, Thomas Gleixner <tglx@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
Robin Murphy <robin.murphy@arm.com>,
Umang Chheda <umang.chheda@oss.qualcomm.com>
Cc: linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-edac@vger.kernel.org,
zhuo.song@linux.alibaba.com, oliver.yang@linux.alibaba.com,
Ruidong Tian <tianruidong@linux.alibaba.com>
Subject: [PATCH v7 11/16] arm64: ras: Add RAS decode notifier chain
Date: Tue, 2 Jun 2026 15:15:34 +0800 [thread overview]
Message-ID: <20260602071540.3711528-12-tianruidong@linux.alibaba.com> (raw)
In-Reply-To: <20260602071540.3711528-1-tianruidong@linux.alibaba.com>
Introduce a blocking notifier chain that allows external modules (e.g.,
EDAC drivers, vendor-specific decoders) to receive and further decode
RAS error events. Each error event is passed to all registered decoders
after being logged.
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
---
drivers/ras/arm64/ras-core.c | 15 +++++++++++++++
include/linux/ras.h | 8 ++++++++
2 files changed, 23 insertions(+)
diff --git a/drivers/ras/arm64/ras-core.c b/drivers/ras/arm64/ras-core.c
index 94514a5bb973..0b07b69545ad 100644
--- a/drivers/ras/arm64/ras-core.c
+++ b/drivers/ras/arm64/ras-core.c
@@ -139,11 +139,26 @@ static void ras_print(struct ras_record *record, struct ras_ext_regs *regs)
}
}
+static ATOMIC_NOTIFIER_HEAD(ras_decoder_chain);
+
+void ras_register_decode_chain(struct notifier_block *nb)
+{
+ atomic_notifier_chain_register(&ras_decoder_chain, nb);
+}
+EXPORT_SYMBOL_GPL(ras_register_decode_chain);
+
+void ras_unregister_decode_chain(struct notifier_block *nb)
+{
+ atomic_notifier_chain_unregister(&ras_decoder_chain, nb);
+}
+EXPORT_SYMBOL_GPL(ras_unregister_decode_chain);
+
static void ras_do_proc(struct ras_record *record, struct ras_ext_regs *regs)
{
u64 status = regs->err_status, addr = regs->err_addr;
ras_print(record, regs);
+ atomic_notifier_call_chain(&ras_decoder_chain, 0, record);
if (status & ERR_STATUS_CE)
return;
diff --git a/include/linux/ras.h b/include/linux/ras.h
index 468941bfe855..11663150612f 100644
--- a/include/linux/ras.h
+++ b/include/linux/ras.h
@@ -63,4 +63,12 @@ amd_convert_umc_mca_addr_to_sys_addr(struct atl_err *err) { return -EINVAL; }
#define GET_LOGICAL_INDEX(mpidr) -EINVAL
#endif /* CONFIG_ARM || CONFIG_ARM64 */
+#if IS_ENABLED(CONFIG_ARM64_RAS_DRIVER)
+void ras_register_decode_chain(struct notifier_block *nb);
+void ras_unregister_decode_chain(struct notifier_block *nb);
+#else
+static inline void ras_register_decode_chain(struct notifier_block *nb) {}
+static inline void ras_unregister_decode_chain(struct notifier_block *nb) {}
+#endif /* CONFIG_ARM64_RAS_DRIVER */
+
#endif /* __RAS_H__ */
--
2.51.2.612.gdc70283dfc
next prev parent reply other threads:[~2026-06-02 7:16 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 7:15 [PATCH v7 00/16] Support Armv8 RAS Extensions for Kernel-first error handling Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 01/16] ACPI/AEST: Register arm64_ras platform devices from AEST v2 Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 02/16] arm64: ras: Add probe/remove for arm64_ras driver Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 03/16] arm64: ras: Unify the read/write interface for system and MMIO registers Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 04/16] arm64: ras: Support RAS Common Fault Injection Model Extension Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 05/16] arm64: ras: Plumb AEST interrupts as platform IRQ resources Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 06/16] arm64: ras: Enable error reporting Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 07/16] arm64: ras: Add error record processing and interrupt handling Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 08/16] arm64: ras: Handle memory failure for uncorrectable errors Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 09/16] arm64: ras: Probe RAS architecture version Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 10/16] arm64: ras: Support CE threshold of error record Ruidong Tian
2026-06-02 7:15 ` Ruidong Tian [this message]
2026-06-02 7:15 ` [PATCH v7 12/16] arm64: ras: Expose config abi through debugfs Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 13/16] arm64: ras: Introduce ras inject interface Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 14/16] arm64: ras: support vendor node CMN700 Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 15/16] arm64: ras: Introduce ras error storm mitigation Ruidong Tian
2026-06-02 7:15 ` [PATCH v7 16/16] trace, ras: add ARM RAS extension trace event Ruidong Tian
2026-07-08 2:41 ` [PATCH v7 00/16] Support Armv8 RAS Extensions for Kernel-first error handling Borislav Petkov
2026-07-08 17:22 ` Catalin Marinas
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=20260602071540.3711528-12-tianruidong@linux.alibaba.com \
--to=tianruidong@linux.alibaba.com \
--cc=bp@alien8.de \
--cc=catalin.marinas@arm.com \
--cc=guohanjun@huawei.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=oliver.yang@linux.alibaba.com \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.com \
--cc=sudeep.holla@kernel.org \
--cc=tglx@kernel.org \
--cc=tony.luck@intel.com \
--cc=umang.chheda@oss.qualcomm.com \
--cc=will@kernel.org \
--cc=zhuo.song@linux.alibaba.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