Re: [PATCH v2 02/11] ACPI: APEI: GHES: add ghes_cper.o stub
From: Ahmed Tiba <hidden>
Date: 2026-03-11 12:20:33
Also in:
linux-acpi, linux-devicetree, linux-doc
On 24/02/2026 15:25, Jonathan Cameron wrote:
On Fri, 20 Feb 2026 13:42:20 +0000 Ahmed Tiba [off-list ref] wrote:quoted
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.
I kept the stub as a separate patch intentionally. It isolates the build system change and the new translation unit so all subsequent patches are pure mechanical moves, which makes review and bisection straightforward. If I fold the stub into the first move, the first functional patch ends up mixing build plumbing and code movement, which is exactly what I’m trying to avoid.
quoted
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.quoted
+ * 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.
I can defer the copyright line until there’s more new content.
quoted
+ * Author: Ahmed Tiba [off-list ref] + * Based on ACPI APEI GHES driver. + *No obvious benefit in this blank line so I'd drop it.
I'll drop it.
quoted
+ */ + +#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..
I’m front‑loading the includes that the subsequent mechanical moves will need so those patches remain strict cut‑and‑paste with no extra edit noise. That keeps the movement obvious and reviewable.
quoted
+ +#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. */