[PATCH v2 02/11] ACPI: APEI: GHES: add ghes_cper.o stub

Ahmed Tiba ahmed.tiba at arm.com
Wed Mar 11 05:19:22 PDT 2026


On 24/02/2026 15:25, Jonathan Cameron wrote:
> On Fri, 20 Feb 2026 13:42:20 +0000
> Ahmed Tiba <ahmed.tiba at arm.com> 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.

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.

>>
>> Signed-off-by: Ahmed Tiba <ahmed.tiba at arm.com>
>> ---
>>   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 := n
>> diff --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.

I can defer the copyright line until there’s more new content.

>> + * Author: Ahmed Tiba <ahmed.tiba at arm.com>
>> + * Based on ACPI APEI GHES driver.
>> + *
> 
> No obvious benefit in this blank line so I'd drop it.

I'll 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..

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.

>> +
>> +#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. */
>>
> 




More information about the linux-arm-kernel mailing list