Repository navigation
ras: add ARM RAS extensions and Device Tree frontend - #1324
Faruque Ansari (faruque-ansari) wants to merge 24 commits into
Conversation
This reverts commit 360986b, reversing changes made to 9740e45. PR qualcomm-linux#711 (WORKAROUND) moved aest_cpu_pm_init() from module_init to probe so the CPU PM notifier is not registered on targets where AEST is not enabled. Reverted as part of backing out the AEST DT frontend series (qualcomm-linux#603) and its follow-up fixes; this change only touches drivers/ras/aest/aest-core.c, which is removed by the qualcomm-linux#603 revert. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…linux#672)" This reverts commit 3e60f57, reversing changes made to d58ad5c. PR qualcomm-linux#672 (WORKAROUND) added a CPU PM notifier to restore the AEST misc0/ctrl registers on CPU idle exit, which reset on idle entry and blocked CE/UE interrupts. Reverted as part of backing out the AEST DT frontend series (qualcomm-linux#603); this change only touches drivers/ras/aest/aest-core.c, which is removed by the qualcomm-linux#603 revert. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…omm-linux#603)" This reverts commit cf15a4e, reversing changes made to 3862dc4. PR qualcomm-linux#603 extended the ARM AEST (Arm Error Source Table) RAS driver with a Device Tree frontend mirroring the ACPI implementation, along with core driver correctness fixes, DT bindings, and Lemans/Monaco SoC error nodes. Reverting the full merge removes: - drivers/ras/aest/ (core, DT/ACPI frontends, CMN, inject, sysfs) - drivers/acpi/arm64/aest.c and ACPI AEST glue - DT bindings (Documentation/devicetree/bindings/arm/arm,aest.yaml, include/dt-bindings/arm/aest.h) and ABI docs - lemans.dtsi / monaco.dtsi AEST nodes - arm-cmn RAS additions and qcom.config CPU caches RAS enablement The follow-up workarounds in qualcomm-linux#672 and qualcomm-linux#711 are reverted first so this merge revert applies cleanly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Parse the ARM Error Source Table (AEST) v2 [1] and present each error-source node to the RAS subsystem as a generic platform device. Rather than letting the RAS driver consume AEST-specific structures directly, all per-node metadata (interface type, register bases, group format, record bitmaps, GSIVs, vendor data) is conveyed via fwnode software-node properties. This keeps every AEST encoding detail in the ACPI front-end and lets the same back-end driver bind unchanged when a Device Tree front-end is added later. If the interface flags indicate an associated ACPI namespace device (AEST_XFACE_FLAG_ERROR_DEVICE), the companion ACPI device is looked up and attached so that downstream drivers can reach it. [1]: https://developer.arm.com/documentation/den0085/0200/ Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Introduce the back-end platform driver that binds to the devices created by the AEST front-end. Driver input is taken exclusively from fwnode properties, so the same probe path serves any future front-end (DT, hand-rolled) without conditional code. The probe builds two layers of state: - struct ras_node: one AEST error source - struct ras_record: one error record inside a node This split mirrors the hardware: a node owns the shared MMIO/ERRGSR window and policy, while records are the unit at which errors are reported, masked and polled. Later patches plug interrupts, decoding, storm mitigation and userspace ABI onto these two objects without touching the front-end. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
…MIO registers ARM RAS error records are reachable either through system registers (PE-affine sources) or through memory-mapped windows (off-core sources), depending on the AEST interface type. Hard-coding the choice at every call site would scatter that knowledge across the driver and double every future change. Introduce a ras_access ops table that hides the transport behind a single read/write contract, so all later error handling, masking and injection code is access-method-agnostic and can be reasoned about as plain register operations. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Add inject register descripted in Common Fault Injection Model Extension. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
AEST describes one or more interrupts per error source for delivering
Fault Handling (FHI) and Error Recovery (ERI) events.
This change keeps the existing front-end / back-end split:
- The ACPI front-end is the only place that understands AEST
interrupt encodings; it registers each GSI and exposes the
resulting Linux IRQs as named platform resources
("AEST:FHI" / "AEST:ERI").
- The back-end looks up its IRQs by name and requests them
according to routing type. SPIs are device-shared and use a
normal shared handler. PPIs are inherently per-CPU, so the node
is cloned into a percpu ras_node and the handler is installed
via request_percpu_irq() with that percpu cookie, ensuring each
CPU services its own copy of the source.
Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Until now, AEST nodes were registered but never had interrupt routing programmed, so probe finished without actually arming any error source. Both shared and PE (oncore) nodes need this bring-up; the difference is only that oncore state is percpu and must follow CPU online/offline. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Wire the IRQs registered by the front-end into a record-processing routine, so that interrupts raised by an error source actually translate into observable error events. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
When an uncorrectable error (UE/DE) is detected and the error record reports a System Physical Address (SPA), invoke memory_failure() to offline the affected page. This prevents further consumption of corrupted data. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
The RAS version of a component can be probed via its ERRDEVARCH register. In cases where a component (e.g., SMMU) does not implement an ERRDEVARCH register, the driver falls back to using the RAS version of the Processing Element (PE). Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
The CE threshold defines the number of Correctable Errors (CE) that must occur in a record before triggering an interrupt. Error records support multiple threshold configurations, including 8B, 16B, and 32B. This patch detects the supported threshold settings for error records and sets the default threshold to 1, ensuring an interrupt is generated for every CE occurrence. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <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. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Expose per-node and per-record configuration through debugfs so bring-up and validation can inspect and tweak driver state (CE threshold, error counters, ...) at runtime. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
End-to-end validation of the RAS driver requires the ability to
generate errors on demand. Driver gives two complementary paths,
which the inject interface deliberately keeps separate:
- Soft injection writes directly into the record's status registers
and is unconstrained by the spec. It is the tool of choice for
state-machine coverage: notifier delivery, ABI shape.
- Hard injection drives the architected inject registers and obeys
the hardware contract, exercising the real interrupt and decode
paths.
Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
The CMN (Coherent Mesh Network) architecture incorporates five distinct device types. Each device type is associated with an error group register set. CMN's error records utilize a memory-mapped single error record view [1]. Critically, one error record corresponds to one AEST node, implying that a single CMN instance can generate hundreds of AEST nodes. To manage this scale, this driver introduces a virtual ras node, which represents an entire CMN device, such as an HNI or HNF. This allows an HNF ras node, for instance, to leverage its errgsr register to pinpoint which specific error record has reported an error. [1]: https://developer.arm.com/documentation/102308/latest/ Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Corrected errors can occasionally be reported at a very high rate
(known on x86 as a "CMCI storm"), consuming a substantial share of
CPU time and disturbing the running workload. The RAS driver needs
to throttle this so that error reporting itself does not become a
denial of service.
Adopt a hybrid per-record / per-node strategy:
- Each record tracks its own CE history in a sliding window.
By default a record enters storm mode once it accumulates more
than 5 corrected errors within roughly one minute, at which
point its FHI/CFI is masked via ERR<n>_CTLR and the record is
added to a node-wide poll set. It leaves storm mode after
~30 s without any further error, at which point the interrupt
is unmasked again. The thresholds and the poll interval are
exposed via debugfs so operators can retune the algorithm at
runtime without rebuilding the kernel.
- The node owns a single timer that drains every stormy
record. The first record entering storm starts the timer; the
last one leaving stops it.
- The poll interval is adaptive: halved on each tick that
still finds errors, doubled on each tick that does not, capped
at 300 s. This way the driver tracks the actual storm intensity
instead of paying a fixed polling cost.
-
- ERI / UI (uncorrectable reporting) is intentionally excluded:
uncorrected errors must remain synchronous and never be
rate-limited.
The result bounds CPU spent on RAS under fault floods while
preserving full fidelity for correctness-critical paths.
Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/
Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
Add a trace event for hardware errors reported by the ARMv8 RAS extension registers. userspace app can monitor this trace event and decode error information. Link: https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/ Signed-off-by: Ruidong Tian <tianruidong@linux.alibaba.com>
ARMv8 and later processors implement the RAS (Reliability, Availability and Serviceability) extensions, exposing hardware error records through a standardised register interface. Add Device Tree bindings to describe RAS error sources. Link: https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com>
Add a Device Tree frontend for the ARM64 RAS driver, allowing it to be used on platforms without ACPI firmware. The error sources defined in DT are registered as arm64_ras platform devices at boot. The frontend produces the same software fwnode properties as the ACPI path, so the core driver probes DT and ACPI nodes identically without any firmware-specific knowledge. Link: https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com>
ARM Reliability, Availability and Serviceability (RAS) enables processor components(for eg cache, tlb etc) to record and signal hardware faults through architected error records and fault handling interrupts. This allows software to detect, report and, where possible, recover from hardware errors. The Monaco CPU subsystem implements RAS error records for the L1/L2 cache hierarchy and the shared L3 caches. Describe these error sources in Device Tree so that the ARM RAS framework can discover them and handle cache-related error reports. Co-developed-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
ARM Reliability, Availability and Serviceability (RAS) enables processor components(for eg cache, tlb etc) to record and signal hardware faults through architected error records and fault handling interrupts. This allows software to detect, report and, where possible, recover from hardware errors. The Lemans CPU subsystem implements RAS error records for the L1/L2 cache hierarchy and the shared L3 caches. Describe these error sources in Device Tree so that the ARM RAS framework can discover them and handle cache-related error reports. Co-developed-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
ARM Reliability, Availability and Serviceability (RAS) enables processor components (for eg cache, tlb etc) to record and signal hardware faults through architected error records and fault handling interrupts. This allows software to detect, report and, where possible, recover from hardware errors. The Shikra CPU subsystem implements RAS error records for the L1/L2 cache hierarchy and the shared L3 caches. Describe these error sources in Device Tree so that the ARM RAS framework can discover them and handle cache-related error reports. Co-developed-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com> Link: https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/ Signed-off-by: Umang Chheda <umang.chheda@oss.qualcomm.com> Signed-off-by: Faruque Ansari <faruque.ansari@oss.qualcomm.com>
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
1 similar comment
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
1 similar comment
|
Merge Check Failed: No CR Numbers Found Error: No Change Request numbers were found. Please add Change Request numbers to your pull request description in the format CRs-Fixed: 12345 or link GitHub issues that are associated with Change Requests. |
|
Dev Completion validation failed CR: 4551759 The change task for this CR could not be moved to Dev Complete because of the error above. Please resolve the issue in Orbit and re-run the failed Orbit check. |
PR #1324 — validate-patchPR: #1324
Final Summary
|
PR #1324 — checker-log-analyzerPR: #1324
Detailed report: Full report
|
This branch backs out the previously-merged AEST RAS work (PRs #603, #672, #711),
which lived under
drivers/ras/aest/, and re-lands it as the upstream.The goal is to replace the current AEST implementation with the exact
latest patches posted to lore, so we stay aligned with upstream and carry no out-of-tree
delta.
What changed
From Ruidong Tian, v7:
https://lore.kernel.org/all/20260602071540.3711528-1-tianruidong@linux.alibaba.com/
Introduces the ACPI AEST frontend, the
arm64_rasbackend platform driver,system/MMIO register abstraction, interrupt plumbing, error reporting,
memory_failure handling for UEs, CE thresholding, decode notifier chain,
debugfs ABI, inject interface, CMN-700 vendor support, error-storm mitigation,
and a trace event.
From Umang Chheda:
https://lore.kernel.org/all/20260918095746.3347893-1-umang.chheda@oss.qualcomm.com/
Adds the DT bindings, the Device Tree frontend (producing the same fwnode
properties as the ACPI path), and RAS error-source nodes for monaco, lemans,
and shikra.
CRs-Fixed: 4551759