Re: [PATCH v2 02/11] ACPI: APEI: GHES: add ghes_cper.o stub
From: Jonathan Cameron <jonathan.cameron@huawei.com>
Date: 2026-02-24 15:25:38
Also in:
linux-acpi, linux-devicetree, linux-doc
On Fri, 20 Feb 2026 13:42:20 +0000 Ahmed Tiba [off-list ref] wrote:
Introduce a dedicated ghes_cper translation unit so that follow-on commits can move helpers out of ghes.c without touching the build logic twice. This keeps the object in the tree while remaining functionally identical.
I'd probably do this with the first move patch not as a separate patch. That would resolve the question of headers etc below.
quoted hunk ↗ jump to hunk
Signed-off-by: Ahmed Tiba <redacted> --- drivers/acpi/apei/Makefile | 2 +- drivers/acpi/apei/ghes_cper.c | 26 ++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-)diff --git a/drivers/acpi/apei/Makefile b/drivers/acpi/apei/Makefile index 1a0b85923cd4..b3774af70883 100644 --- a/drivers/acpi/apei/Makefile +++ b/drivers/acpi/apei/Makefile@@ -1,6 +1,6 @@ # SPDX-License-Identifier: GPL-2.0 obj-$(CONFIG_ACPI_APEI) += apei.o -obj-$(CONFIG_ACPI_APEI_GHES) += ghes.o +obj-$(CONFIG_ACPI_APEI_GHES) += ghes.o ghes_cper.o # clang versions prior to 18 may blow out the stack with KASAN ifeq ($(CONFIG_COMPILE_TEST)_$(CONFIG_CC_IS_CLANG)_$(call clang-min-version, 180000),y_y_) KASAN_SANITIZE_ghes.o := ndiff --git a/drivers/acpi/apei/ghes_cper.c b/drivers/acpi/apei/ghes_cper.c new file mode 100644 index 000000000000..63047322a3d9 --- /dev/null +++ b/drivers/acpi/apei/ghes_cper.c@@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + *
As below.
+ * APEI GHES CPER helper translation unit - staging file for helper moves + * + * Copyright (C) 2026 ARM Ltd.
As before. If there isn't significant new content copyright doesn't make sense yet.
+ * Author: Ahmed Tiba [off-list ref] + * Based on ACPI APEI GHES driver. + *
No obvious benefit in this blank line so I'd drop it.
+ */ + +#include <linux/err.h> +#include <linux/io.h> +#include <linux/kernel.h> +#include <linux/mm.h> +#include <linux/ratelimit.h> +#include <linux/slab.h>
Build includes up as they become relevant. That way we can see whether they are needed or not. Right now none of them are..
+ +#include <acpi/apei.h> + +#include <asm/fixmap.h> +#include <asm/tlbflush.h> + +#include "apei-internal.h" + +/* Helper bodies will be moved here in follow-up commits. */