Re: [PATCH 1/2] s390/pkey: Include <linux/device-id/ap.h> for struct ap_device_id
From: Harald Freudenberger
Date: Fri Nov 13 2026 - 09:41:03 EST
On 2026-11-09 16:48, Uwe Kleine-König wrote:
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@xxxxxxxxxxxx>
Closes: https://d.kernelci.org/i/maestro:7baaa311bc9c30a8ad43f42c24225ab2fead866a
Fixes: cdfdbc11552b ("Move struct cpu_feature to <linux/cpufeature.h>")
Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>
---
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.
This makes the pkey_cca kernel module automatically loaded when an AP device
(CEX4...CEX8) is detected by the kernel. Similar the pkey_ep11 kernel module
has a MODULE_DEVICE_TABLE entry.
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@xxxxxxxxxxxx>
Thanks
Uwe