Re: [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header

From: Uwe Kleine-König

Date: Mon Nov 09 2026 - 10:59:39 EST


On Mon, Nov 09, 2026 at 09:14:41AM -0500, Sasha Levin wrote:
> Since commit cdfdbc11552b ("Move struct cpu_feature to
> <linux/cpufeature.h>"), devicetable-offsets.c includes
> <linux/cpufeature.h>, which includes <asm/cpufeature.h> on architectures
> that select GENERIC_CPU_AUTOPROBE. On loongarch and mips that header
> pulls in <asm/elf.h>, and from there <linux/fs.h> and <linux/mmzone.h>,
> which need <generated/bounds.h>. devicetable-offsets.c is built before
> that header is generated, so even defconfig fails on both:
>
> include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
>
> Move struct cpu_feature to <linux/device-id/cpu_feature.h>, next to the
> other device id types, and include that from <linux/cpufeature.h>,
> devicetable-offsets.c and file2alias.c.

I didn't do that before because I didn't have the impression that struct
cpu_feature is a device id type. Seems a bit like a misuse to me, but
🤷.

Acked-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxx>

Best regards
Uwe

Attachment: signature.asc
Description: PGP signature