* [PATCH v8 22/22] RAS: add firmware-first CPER provider
2026-12-03 13:40 [PATCH v8 00/22] ACPI: APEI: share GHES CPER helpers and add DT FFH provider Ahmed Tiba
@ 2026-12-03 13:40 ` Ahmed Tiba
2026-12-03 14:28 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Ahmed Tiba @ 2026-12-03 13:40 UTC (permalink / raw)
To: Rafael J. Wysocki, Tony Luck, Borislav Petkov, Hanjun Guo,
Mauro Carvalho Chehab, Shuai Xue, Len Brown, Saket Dumbre,
Davidlohr Bueso, Jonathan Cameron, Dave Jiang, Alison Schofield,
Vishal Verma, Dan Williams, Ira Weiny, Li Ming,
Mahesh J Salgaonkar, Oliver O'Halloran, Bjorn Helgaas,
Ahmed Tiba, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Jonathan Corbet, Shuah Khan
Cc: linux-kernel, linux-acpi, acpica-devel, linux-cxl, linuxppc-dev,
linux-pci, devicetree, linux-edac, linux-doc, pawel.chmielewski,
rdunlap, justin.he, David.Hu2, Michael.Zhao2, icheng,
Dmitry.Lamerov, maciej.wieczor-retman, sourabhjain
Add a firmware-first CPER provider that reuses the shared
GHES helpers, wire it into the RAS Kconfig/Makefile and
document it in the admin guide.
Update MAINTAINERS now that the driver exists.
Signed-off-by: Ahmed Tiba <ahmed.tiba@arm.com>
---
Documentation/admin-guide/RAS/main.rst | 15 ++
MAINTAINERS | 1 +
drivers/Makefile | 1 +
drivers/acpi/Kconfig | 5 +
drivers/acpi/acpi_extlog.c | 7 +-
drivers/acpi/apei/Kconfig | 1 +
drivers/acpi/apei/Makefile | 1 -
drivers/acpi/apei/ghes.c | 9 +-
drivers/acpi/apei/ghes_cper.c | 46 +++--
drivers/pci/pcie/aer.c | 4 +-
drivers/ras/Kconfig | 13 ++
drivers/ras/Makefile | 1 +
drivers/ras/cper-esource.c | 356 +++++++++++++++++++++++++++++++++
include/acpi/ghes_cper.h | 23 ++-
include/cxl/event.h | 2 +-
15 files changed, 456 insertions(+), 29 deletions(-)
diff --git a/Documentation/admin-guide/RAS/main.rst b/Documentation/admin-guide/RAS/main.rst
index c1040e5a5b35..b75c27f1e3c1 100644
--- a/Documentation/admin-guide/RAS/main.rst
+++ b/Documentation/admin-guide/RAS/main.rst
@@ -205,6 +205,21 @@ Architecture (MCA)\ [#f3]_.
.. [#f3] For more details about the Machine Check Architecture (MCA),
please read Documentation/arch/x86/x86_64/machinecheck.rst at the Kernel tree.
+Firmware-first CPER providers
+-----------------------------
+
+Some systems expose Common Platform Error Record (CPER) data through
+platform firmware, with the error source described in DeviceTree.
+Enable ``CONFIG_RAS_CPER_ESOURCE`` to support those providers. The
+current in-tree binding is
+``Documentation/devicetree/bindings/firmware/arm,ras-cper.yaml``.
+
+The DeviceTree node describes the firmware-owned status buffer and ack
+buffer used to exchange CPER data with the OS. The driver reuses the
+shared GHES CPER handling helpers, so parsing, logging, notifier
+delivery, and memory failure handling follow the same paths as ACPI
+GHES whether the error source is described by ACPI or DeviceTree.
+
EDAC - Error Detection And Correction
*************************************
diff --git a/MAINTAINERS b/MAINTAINERS
index 8be23ad6d2c0..7426c0406ace 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -23405,6 +23405,7 @@ RAS ERROR STATUS
M: Ahmed Tiba <ahmed.tiba@arm.com>
S: Maintained
F: Documentation/devicetree/bindings/firmware/arm,ras-cper.yaml
+F: drivers/ras/cper-esource.c
RAS INFRASTRUCTURE
M: Tony Luck <tony.luck@intel.com>
diff --git a/drivers/Makefile b/drivers/Makefile
index 27a664cb45ea..1a62b5aa718c 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -32,6 +32,7 @@ obj-y += char/ipmi/
obj-$(CONFIG_ACPI) += acpi/
obj-$(CONFIG_GHES_CPER_HELPERS) += acpi/apei/ghes_cper.o
+obj-$(CONFIG_GHES_CPER_PCIEAER_HELPERS) += acpi/apei/ghes_helpers.o
# PnP must come after ACPI since it will eventually need to check if acpi
# was used and do nothing if so
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index 3cec674cf788..1687b819bdff 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -8,8 +8,13 @@ config ARCH_SUPPORTS_ACPI
config GHES_CPER_HELPERS
bool
+ select GENERIC_ALLOCATOR
select UEFI_CPER
+config GHES_CPER_PCIEAER_HELPERS
+ bool
+ depends on PCIEAER
+
menuconfig ACPI
bool "ACPI (Advanced Configuration and Power Interface) Support"
depends on ARCH_SUPPORTS_ACPI
diff --git a/drivers/acpi/acpi_extlog.c b/drivers/acpi/acpi_extlog.c
index bf5f7b1a9aea..27c32f7b1f08 100644
--- a/drivers/acpi/acpi_extlog.c
+++ b/drivers/acpi/acpi_extlog.c
@@ -235,9 +235,10 @@ static int extlog_print(struct notifier_block *nb, unsigned long val,
struct cxl_cper_sec_prot_err *prot_err =
acpi_hest_get_payload(gdata);
- cxl_cper_post_prot_err(prot_err,
- gdata->error_severity,
- gdata->error_data_length);
+ if (IS_ENABLED(CONFIG_ACPI_APEI_PCIEAER))
+ cxl_cper_post_prot_err(prot_err,
+ gdata->error_severity,
+ gdata->error_data_length);
} else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
diff --git a/drivers/acpi/apei/Kconfig b/drivers/acpi/apei/Kconfig
index ddb62638eb02..3a858b10f14c 100644
--- a/drivers/acpi/apei/Kconfig
+++ b/drivers/acpi/apei/Kconfig
@@ -38,6 +38,7 @@ config ACPI_APEI_GHES
config ACPI_APEI_PCIEAER
bool "APEI PCIe AER logging/recovering support"
depends on ACPI_APEI && PCIEAER
+ select GHES_CPER_PCIEAER_HELPERS
help
PCIe AER errors may be reported via APEI firmware first mode.
Turn on this option to enable the corresponding support.
diff --git a/drivers/acpi/apei/Makefile b/drivers/acpi/apei/Makefile
index 66588d6be56f..378863dfec77 100644
--- a/drivers/acpi/apei/Makefile
+++ b/drivers/acpi/apei/Makefile
@@ -5,7 +5,6 @@ obj-$(CONFIG_ACPI_APEI_GHES) += ghes.o
ifeq ($(CONFIG_COMPILE_TEST)_$(CONFIG_CC_IS_CLANG)_$(call clang-min-version, 180000),y_y_)
KASAN_SANITIZE_ghes.o := n
endif
-obj-$(CONFIG_ACPI_APEI_PCIEAER) += ghes_helpers.o
obj-$(CONFIG_ACPI_APEI_EINJ) += einj.o
einj-y := einj-core.o
einj-$(CONFIG_ACPI_APEI_EINJ_CXL) += einj-cxl.o
diff --git a/drivers/acpi/apei/ghes.c b/drivers/acpi/apei/ghes.c
index 3a3a864ac5f6..6833edd819de 100644
--- a/drivers/acpi/apei/ghes.c
+++ b/drivers/acpi/apei/ghes.c
@@ -114,8 +114,15 @@ static DEFINE_SPINLOCK(ghes_notify_lock_irq);
static void ghes_do_proc(struct ghes *ghes,
const struct acpi_hest_generic_status *estatus)
{
+ unsigned int recovery = 0;
+
+ if (IS_ENABLED(CONFIG_ACPI_APEI_MEMORY_FAILURE))
+ recovery |= GHES_CPER_RECOVER_MEMORY;
+ if (IS_ENABLED(CONFIG_ACPI_APEI_PCIEAER))
+ recovery |= GHES_CPER_RECOVER_PCIE;
+
ghes_cper_handle_status(ghes->dev, ghes->generic,
- estatus, is_hest_sync_notify(ghes));
+ estatus, is_hest_sync_notify(ghes), recovery);
}
static void __ghes_panic(struct ghes *ghes,
diff --git a/drivers/acpi/apei/ghes_cper.c b/drivers/acpi/apei/ghes_cper.c
index bceac27ac274..330150f43f5e 100644
--- a/drivers/acpi/apei/ghes_cper.c
+++ b/drivers/acpi/apei/ghes_cper.c
@@ -42,8 +42,10 @@
#include <acpi/acpi_io.h>
#include <acpi/ghes_cper.h>
+#ifdef CONFIG_ACPI_APEI
#include <asm/fixmap.h>
#include <asm/tlbflush.h>
+#endif
#include "apei-internal.h"
@@ -169,12 +171,12 @@ static void memory_failure_cb(struct callback_head *twork)
gen_pool_free(ghes_estatus_pool, (unsigned long)twcb, sizeof(*twcb));
}
-static bool ghes_do_memory_failure(u64 physical_addr, int flags)
+static bool ghes_do_memory_failure(u64 physical_addr, int flags, bool recover)
{
struct ghes_task_work *twcb;
unsigned long pfn;
- if (!IS_ENABLED(CONFIG_ACPI_APEI_MEMORY_FAILURE))
+ if (!IS_ENABLED(CONFIG_MEMORY_FAILURE) || !recover)
return false;
pfn = PHYS_PFN(physical_addr);
@@ -196,7 +198,7 @@ static bool ghes_do_memory_failure(u64 physical_addr, int flags)
}
bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
- int sev, bool sync)
+ int sev, bool sync, bool recover)
{
int flags = -1;
int sec_sev = ghes_severity(gdata->error_severity);
@@ -213,13 +215,14 @@ bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
flags = sync ? MF_ACTION_REQUIRED : 0;
if (flags != -1)
- return ghes_do_memory_failure(mem_err->physical_addr, flags);
+ return ghes_do_memory_failure(mem_err->physical_addr, flags,
+ recover);
return false;
}
bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
- int sev, bool sync)
+ int sev, bool sync, bool recover)
{
struct cper_sec_proc_arm *err = acpi_hest_get_payload(gdata);
int flags = sync ? MF_ACTION_REQUIRED : 0;
@@ -270,7 +273,8 @@ bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
* and don't filter out 'corrected' error here.
*/
if (is_cache && has_pa) {
- queued |= ghes_do_memory_failure(err_info->physical_fault_addr, flags);
+ queued |= ghes_do_memory_failure(err_info->physical_fault_addr,
+ flags, recover);
p += err_info->length;
continue;
}
@@ -304,11 +308,14 @@ bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
* GHES_SEV_PANIC does not make it to this handling since the kernel must
* panic.
*/
-void ghes_handle_aer(struct acpi_hest_generic_data *gdata)
+void ghes_handle_aer(struct acpi_hest_generic_data *gdata, bool recover)
{
-#ifdef CONFIG_ACPI_APEI_PCIEAER
+#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
struct cper_sec_pcie *pcie_err = acpi_hest_get_payload(gdata);
+ if (!recover)
+ return;
+
if (gdata->error_data_length < sizeof(*pcie_err))
return;
@@ -403,7 +410,7 @@ static u32 ghes_mem_err_min_len(u64 validation_bits)
void ghes_cper_handle_status(struct device *dev,
const struct acpi_hest_generic *generic,
const struct acpi_hest_generic_status *estatus,
- bool sync)
+ bool sync, unsigned int recovery)
{
int sev, sec_sev;
struct acpi_hest_generic_data *gdata;
@@ -451,16 +458,23 @@ void ghes_cper_handle_status(struct device *dev,
atomic_notifier_call_chain(&ghes_report_chain, sev, mem_err);
arch_apei_report_mem_error(sev, mem_err);
- queued |= ghes_handle_memory_failure(gdata, sev, sync);
+ queued |= ghes_handle_memory_failure(gdata, sev, sync,
+ recovery & GHES_CPER_RECOVER_MEMORY);
} else if (guid_equal(sec_type, &CPER_SEC_PCIE)) {
- ghes_handle_aer(gdata);
+ ghes_handle_aer(gdata,
+ recovery & GHES_CPER_RECOVER_PCIE);
} else if (guid_equal(sec_type, &CPER_SEC_PROC_ARM)) {
- queued |= ghes_handle_arm_hw_error(gdata, sev, sync);
+ queued |= ghes_handle_arm_hw_error(gdata, sev, sync,
+ recovery & GHES_CPER_RECOVER_MEMORY);
} else if (guid_equal(sec_type, &CPER_SEC_CXL_PROT_ERR)) {
- struct cxl_cper_sec_prot_err *prot_err = acpi_hest_get_payload(gdata);
+ if (recovery & GHES_CPER_RECOVER_PCIE) {
+ struct cxl_cper_sec_prot_err *prot_err;
- cxl_cper_post_prot_err(prot_err, gdata->error_severity,
- gdata->error_data_length);
+ prot_err = acpi_hest_get_payload(gdata);
+ cxl_cper_post_prot_err(prot_err,
+ gdata->error_severity,
+ gdata->error_data_length);
+ }
} else if (guid_equal(sec_type, &CPER_SEC_CXL_GEN_MEDIA_GUID)) {
struct cxl_cper_event_rec *rec = acpi_hest_get_payload(gdata);
@@ -868,7 +882,7 @@ struct work_struct *cxl_cper_prot_err_work;
void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
int severity, u32 len)
{
-#ifdef CONFIG_ACPI_APEI_PCIEAER
+#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
struct cxl_cper_prot_err_work_data wd;
if (cxl_cper_sec_prot_err_valid(prot_err, len))
diff --git a/drivers/pci/pcie/aer.c b/drivers/pci/pcie/aer.c
index 8708ca3257bb..ee41fd43e5fc 100644
--- a/drivers/pci/pcie/aer.c
+++ b/drivers/pci/pcie/aer.c
@@ -1014,7 +1014,7 @@ void aer_print_error(struct aer_err_info *info, int i)
}
}
-#ifdef CONFIG_ACPI_APEI_PCIEAER
+#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
int cper_severity_to_aer(int cper_severity)
{
switch (cper_severity) {
@@ -1343,7 +1343,7 @@ static void handle_error_source(struct pci_dev *dev, struct aer_err_info *info)
pci_aer_handle_error(dev, info);
}
-#ifdef CONFIG_ACPI_APEI_PCIEAER
+#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
#define AER_RECOVER_RING_SIZE 16
diff --git a/drivers/ras/Kconfig b/drivers/ras/Kconfig
index 070e17639faa..f416b71ea80a 100644
--- a/drivers/ras/Kconfig
+++ b/drivers/ras/Kconfig
@@ -56,6 +56,19 @@ config RAS_CEC_DEBUG
source "drivers/ras/amd/atl/Kconfig"
+config RAS_CPER_ESOURCE
+ bool "Firmware-first CPER error source block provider"
+ select GHES_CPER_HELPERS
+ select GHES_CPER_PCIEAER_HELPERS if PCIEAER
+ depends on OF_RESERVED_MEM && !CPU_BIG_ENDIAN
+ help
+ Enable support for firmware-first Common Platform Error Record
+ (CPER) error source block providers. The current in-tree user is
+ described by the arm,ras-cper DeviceTree binding. The driver
+ reuses the existing GHES CPER helpers so the error processing
+ matches the ACPI code paths, but it can be built even when ACPI is
+ disabled.
+
config RAS_FMPM
tristate "FRU Memory Poison Manager"
default m
diff --git a/drivers/ras/Makefile b/drivers/ras/Makefile
index 11f95d59d397..0de069557f31 100644
--- a/drivers/ras/Makefile
+++ b/drivers/ras/Makefile
@@ -2,6 +2,7 @@
obj-$(CONFIG_RAS) += ras.o
obj-$(CONFIG_DEBUG_FS) += debugfs.o
obj-$(CONFIG_RAS_CEC) += cec.o
+obj-$(CONFIG_RAS_CPER_ESOURCE) += cper-esource.o
obj-$(CONFIG_RAS_FMPM) += amd/fmpm.o
obj-y += amd/atl/
diff --git a/drivers/ras/cper-esource.c b/drivers/ras/cper-esource.c
new file mode 100644
index 000000000000..221b5f97e335
--- /dev/null
+++ b/drivers/ras/cper-esource.c
@@ -0,0 +1,356 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Firmware-first CPER error source provider.
+ *
+ * This driver shares the GHES CPER helpers so we keep the reporting and
+ * notifier behaviour identical to ACPI GHES.
+ *
+ * Copyright (C) 2026 ARM Ltd.
+ * Author: Ahmed Tiba <ahmed.tiba@arm.com>
+ */
+
+#include <linux/bitops.h>
+#include <linux/cper.h>
+#include <linux/device-id/of.h>
+#include <linux/idr.h>
+#include <linux/interrupt.h>
+#include <linux/io.h>
+#include <linux/module.h>
+#include <linux/mutex.h>
+#include <linux/of_address.h>
+#include <linux/of_reserved_mem.h>
+#include <linux/panic.h>
+#include <linux/platform_device.h>
+#include <linux/slab.h>
+
+#include <acpi/ghes.h>
+#include <acpi/ghes_cper.h>
+
+static DEFINE_IDA(cper_esource_source_ids);
+static DEFINE_MUTEX(cper_esource_pool_lock);
+static bool cper_esource_pool_ready;
+
+struct cper_esource_ack {
+ void __iomem *addr;
+ bool present;
+};
+
+struct cper_esource {
+ struct device *dev;
+ void __iomem *status;
+ size_t status_len;
+
+ struct cper_esource_ack ack;
+
+ struct acpi_hest_generic generic;
+ struct acpi_hest_generic_status *estatus;
+
+ int irq;
+};
+
+static void __iomem *cper_esource_map_region(struct device *dev,
+ unsigned int index, size_t *size,
+ resource_size_t *start)
+{
+ resource_size_t resource_len;
+ struct resource res;
+ void __iomem *addr;
+
+ if (of_reserved_mem_region_to_resource(dev->of_node, index, &res))
+ return ERR_PTR(dev_err_probe(dev, -EINVAL,
+ "unable to resolve memory-region %u\n",
+ index));
+
+ resource_len = resource_size(&res);
+ if (!resource_len)
+ return ERR_PTR(dev_err_probe(dev, -EINVAL,
+ "memory-region %u has zero length\n",
+ index));
+ if (resource_len > SIZE_MAX)
+ return ERR_PTR(dev_err_probe(dev, -EOVERFLOW,
+ "memory-region %u is too large\n",
+ index));
+
+ *size = resource_len;
+ if (start)
+ *start = res.start;
+
+ addr = devm_ioremap(dev, res.start, *size);
+ if (!addr)
+ return ERR_PTR(dev_err_probe(dev, -ENOMEM,
+ "failed to map memory-region %u\n",
+ index));
+
+ return addr;
+}
+
+static void cper_esource_release_source_id(void *data)
+{
+ struct cper_esource *ctx = data;
+
+ ida_free(&cper_esource_source_ids, ctx->generic.header.source_id);
+}
+
+static int cper_esource_init_pool(void)
+{
+ struct device_node *np;
+ unsigned int count = 0;
+ int rc = 0;
+
+ mutex_lock(&cper_esource_pool_lock);
+ if (cper_esource_pool_ready)
+ goto out_unlock;
+
+ for_each_compatible_node(np, NULL, "arm,ras-cper")
+ if (of_device_is_available(np))
+ count++;
+
+ rc = ghes_estatus_pool_init(count ?: 1);
+ if (!rc)
+ cper_esource_pool_ready = true;
+
+out_unlock:
+ mutex_unlock(&cper_esource_pool_lock);
+ return rc;
+}
+
+static size_t cper_esource_estatus_len(struct acpi_hest_generic_status *estatus)
+{
+ if (estatus->raw_data_length)
+ return (size_t)estatus->raw_data_offset +
+ (size_t)estatus->raw_data_length;
+ else
+ return sizeof(*estatus) + (size_t)estatus->data_length;
+}
+
+static int cper_esource_get_estatus_len(struct cper_esource *ctx, size_t *len)
+{
+ if (!ctx->estatus->block_status)
+ return -ENOENT;
+
+ if (ctx->estatus->data_length >
+ ctx->status_len - sizeof(*ctx->estatus))
+ return -EINVAL;
+
+ if (cper_estatus_check_header(ctx->estatus))
+ return -EINVAL;
+
+ if (ctx->estatus->raw_data_length &&
+ (ctx->estatus->raw_data_offset > ctx->status_len ||
+ ctx->estatus->raw_data_length >
+ ctx->status_len - ctx->estatus->raw_data_offset))
+ return -EINVAL;
+
+ *len = cper_esource_estatus_len(ctx->estatus);
+ if (*len < sizeof(*ctx->estatus) || *len > ctx->status_len)
+ return -EINVAL;
+
+ return 0;
+}
+
+static void cper_esource_ack(struct cper_esource *ctx)
+{
+ u32 val;
+
+ if (!ctx->ack.present)
+ return;
+
+ val = readl(ctx->ack.addr);
+ writel(val | BIT(0), ctx->ack.addr);
+}
+
+static void cper_esource_clear_status(struct cper_esource *ctx)
+{
+ ctx->estatus->block_status = 0;
+ writel(0, ctx->status);
+}
+
+static void cper_esource_fatal(struct cper_esource *ctx)
+{
+ __ghes_print_estatus(KERN_EMERG, &ctx->generic, ctx->estatus);
+ add_taint(TAINT_MACHINE_CHECK, LOCKDEP_STILL_OK);
+ cper_esource_clear_status(ctx);
+ cper_esource_ack(ctx);
+ panic("GHES: fatal firmware-first CPER record from %s\n",
+ dev_name(ctx->dev));
+}
+
+static irqreturn_t cper_esource_process(struct cper_esource *ctx)
+{
+ unsigned int recovery = 0;
+ size_t estatus_len, snapshot_len;
+ int rc;
+ int sev;
+
+ if (!readl(ctx->status))
+ return IRQ_NONE;
+
+ memcpy_fromio(ctx->estatus, ctx->status, sizeof(*ctx->estatus));
+
+ rc = cper_esource_get_estatus_len(ctx, &estatus_len);
+ if (rc == -ENOENT)
+ return IRQ_NONE;
+ if (rc)
+ goto invalid;
+
+ memcpy_fromio(ctx->estatus, ctx->status, estatus_len);
+ rc = cper_esource_get_estatus_len(ctx, &snapshot_len);
+ if (rc || snapshot_len != estatus_len)
+ goto invalid;
+ if (cper_estatus_check(ctx->estatus))
+ goto invalid;
+
+ sev = ghes_severity(ctx->estatus->error_severity);
+ if (sev >= GHES_SEV_PANIC)
+ cper_esource_fatal(ctx);
+
+ if (!ghes_estatus_cached(ctx->estatus) &&
+ ghes_print_estatus(NULL, &ctx->generic, ctx->estatus))
+ ghes_estatus_cache_add(&ctx->generic, ctx->estatus);
+
+ if (IS_ENABLED(CONFIG_MEMORY_FAILURE))
+ recovery |= GHES_CPER_RECOVER_MEMORY;
+ if (IS_ENABLED(CONFIG_PCIEAER))
+ recovery |= GHES_CPER_RECOVER_PCIE;
+
+ ghes_cper_handle_status(ctx->dev, &ctx->generic, ctx->estatus, false,
+ recovery);
+ cper_esource_clear_status(ctx);
+ cper_esource_ack(ctx);
+
+ return IRQ_HANDLED;
+
+invalid:
+ dev_warn_ratelimited(ctx->dev, FW_WARN GHES_PFX
+ "Invalid error status block\n");
+ cper_esource_clear_status(ctx);
+ cper_esource_ack(ctx);
+ return IRQ_HANDLED;
+}
+
+static irqreturn_t cper_esource_irq(int irq, void *data)
+{
+ struct cper_esource *ctx = data;
+
+ return cper_esource_process(ctx);
+}
+
+static int cper_esource_init_ack(struct cper_esource *ctx)
+{
+ struct device *dev = ctx->dev;
+ resource_size_t start;
+ size_t size;
+
+ ctx->ack.addr = cper_esource_map_region(dev, 1, &size, &start);
+ if (IS_ERR(ctx->ack.addr))
+ return PTR_ERR(ctx->ack.addr);
+
+ if (size < sizeof(u32))
+ return dev_err_probe(dev, -EINVAL,
+ "ack resource is smaller than 4 bytes\n");
+ if (!IS_ALIGNED(start, sizeof(u32)))
+ return dev_err_probe(dev, -EINVAL,
+ "ack resource is not naturally aligned\n");
+
+ ctx->ack.present = true;
+ return 0;
+}
+
+static int cper_esource_probe(struct platform_device *pdev)
+{
+ struct device *dev = &pdev->dev;
+ struct cper_esource *ctx;
+ resource_size_t status_start;
+ size_t size;
+ int source_id;
+ int rc;
+
+ ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ return -ENOMEM;
+
+ ctx->dev = dev;
+
+ ctx->status = cper_esource_map_region(dev, 0, &size, &status_start);
+ if (IS_ERR(ctx->status))
+ return PTR_ERR(ctx->status);
+
+ if (!IS_ALIGNED(status_start, sizeof(ctx->estatus->block_status)))
+ return dev_err_probe(dev, -EINVAL,
+ "status resource is not naturally aligned\n");
+
+ ctx->status_len = min_t(size_t, size, GHES_ESTATUS_MAX_SIZE);
+ if (size > ctx->status_len)
+ dev_warn(dev, "using the first %zu bytes of the status region\n",
+ ctx->status_len);
+ if (ctx->status_len < sizeof(*ctx->estatus))
+ return dev_err_probe(dev, -EINVAL,
+ "status region is smaller than a CPER header\n");
+
+ rc = cper_esource_init_ack(ctx);
+ if (rc)
+ return rc;
+
+ rc = cper_esource_init_pool();
+ if (rc)
+ return rc;
+
+ ctx->estatus = devm_kzalloc(dev, ctx->status_len, GFP_KERNEL);
+ if (!ctx->estatus)
+ return -ENOMEM;
+
+ /* Keep source_id 0 unused so a zeroed header is never treated as valid. */
+ source_id = ida_alloc_min(&cper_esource_source_ids, 1, GFP_KERNEL);
+ if (source_id < 0)
+ return source_id;
+ if (source_id > U16_MAX) {
+ ida_free(&cper_esource_source_ids, source_id);
+ return -ENOSPC;
+ }
+
+ ctx->generic.header.type = ACPI_HEST_TYPE_GENERIC_ERROR;
+ ctx->generic.header.source_id = source_id;
+
+ rc = devm_add_action_or_reset(dev, cper_esource_release_source_id,
+ ctx);
+ if (rc)
+ return rc;
+
+ ctx->generic.notify.type = ACPI_HEST_NOTIFY_EXTERNAL;
+ ctx->generic.error_block_length = ctx->status_len;
+
+ ctx->irq = platform_get_irq(pdev, 0);
+ if (ctx->irq < 0)
+ return ctx->irq;
+
+ rc = devm_request_irq(dev, ctx->irq, cper_esource_irq, 0,
+ dev_name(dev), ctx);
+ if (rc)
+ return dev_err_probe(dev, rc, "failed to request interrupt\n");
+
+ disable_irq(ctx->irq);
+ cper_esource_process(ctx);
+ enable_irq(ctx->irq);
+
+ return 0;
+}
+
+static const struct of_device_id cper_esource_of_match[] = {
+ { .compatible = "arm,ras-cper" },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, cper_esource_of_match);
+
+static struct platform_driver cper_esource_driver = {
+ .driver = {
+ .name = "cper-esource",
+ .of_match_table = cper_esource_of_match,
+ },
+ .probe = cper_esource_probe,
+};
+
+module_platform_driver(cper_esource_driver);
+
+MODULE_AUTHOR("Ahmed Tiba <ahmed.tiba@arm.com>");
+MODULE_DESCRIPTION("Firmware-first CPER provider");
+MODULE_LICENSE("GPL");
diff --git a/include/acpi/ghes_cper.h b/include/acpi/ghes_cper.h
index eb07ec98cc94..8183652257a4 100644
--- a/include/acpi/ghes_cper.h
+++ b/include/acpi/ghes_cper.h
@@ -16,14 +16,18 @@
#ifndef ACPI_APEI_GHES_CPER_H
#define ACPI_APEI_GHES_CPER_H
+#include <linux/bits.h>
#include <linux/device.h>
#include <linux/notifier.h>
#include <linux/workqueue.h>
#include <acpi/ghes.h>
-#include <asm/fixmap.h>
#include <cxl/event.h>
+#ifdef CONFIG_ACPI_APEI
+#include <asm/fixmap.h>
+#endif
+
#define GHES_PFX "GHES: "
#define GHES_ESTATUS_MAX_SIZE 65536
@@ -40,6 +44,11 @@
/* Prevent too many caches are allocated because of RCU */
#define GHES_ESTATUS_CACHE_ALLOCED_MAX (GHES_ESTATUS_CACHES_SIZE * 3 / 2)
+enum ghes_cper_recovery {
+ GHES_CPER_RECOVER_MEMORY = BIT(0),
+ GHES_CPER_RECOVER_PCIE = BIT(1),
+};
+
#define GHES_ESTATUS_CACHE_LEN(estatus_len) \
(sizeof(struct ghes_estatus_cache) + (estatus_len))
#define GHES_ESTATUS_FROM_CACHE(estatus_cache) \
@@ -108,14 +117,18 @@ void ghes_clear_estatus(struct ghes *ghes,
int ghes_estatus_cached(struct acpi_hest_generic_status *estatus);
void ghes_estatus_cache_add(struct acpi_hest_generic *generic,
struct acpi_hest_generic_status *estatus);
+int ghes_register_vendor_record_notifier(struct notifier_block *nb);
+void ghes_unregister_vendor_record_notifier(struct notifier_block *nb);
+int devm_ghes_register_vendor_record_notifier(struct device *dev,
+ struct notifier_block *nb);
void ghes_defer_non_standard_event(struct acpi_hest_generic_data *gdata,
int sev);
int ghes_severity(int severity);
bool ghes_handle_memory_failure(struct acpi_hest_generic_data *gdata,
- int sev, bool sync);
+ int sev, bool sync, bool recover);
bool ghes_handle_arm_hw_error(struct acpi_hest_generic_data *gdata,
- int sev, bool sync);
-void ghes_handle_aer(struct acpi_hest_generic_data *gdata);
+ int sev, bool sync, bool recover);
+void ghes_handle_aer(struct acpi_hest_generic_data *gdata, bool recover);
void ghes_log_hwerr(int sev, guid_t *sec_type);
void __ghes_print_estatus(const char *pfx,
const struct acpi_hest_generic *generic,
@@ -126,7 +139,7 @@ int ghes_print_estatus(const char *pfx,
void ghes_cper_handle_status(struct device *dev,
const struct acpi_hest_generic *generic,
const struct acpi_hest_generic_status *estatus,
- bool sync);
+ bool sync, unsigned int recovery);
void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
int severity, u32 len);
void cxl_cper_register_prot_err_work(struct work_struct *work);
diff --git a/include/cxl/event.h b/include/cxl/event.h
index 91fb76d052b5..75d5e3013901 100644
--- a/include/cxl/event.h
+++ b/include/cxl/event.h
@@ -311,7 +311,7 @@ static inline int cxl_cper_prot_err_kfifo_get(struct cxl_cper_prot_err_work_data
}
#endif
-#ifdef CONFIG_ACPI_APEI_PCIEAER
+#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
int cxl_cper_sec_prot_err_valid(struct cxl_cper_sec_prot_err *prot_err, u32 len);
int cxl_cper_setup_prot_err_work_data(struct cxl_cper_prot_err_work_data *wd,
struct cxl_cper_sec_prot_err *prot_err,
--
2.43.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v8 22/22] RAS: add firmware-first CPER provider
2026-12-03 13:40 ` [PATCH v8 22/22] RAS: add firmware-first CPER provider Ahmed Tiba
@ 2026-12-03 14:28 ` sashiko-bot
2026-12-05 9:54 ` kernel test robot
2026-12-05 9:54 ` kernel test robot
2 siblings, 0 replies; 6+ messages in thread
From: sashiko-bot @ 2026-12-03 14:28 UTC (permalink / raw)
To: Ahmed Tiba; +Cc: linux-cxl, linux-pci, devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 8 potential
issues to consider:
- [High] RAS: RAS_CPER_ESOURCE selects ACPI-only Kconfig symbols on
non-ACPI arches
- [Medium] ACPI: APEI: unguarded acpi/acpi_io.h include breaks non-ACPI
builds
- [Medium] cxl: CXL_RAS depends on ACPI_APEI_GHES, dropping
RAS_CPER_ESOURCE errors
- [Medium] RAS: RAS_CPER_ESOURCE lacks HAS_IOMEM dependency for
devm_ioremap()
- [Medium] RAS: cper_esource_probe() uses devm_kzalloc() for up to 64
KiB estatus
- [Low] RAS: commit message omits cross-subsystem AER, extlog, CXL, and
GHES changes
- [Low] RAS: cper_esource_map_region() maps full region before length
clamping
- [Low] RAS: cper_esource_map_region() returns ERR_PTR() for void
__iomem *
--
commit d8e05a1aeeac8369e2236d27e4905ba75243e89a
Author: Ahmed Tiba <ahmed.tiba@arm.com>
> RAS: add firmware-first CPER provider
>
> Add a firmware-first CPER provider that reuses the shared
> GHES helpers, wire it into the RAS Kconfig/Makefile and
> document it in the admin guide.
>
> Update MAINTAINERS now that the driver exists.
>
> Signed-off-by: Ahmed Tiba <ahmed.tiba@arm.com>
[Severity: Low]
Should the commit message also describe the cross-subsystem changes in
this patch, or could they be split into preparatory commits?
Beyond adding drivers/ras/cper-esource.c, the diff introduces
CONFIG_GHES_CPER_PCIEAER_HELPERS, moves ghes_helpers.o out of
drivers/acpi/apei/Makefile, switches PCIe AER and CXL headers to the
new symbol, adds recovery flags to ghes_cper_handle_status(), and
guards cxl_cper_post_prot_err() in acpi_extlog.c. Explaining why those
changes are needed would help reviewers and future readers of the git
history.
[ ... ]
> diff --git a/drivers/acpi/apei/ghes_cper.c b/drivers/acpi/apei/ghes_cper.c
> index bceac27ac2747..330150f43f5e3 100644
> --- a/drivers/acpi/apei/ghes_cper.c
> +++ b/drivers/acpi/apei/ghes_cper.c
> @@ -42,8 +42,10 @@
> #include <acpi/acpi_io.h>
> #include <acpi/ghes_cper.h>
>
> +#ifdef CONFIG_ACPI_APEI
> #include <asm/fixmap.h>
> #include <asm/tlbflush.h>
> +#endif
>
> #include "apei-internal.h"
[Severity: Medium]
Does leaving <acpi/acpi_io.h> outside the CONFIG_ACPI_APEI guard break
non-ACPI builds on RISC-V?
include/acpi/acpi_io.h unconditionally includes <asm/acpi.h> and
defines an inline acpi_os_ioremap() fallback calling ioremap_cache()
when acpi_os_ioremap is not defined. On RISC-V with CONFIG_ACPI=n,
arch/riscv/include/asm/acpi.h does not define acpi_os_ioremap and
ioremap_cache() does not exist, so compiling ghes_cper.c fails.
Guarding <acpi/acpi_io.h> (and apei_unmap_generic_address() in
apei-internal.h, which calls acpi_os_unmap_generic_address()) with
CONFIG_ACPI_APEI would avoid pulling in ACPI I/O headers on non-ACPI
builds.
[ ... ]
> @@ -868,7 +882,7 @@ struct work_struct *cxl_cper_prot_err_work;
> void cxl_cper_post_prot_err(struct cxl_cper_sec_prot_err *prot_err,
> int severity, u32 len)
> {
> -#ifdef CONFIG_ACPI_APEI_PCIEAER
> +#ifdef CONFIG_GHES_CPER_PCIEAER_HELPERS
> struct cxl_cper_prot_err_work_data wd;
>
> if (cxl_cper_sec_prot_err_valid(prot_err, len))
[Severity: Medium]
Can CXL protocol errors reported through RAS_CPER_ESOURCE ever be
delivered when ACPI_APEI_GHES is disabled?
In drivers/cxl/Kconfig, CXL_RAS still depends on ACPI_APEI_GHES &&
PCIEAER && CXL_BUS. When ACPI_APEI_GHES=n with RAS_CPER_ESOURCE=y,
cxl_ras_init() compiles to a stub, cxl_cper_register_prot_err_work() is
never called, and cxl_cper_post_prot_err() returns early with
cxl_cper_prot_err_work == NULL, silently dropping every CXL protocol
error.
[ ... ]
> diff --git a/drivers/ras/Kconfig b/drivers/ras/Kconfig
> index 070e17639faa3..f416b71ea80ae 100644
> --- a/drivers/ras/Kconfig
> +++ b/drivers/ras/Kconfig
> @@ -56,6 +56,19 @@ config RAS_CEC_DEBUG
>
> source "drivers/ras/amd/atl/Kconfig"
>
> +config RAS_CPER_ESOURCE
> + bool "Firmware-first CPER error source block provider"
> + select GHES_CPER_HELPERS
> + select GHES_CPER_PCIEAER_HELPERS if PCIEAER
[Severity: High]
Does selecting GHES_CPER_HELPERS and GHES_CPER_PCIEAER_HELPERS here
break builds on architectures that do not source drivers/acpi/Kconfig?
Both symbols are defined in drivers/acpi/Kconfig, which is only sourced
by arm64, loongarch, riscv, and x86, whereas drivers/ras/Kconfig is
sourced on all architectures. On any other little-endian architecture
with OF_RESERVED_MEM (such as 32-bit ARM), those symbols remain
undefined, ghes_cper.o and ghes_helpers.o are not built, and linking
cper-esource.o fails with undefined references to the GHES and CPER
helpers.
Note that moving the Kconfig symbols alone is not enough while
ghes_cper.c still pulls in <asm/acpi.h> via <acpi/acpi_io.h>, since
<asm/acpi.h> only exists on those same four architectures.
> + depends on OF_RESERVED_MEM && !CPU_BIG_ENDIAN
[Severity: Medium]
Is a HAS_IOMEM dependency missing here?
cper_esource_map_region() calls devm_ioremap(), which is only built
when CONFIG_HAS_IOMEM is enabled. OF_RESERVED_MEM does not depend on
HAS_IOMEM, so configurations like UML with CONFIG_OF=y and
CONFIG_NO_IOMEM=y can enable RAS_CPER_ESOURCE and fail to link.
[ ... ]
> diff --git a/drivers/ras/cper-esource.c b/drivers/ras/cper-esource.c
> new file mode 100644
> index 0000000000000..221b5f97e335c
> --- /dev/null
> +++ b/drivers/ras/cper-esource.c
[ ... ]
> +static void __iomem *cper_esource_map_region(struct device *dev,
> + unsigned int index, size_t *size,
> + resource_size_t *start)
> +{
> + resource_size_t resource_len;
> + struct resource res;
> + void __iomem *addr;
> +
> + if (of_reserved_mem_region_to_resource(dev->of_node, index, &res))
> + return ERR_PTR(dev_err_probe(dev, -EINVAL,
> + "unable to resolve memory-region %u\n",
> + index));
[Severity: Low]
Should the error returns in cper_esource_map_region() use
IOMEM_ERR_PTR() instead of ERR_PTR()?
The function returns void __iomem *, so returning ERR_PTR() triggers
sparse address-space mismatch warnings on all four error paths.
[ ... ]
> + *size = resource_len;
> + if (start)
> + *start = res.start;
> +
> + addr = devm_ioremap(dev, res.start, *size);
[Severity: Low]
Could cper_esource_map_region() clamp the mapping length before calling
devm_ioremap()?
cper_esource_probe() clamps ctx->status_len to GHES_ESTATUS_MAX_SIZE
after mapping the entire reserved-memory region, and
cper_esource_init_ack() only accesses a single 32-bit word. Mapping
the full unclamped region wastes ioremap virtual address space and can
cause unnecessary -ENOMEM failures if DeviceTree describes a large
region.
[ ... ]
> + ctx->status_len = min_t(size_t, size, GHES_ESTATUS_MAX_SIZE);
[ ... ]
> + ctx->estatus = devm_kzalloc(dev, ctx->status_len, GFP_KERNEL);
[Severity: Medium]
Should ctx->estatus be allocated with kvzalloc() instead of
devm_kzalloc()?
ctx->status_len can be up to GHES_ESTATUS_MAX_SIZE (64 KiB). Because
devm_kzalloc() prepends struct devres and rounds up to a power-of-two
page order, a 64 KiB status buffer turns into a 128 KiB (order-5)
physically contiguous allocation on 4 KiB page kernels, wasting nearly
64 KiB per device and risking compaction stalls or -ENOMEM on
fragmented systems.
ctx->estatus is only accessed by the CPU, so kvzalloc() paired with a
devm_add_action_or_reset() callback calling kvfree() avoids both the
high-order contiguous allocation and the rounding overhead.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-0-157aac88560b@arm.com?part=22
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v8 22/22] RAS: add firmware-first CPER provider
2026-12-03 13:40 ` [PATCH v8 22/22] RAS: add firmware-first CPER provider Ahmed Tiba
2026-12-03 14:28 ` sashiko-bot
@ 2026-12-05 9:54 ` kernel test robot
2026-12-05 9:54 ` kernel test robot
2 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-12-05 9:54 UTC (permalink / raw)
To: Ahmed Tiba, Rafael J. Wysocki, Tony Luck, Borislav Petkov,
Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue, Len Brown,
Saket Dumbre, Davidlohr Bueso, Jonathan Cameron, Dave Jiang,
Alison Schofield, Vishal Verma, Ira Weiny, Li Ming,
Mahesh J Salgaonkar, Oliver O'Halloran, Bjorn Helgaas,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet,
Shuah Khan
Cc: oe-kbuild-all, linux-media, linux-kernel, linux-acpi,
acpica-devel, linux-cxl
Hi Ahmed,
kernel test robot noticed the following build errors:
[auto build test ERROR on fe6ff8d5d675c01793b9f051d16055dd4aa75244]
url: https://github.com/intel-lab-lkp/linux/commits/Ahmed-Tiba/ACPI-APEI-GHES-wait-for-RCU-readers-before-unmapping/20261203-134006
base: fe6ff8d5d675c01793b9f051d16055dd4aa75244
patch link: https://lore.kernel.org/r/20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b%40arm.com
patch subject: [PATCH v8 22/22] RAS: add firmware-first CPER provider
config: nios2-randconfig-1000-20261204 (https://download.01.org/0day-ci/archive/20261204/20261204145209.BnvJva7d-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204145209.BnvJva7d-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204145209.BnvJva7d-lkp@intel.com/
All errors (new ones prefixed by >>):
nios2-linux-ld: drivers/ras/cper-esource.o: in function `cper_esource_get_estatus_len':
cper-esource.c:(.text+0x1bc): undefined reference to `cper_estatus_check_header'
>> cper-esource.c:(.text+0x1bc): relocation truncated to fit: R_NIOS2_CALL26 against `cper_estatus_check_header'
nios2-linux-ld: drivers/ras/cper-esource.o: in function `cper_esource_process':
cper-esource.c:(.text+0x344): undefined reference to `cper_estatus_check'
>> cper-esource.c:(.text+0x344): relocation truncated to fit: R_NIOS2_CALL26 against `cper_estatus_check'
>> nios2-linux-ld: cper-esource.c:(.text+0x37c): undefined reference to `ghes_severity'
>> cper-esource.c:(.text+0x37c): relocation truncated to fit: R_NIOS2_CALL26 against `ghes_severity'
>> nios2-linux-ld: cper-esource.c:(.text+0x398): undefined reference to `__ghes_print_estatus'
>> cper-esource.c:(.text+0x398): relocation truncated to fit: R_NIOS2_CALL26 against `__ghes_print_estatus'
>> nios2-linux-ld: cper-esource.c:(.text+0x400): undefined reference to `ghes_estatus_cached'
>> cper-esource.c:(.text+0x400): relocation truncated to fit: R_NIOS2_CALL26 against `ghes_estatus_cached'
>> nios2-linux-ld: cper-esource.c:(.text+0x414): undefined reference to `ghes_print_estatus'
>> cper-esource.c:(.text+0x414): relocation truncated to fit: R_NIOS2_CALL26 against `ghes_print_estatus'
>> nios2-linux-ld: cper-esource.c:(.text+0x424): undefined reference to `ghes_estatus_cache_add'
>> cper-esource.c:(.text+0x424): relocation truncated to fit: R_NIOS2_CALL26 against `ghes_estatus_cache_add'
>> nios2-linux-ld: cper-esource.c:(.text+0x43c): undefined reference to `ghes_cper_handle_status'
>> cper-esource.c:(.text+0x43c): relocation truncated to fit: R_NIOS2_CALL26 against `ghes_cper_handle_status'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v8 22/22] RAS: add firmware-first CPER provider
2026-12-03 13:40 ` [PATCH v8 22/22] RAS: add firmware-first CPER provider Ahmed Tiba
2026-12-03 14:28 ` sashiko-bot
2026-12-05 9:54 ` kernel test robot
@ 2026-12-05 9:54 ` kernel test robot
2 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-12-05 9:54 UTC (permalink / raw)
To: Ahmed Tiba, Rafael J. Wysocki, Tony Luck, Borislav Petkov,
Hanjun Guo, Mauro Carvalho Chehab, Shuai Xue, Len Brown,
Saket Dumbre, Davidlohr Bueso, Jonathan Cameron, Dave Jiang,
Alison Schofield, Vishal Verma, Ira Weiny, Li Ming,
Mahesh J Salgaonkar, Oliver O'Halloran, Bjorn Helgaas,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Jonathan Corbet,
Shuah Khan
Cc: oe-kbuild-all, linux-media, linux-kernel, linux-acpi,
acpica-devel, linux-cxl
Hi Ahmed,
kernel test robot noticed the following build errors:
[auto build test ERROR on fe6ff8d5d675c01793b9f051d16055dd4aa75244]
url: https://github.com/intel-lab-lkp/linux/commits/Ahmed-Tiba/ACPI-APEI-GHES-wait-for-RCU-readers-before-unmapping/20261203-134006
base: fe6ff8d5d675c01793b9f051d16055dd4aa75244
patch link: https://lore.kernel.org/r/20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b%40arm.com
patch subject: [PATCH v8 22/22] RAS: add firmware-first CPER provider
config: riscv-randconfig-1000-20261204 (https://download.01.org/0day-ci/archive/20261204/20261204162703.D5ogdaSI-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 9.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204162703.D5ogdaSI-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/20261204162703.D5ogdaSI-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
In file included from drivers/acpi/apei/ghes_cper.c:42:
include/acpi/acpi_io.h: In function 'acpi_os_ioremap':
>> include/acpi/acpi_io.h:13:15: error: implicit declaration of function 'ioremap_cache'; did you mean 'ioremap_uc'? [-Werror=implicit-function-declaration]
13 | return ioremap_cache(phys, size);
| ^~~~~~~~~~~~~
| ioremap_uc
>> include/acpi/acpi_io.h:13:15: warning: returning 'int' from a function with return type 'void *' makes pointer from integer without a cast [-Wint-conversion]
13 | return ioremap_cache(phys, size);
| ^~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +13 include/acpi/acpi_io.h
652261a7a86c884 include/acpi/acpi_io.h Mark Salter 2015-03-24 8
652261a7a86c884 include/acpi/acpi_io.h Mark Salter 2015-03-24 9 #ifndef acpi_os_ioremap
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 10 static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 11 acpi_size size)
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 12 {
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 @13 return ioremap_cache(phys, size);
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 14 }
652261a7a86c884 include/acpi/acpi_io.h Mark Salter 2015-03-24 15 #endif
2d6d9fd3a54a28c include/linux/acpi_io.h Rafael J. Wysocki 2011-01-19 16
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v8 22/22] RAS: add firmware-first CPER provider
@ 2026-12-05 9:54 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-12-05 9:54 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "too many reports for this commit"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b@arm.com>
References: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b@arm.com>
TO: Ahmed Tiba <ahmed.tiba@arm.com>
TO: "Rafael J. Wysocki" <rafael@kernel.org>
TO: Tony Luck <tony.luck@intel.com>
TO: Borislav Petkov <bp@alien8.de>
TO: Hanjun Guo <guohanjun@huawei.com>
TO: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media@vger.kernel.org
TO: Shuai Xue <xueshuai@linux.alibaba.com>
TO: Len Brown <lenb@kernel.org>
TO: Saket Dumbre <saket.dumbre@intel.com>
TO: Davidlohr Bueso <dave@stgolabs.net>
TO: Jonathan Cameron <jic23@kernel.org>
TO: Dave Jiang <dave.jiang@intel.com>
TO: Alison Schofield <alison.schofield@intel.com>
TO: Vishal Verma <vishal.l.verma@intel.com>
TO: Ira Weiny <iweiny@kernel.org>
TO: Li Ming <ming.li@zohomail.com>
TO: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
TO: "Oliver O'Halloran" <oohall@gmail.com>
TO: Bjorn Helgaas <helgaas@kernel.org>
TO: Ahmed Tiba <ahmed.tiba@arm.com>
TO: Rob Herring <robh@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Jonathan Corbet <corbet@lwn.net>
TO: Shuah Khan <skhan@linuxfoundation.org>
CC: linux-kernel@vger.kernel.org
CC: linux-acpi@vger.kernel.org
CC: acpica-devel@lists.linux.dev
CC: linux-cxl@vger.kernel.org
Hi Ahmed,
kernel test robot noticed the following build errors:
[auto build test ERROR on fe6ff8d5d675c01793b9f051d16055dd4aa75244]
url: https://github.com/intel-lab-lkp/linux/commits/Ahmed-Tiba/ACPI-APEI-GHES-wait-for-RCU-readers-before-unmapping/20261203-134006
base: fe6ff8d5d675c01793b9f051d16055dd4aa75244
patch link: https://lore.kernel.org/r/20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b%40arm.com
patch subject: [PATCH v8 22/22] RAS: add firmware-first CPER provider
:::::: branch date: 20 hours ago
:::::: commit date: 20 hours ago
config: sh-allyesconfig (https://download.01.org/0day-ci/archive/20261204/20261204175104.FmIRQ3T0-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 16.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261204/20261204175104.FmIRQ3T0-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261204175104.FmIRQ3T0-lkp@intel.com/
All errors (new ones prefixed by >>):
sh4-linux-ld: drivers/media/i2c/tc358746.o: in function `tc358746_probe':
tc358746.c:(.text+0x1d2c): undefined reference to `devm_clk_hw_register'
sh4-linux-ld: tc358746.c:(.text+0x1d38): undefined reference to `devm_of_clk_add_hw_provider'
sh4-linux-ld: tc358746.c:(.text+0x1d3c): undefined reference to `of_clk_hw_simple_get'
sh4-linux-ld: drivers/ras/cper-esource.o: in function `cper_esource_get_estatus_len':
>> cper-esource.c:(.text+0x260): undefined reference to `cper_estatus_check_header'
sh4-linux-ld: drivers/ras/cper-esource.o: in function `cper_esource_process':
>> cper-esource.c:(.text+0x468): undefined reference to `cper_estatus_check'
>> sh4-linux-ld: cper-esource.c:(.text+0x46c): undefined reference to `ghes_severity'
>> sh4-linux-ld: cper-esource.c:(.text+0x470): undefined reference to `__ghes_print_estatus'
>> sh4-linux-ld: cper-esource.c:(.text+0x484): undefined reference to `ghes_estatus_cached'
>> sh4-linux-ld: cper-esource.c:(.text+0x488): undefined reference to `ghes_print_estatus'
>> sh4-linux-ld: cper-esource.c:(.text+0x48c): undefined reference to `ghes_estatus_cache_add'
>> sh4-linux-ld: cper-esource.c:(.text+0x490): undefined reference to `ghes_cper_handle_status'
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v8 22/22] RAS: add firmware-first CPER provider
@ 2026-12-05 9:55 kernel test robot
0 siblings, 0 replies; 6+ messages in thread
From: kernel test robot @ 2026-12-05 9:55 UTC (permalink / raw)
To: oe-kbuild; +Cc: lkp
::::::
:::::: Manual check reason: "too many reports for this commit"
::::::
BCC: lkp@intel.com
CC: oe-kbuild-all@lists.linux.dev
In-Reply-To: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b@arm.com>
References: <20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b@arm.com>
TO: Ahmed Tiba <ahmed.tiba@arm.com>
TO: "Rafael J. Wysocki" <rafael@kernel.org>
TO: Tony Luck <tony.luck@intel.com>
TO: Borislav Petkov <bp@alien8.de>
TO: Hanjun Guo <guohanjun@huawei.com>
TO: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: linux-media@vger.kernel.org
TO: Shuai Xue <xueshuai@linux.alibaba.com>
TO: Len Brown <lenb@kernel.org>
TO: Saket Dumbre <saket.dumbre@intel.com>
TO: Davidlohr Bueso <dave@stgolabs.net>
TO: Jonathan Cameron <jic23@kernel.org>
TO: Dave Jiang <dave.jiang@intel.com>
TO: Alison Schofield <alison.schofield@intel.com>
TO: Vishal Verma <vishal.l.verma@intel.com>
TO: Ira Weiny <iweiny@kernel.org>
TO: Li Ming <ming.li@zohomail.com>
TO: Mahesh J Salgaonkar <mahesh@linux.ibm.com>
TO: "Oliver O'Halloran" <oohall@gmail.com>
TO: Bjorn Helgaas <helgaas@kernel.org>
TO: Ahmed Tiba <ahmed.tiba@arm.com>
TO: Rob Herring <robh@kernel.org>
TO: Krzysztof Kozlowski <krzk@kernel.org>
TO: Conor Dooley <conor+dt@kernel.org>
TO: Jonathan Corbet <corbet@lwn.net>
TO: Shuah Khan <skhan@linuxfoundation.org>
CC: linux-kernel@vger.kernel.org
CC: linux-acpi@vger.kernel.org
CC: acpica-devel@lists.linux.dev
CC: linux-cxl@vger.kernel.org
Hi Ahmed,
kernel test robot noticed the following build errors:
[auto build test ERROR on fe6ff8d5d675c01793b9f051d16055dd4aa75244]
url: https://github.com/intel-lab-lkp/linux/commits/Ahmed-Tiba/ACPI-APEI-GHES-wait-for-RCU-readers-before-unmapping/20261203-134006
base: fe6ff8d5d675c01793b9f051d16055dd4aa75244
patch link: https://lore.kernel.org/r/20261203-topics-ahmtib01-ras_ffh_arm_internal_review-v8-22-157aac88560b%40arm.com
patch subject: [PATCH v8 22/22] RAS: add firmware-first CPER provider
:::::: branch date: 2 days ago
:::::: commit date: 2 days ago
config: um-allyesconfig (https://download.01.org/0day-ci/archive/20261205/20261205124041.rC9kOR7B-lkp@intel.com/config)
compiler: gcc-14 (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261205/20261205124041.rC9kOR7B-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/r/20261205124041.rC9kOR7B-lkp@intel.com/
All errors (new ones prefixed by >>):
/usr/bin/ld: drivers/ras/cper-esource.o: in function `cper_esource_get_estatus_len':
cper-esource.c:(.text+0x4bc): undefined reference to `cper_estatus_check_header'
/usr/bin/ld: drivers/ras/cper-esource.o: in function `cper_esource_process':
cper-esource.c:(.text+0xe05): undefined reference to `cper_estatus_check'
>> /usr/bin/ld: cper-esource.c:(.text+0xeb4): undefined reference to `ghes_severity'
>> /usr/bin/ld: cper-esource.c:(.text+0xf16): undefined reference to `ghes_estatus_cached'
>> /usr/bin/ld: cper-esource.c:(.text+0xf97): undefined reference to `ghes_cper_handle_status'
>> /usr/bin/ld: cper-esource.c:(.text+0xfde): undefined reference to `ghes_print_estatus'
>> /usr/bin/ld: cper-esource.c:(.text+0x1032): undefined reference to `ghes_estatus_cache_add'
>> /usr/bin/ld: cper-esource.c:(.text+0x11aa): undefined reference to `__ghes_print_estatus'
/usr/lib/gcc/x86_64-linux-gnu/14/crtbegin.o: in function `deregister_tm_clones':
crtstuff.c:(.text+0x7): relocation truncated to fit: R_X86_64_32S against `.tm_clone_table'
/usr/lib/gcc/x86_64-linux-gnu/14/crtbegin.o: in function `register_tm_clones':
crtstuff.c:(.text+0x38): relocation truncated to fit: R_X86_64_32S against `.tm_clone_table'
collect2: error: ld returned 1 exit status
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-12-05 9:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-05 9:54 [PATCH v8 22/22] RAS: add firmware-first CPER provider kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2026-12-05 9:55 kernel test robot
2026-12-03 13:40 [PATCH v8 00/22] ACPI: APEI: share GHES CPER helpers and add DT FFH provider Ahmed Tiba
2026-12-03 13:40 ` [PATCH v8 22/22] RAS: add firmware-first CPER provider Ahmed Tiba
2026-12-03 14:28 ` sashiko-bot
2026-12-05 9:54 ` kernel test robot
2026-12-05 9:54 ` kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.