* [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id
[not found] ` <179416565740.60865.16102443399828949110.b4-review@b4>
@ 2026-11-09 14:14 ` Sasha Levin
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Sasha Levin @ 2026-11-09 14:14 UTC (permalink / raw)
To: Nicolas Schier, Nathan Chancellor
Cc: Uwe Kleine-König, Harald Freudenberger, Holger Dengler,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Huacai Chen,
WANG Xuerui, Thomas Bogendoerfer, linux-kbuild, linux-s390,
loongarch, linux-mips, linux-kernel, kernelci.org bot
pkey_cca.c and pkey_ep11.c got struct ap_device_id from
<linux/mod_devicetable.h> by way of <linux/cpufeature.h>. Commit
cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>") dropped
that include, so s390 defconfig no longer builds:
drivers/s390/crypto/pkey_cca.c:22:28: error: array type has incomplete element type 'struct ap_device_id'
drivers/s390/crypto/pkey_ep11.c:23:28: error: array type has incomplete element type 'struct ap_device_id'
Include the header that defines it, as the other AP drivers do.
Reported-by: kernelci.org bot <bot@kernelci.org>
Closes: https://d.kernelci.org/i/maestro:7baaa311bc9c30a8ad43f42c24225ab2fead866a
Fixes: cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/s390/crypto/pkey_cca.c | 1 +
drivers/s390/crypto/pkey_ep11.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/s390/crypto/pkey_cca.c b/drivers/s390/crypto/pkey_cca.c
index e8dc2f77c137b..f95d61fd5b090 100644
--- a/drivers/s390/crypto/pkey_cca.c
+++ b/drivers/s390/crypto/pkey_cca.c
@@ -10,6 +10,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
+#include <linux/device-id/ap.h>
#include "zcrypt_ccamisc.h"
#include "pkey_base.h"
diff --git a/drivers/s390/crypto/pkey_ep11.c b/drivers/s390/crypto/pkey_ep11.c
index f99c19323f3d7..f66fc97ad5adc 100644
--- a/drivers/s390/crypto/pkey_ep11.c
+++ b/drivers/s390/crypto/pkey_ep11.c
@@ -10,6 +10,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/cpufeature.h>
+#include <linux/device-id/ap.h>
#include "zcrypt_ccamisc.h"
#include "zcrypt_ep11misc.h"
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header
2026-11-09 14:14 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Sasha Levin
@ 2026-11-09 14:14 ` Sasha Levin
2026-11-09 15:57 ` Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
2026-11-09 15:48 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
2 siblings, 2 replies; 6+ messages in thread
From: Sasha Levin @ 2026-11-09 14:14 UTC (permalink / raw)
To: Nicolas Schier, Nathan Chancellor
Cc: Uwe Kleine-König, Harald Freudenberger, Holger Dengler,
Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Huacai Chen,
WANG Xuerui, Thomas Bogendoerfer, linux-kbuild, linux-s390,
loongarch, linux-mips, linux-kernel, kernelci.org bot
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.
Reported-by: kernelci.org bot <bot@kernelci.org>
Closes: https://d.kernelci.org/i/maestro:7473c68181d97f248d2541b3b91d105111c36f97
Closes: https://d.kernelci.org/i/maestro:9b122468fe2be859df134b78bb35a907e6f99ba7
Fixes: cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
include/linux/cpufeature.h | 18 +-----------------
include/linux/device-id/cpu_feature.h | 18 ++++++++++++++++++
scripts/mod/devicetable-offsets.c | 2 +-
scripts/mod/file2alias.c | 2 +-
4 files changed, 21 insertions(+), 19 deletions(-)
create mode 100644 include/linux/device-id/cpu_feature.h
diff --git a/include/linux/cpufeature.h b/include/linux/cpufeature.h
index 7b22a536542d5..cd470987777f3 100644
--- a/include/linux/cpufeature.h
+++ b/include/linux/cpufeature.h
@@ -6,23 +6,7 @@
#ifndef __LINUX_CPUFEATURE_H
#define __LINUX_CPUFEATURE_H
-/*
- * This file is included by scripts/mod/file2alias.c which is compiled
- * using the host compiler which might not have <linux/types.h> but the
- * __u{8,16,32} types are defined there locally.
- */
-#ifdef __KERNEL__
-#include <linux/types.h>
-#endif
-
-/*
- * Generic table type for matching CPU features.
- * @feature: the bit number of the feature (0 - 65535)
- */
-
-struct cpu_feature {
- __u16 feature;
-};
+#include <linux/device-id/cpu_feature.h>
#ifdef CONFIG_GENERIC_CPU_AUTOPROBE
diff --git a/include/linux/device-id/cpu_feature.h b/include/linux/device-id/cpu_feature.h
new file mode 100644
index 0000000000000..937fbe00dcd55
--- /dev/null
+++ b/include/linux/device-id/cpu_feature.h
@@ -0,0 +1,18 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef LINUX_DEVICE_ID_CPU_FEATURE_H
+#define LINUX_DEVICE_ID_CPU_FEATURE_H
+
+#ifdef __KERNEL__
+#include <linux/types.h>
+#endif
+
+/*
+ * Generic table type for matching CPU features.
+ * @feature: the bit number of the feature (0 - 65535)
+ */
+
+struct cpu_feature {
+ __u16 feature;
+};
+
+#endif /* ifndef LINUX_DEVICE_ID_CPU_FEATURE_H */
diff --git a/scripts/mod/devicetable-offsets.c b/scripts/mod/devicetable-offsets.c
index 875eafeb743de..2b5217edf6389 100644
--- a/scripts/mod/devicetable-offsets.c
+++ b/scripts/mod/devicetable-offsets.c
@@ -1,6 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
#define COMPILE_OFFSETS
-#include <linux/cpufeature.h>
#include <linux/kbuild.h>
#include <linux/device-id/acpi.h>
@@ -12,6 +11,7 @@
#include <linux/device-id/ccw.h>
#include <linux/device-id/cdx.h>
#include <linux/device-id/coreboot.h>
+#include <linux/device-id/cpu_feature.h>
#include <linux/device-id/css.h>
#include <linux/device-id/dfl.h>
#include <linux/device-id/dmi.h>
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index f848b39145d97..08b45e096c164 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -121,7 +121,6 @@ typedef struct {
/* Big exception to the "don't include kernel headers into userspace, which
* even potentially has different endianness and word sizes, since
* we handle those differences explicitly below */
-#include "../../include/linux/cpufeature.h"
#include "../../include/linux/device-id/acpi.h"
#include "../../include/linux/device-id/amba.h"
#include "../../include/linux/device-id/ap.h"
@@ -131,6 +130,7 @@ typedef struct {
#include "../../include/linux/device-id/ccw.h"
#include "../../include/linux/device-id/cdx.h"
#include "../../include/linux/device-id/coreboot.h"
+#include "../../include/linux/device-id/cpu_feature.h"
#include "../../include/linux/device-id/css.h"
#include "../../include/linux/device-id/dfl.h"
#include "../../include/linux/device-id/dmi.h"
--
2.53.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id
2026-11-09 14:14 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Sasha Levin
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
@ 2026-11-09 15:48 ` Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
2 siblings, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2026-11-09 15:48 UTC (permalink / raw)
To: Sasha Levin
Cc: Nicolas Schier, Nathan Chancellor, Harald Freudenberger,
Holger Dengler, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, linux-kbuild,
linux-s390, loongarch, linux-mips, linux-kernel, kernelci.org bot
[-- Attachment #1: Type: text/plain, Size: 2180 bytes --]
On Mon, Nov 09, 2026 at 09:14:40AM -0500, Sasha Levin wrote:
> pkey_cca.c and pkey_ep11.c got struct ap_device_id from
> <linux/mod_devicetable.h> by way of <linux/cpufeature.h>. Commit
> cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>") dropped
> that include, so s390 defconfig no longer builds:
>
> drivers/s390/crypto/pkey_cca.c:22:28: error: array type has incomplete element type 'struct ap_device_id'
> drivers/s390/crypto/pkey_ep11.c:23:28: error: array type has incomplete element type 'struct ap_device_id'
>
> Include the header that defines it, as the other AP drivers do.
>
> Reported-by: kernelci.org bot <bot@kernelci.org>
> Closes: https://d.kernelci.org/i/maestro:7baaa311bc9c30a8ad43f42c24225ab2fead866a
> Fixes: cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>")
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/s390/crypto/pkey_cca.c | 1 +
> drivers/s390/crypto/pkey_ep11.c | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/s390/crypto/pkey_cca.c b/drivers/s390/crypto/pkey_cca.c
> index e8dc2f77c137b..f95d61fd5b090 100644
> --- a/drivers/s390/crypto/pkey_cca.c
> +++ b/drivers/s390/crypto/pkey_cca.c
> @@ -10,6 +10,7 @@
> #include <linux/init.h>
> #include <linux/module.h>
> #include <linux/cpufeature.h>
> +#include <linux/device-id/ap.h>
>
> #include "zcrypt_ccamisc.h"
> #include "pkey_base.h"
that makes me wonder why there is an ap MODULE_DEVICE_TABLE in
drivers/s390/crypto/pkey_cca.c while that file doesn't seem to contain a
driver for these device IDs.
> diff --git a/drivers/s390/crypto/pkey_ep11.c b/drivers/s390/crypto/pkey_ep11.c
> index f99c19323f3d7..f66fc97ad5adc 100644
> --- a/drivers/s390/crypto/pkey_ep11.c
> +++ b/drivers/s390/crypto/pkey_ep11.c
> @@ -10,6 +10,7 @@
> #include <linux/init.h>
> #include <linux/module.h>
> #include <linux/cpufeature.h>
> +#include <linux/device-id/ap.h>
>
> #include "zcrypt_ccamisc.h"
> #include "zcrypt_ep11misc.h"
Same here.
But anyhow, as a regression fix the change looks fine.
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Thanks
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
@ 2026-11-09 15:57 ` Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
1 sibling, 0 replies; 6+ messages in thread
From: Uwe Kleine-König @ 2026-11-09 15:57 UTC (permalink / raw)
To: Sasha Levin
Cc: Nicolas Schier, Nathan Chancellor, Harald Freudenberger,
Holger Dengler, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, linux-kbuild,
linux-s390, loongarch, linux-mips, linux-kernel, kernelci.org bot
[-- Attachment #1: Type: text/plain, Size: 1074 bytes --]
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@baylibre.com>
Best regards
Uwe
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id
2026-11-09 14:14 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Sasha Levin
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
2026-11-09 15:48 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Uwe Kleine-König
@ 2026-11-09 16:07 ` Nicolas Schier
2 siblings, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2026-11-09 16:07 UTC (permalink / raw)
To: Nathan Chancellor, Sasha Levin
Cc: Nicolas Schier, Uwe Kleine-König, Harald Freudenberger,
Holger Dengler, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, linux-kbuild,
linux-s390, loongarch, linux-mips, linux-kernel, kernelci.org bot
On Mon, 09 Nov 2026 09:14:40 -0500, Sasha Levin wrote:
> pkey_cca.c and pkey_ep11.c got struct ap_device_id from
> <linux/mod_devicetable.h> by way of <linux/cpufeature.h>. Commit
> cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>") dropped
> that include, so s390 defconfig no longer builds:
>
> drivers/s390/crypto/pkey_cca.c:22:28: error: array type has incomplete element type 'struct ap_device_id'
> drivers/s390/crypto/pkey_ep11.c:23:28: error: array type has incomplete element type 'struct ap_device_id'
>
> [...]
Applied to kbuild/linux.git (kbuild-next-unstable), thanks!
[1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id
https://git.kernel.org/kbuild/c/b48d1c04
Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).
Patches applied to the kbuild-next-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the kbuild-next branch in about a week if no
issues are found.
Best regards,
--
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
2026-11-09 15:57 ` Uwe Kleine-König
@ 2026-11-09 16:07 ` Nicolas Schier
1 sibling, 0 replies; 6+ messages in thread
From: Nicolas Schier @ 2026-11-09 16:07 UTC (permalink / raw)
To: Nathan Chancellor, Sasha Levin
Cc: Nicolas Schier, Uwe Kleine-König, Harald Freudenberger,
Holger Dengler, Heiko Carstens, Vasily Gorbik, Alexander Gordeev,
Huacai Chen, WANG Xuerui, Thomas Bogendoerfer, linux-kbuild,
linux-s390, loongarch, linux-mips, linux-kernel, kernelci.org bot
On Mon, 09 Nov 2026 09:14:41 -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:
>
> [...]
Applied to kbuild/linux.git (kbuild-next-unstable), thanks!
[2/2] devicetable-offsets: Get struct cpu_feature from a device-id header
https://git.kernel.org/kbuild/c/50ccc340
Please look out for regression or issue reports or other follow up
comments, as they may result in the patch/series getting dropped,
reverted or modified (e.g. trailers).
Patches applied to the kbuild-next-unstable branch are accepted pending
wider testing in linux-next and any post-commit review; they will
generally be moved to the kbuild-next branch in about a week if no
issues are found.
Best regards,
--
Nicolas
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-11-09 16:07 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <cover.1792144769.git.u.kleine-koenig@baylibre.com>
[not found] ` <179416565740.60865.16102443399828949110.b4-review@b4>
2026-11-09 14:14 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Sasha Levin
2026-11-09 14:14 ` [PATCH 2/2] devicetable-offsets: Get struct cpu_feature from a device-id header Sasha Levin
2026-11-09 15:57 ` Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
2026-11-09 15:48 ` [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id Uwe Kleine-König
2026-11-09 16:07 ` Nicolas Schier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox