Skip to contentSkip to conversation

<linux/mod_devicetable.h> deprecation continues

PATCH Superseded Uwe Kleine-König (The Capable Hub) 4 participants 9 messages Sep 21 – Oct 6

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover <linux/mod_devicetable.h> deprecation continues

Hello,

this is a next step in the deprecation of <linux/mod_devicetable.h>. scripts/mod/devicetable-offsets.c and scripts/mod/file2alias.c are the only users of that header that use more than a few device-id structs. So their number of lines actually grows when unfolding the needed includes into them. Still it is a reduction in build dependencies.

I suggest to take this via kbuild during the merge window. Would be great to cook in next for a while before.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (3):
Move struct cpu_feature to <linux/cpufeature.h>
devicetable-offsets: Include the needed device-id headers instead of
the catch-all
file2alias: Include the needed device-id headers instead of the
catch-all

 arch/loongarch/kvm/main.c         |  2 +-
 include/linux/cpufeature.h        | 12 ++++++-
 include/linux/mod_devicetable.h   | 13 -------
 scripts/mod/devicetable-offsets.c | 57 ++++++++++++++++++++++++++++++-
 scripts/mod/file2alias.c          | 56 +++++++++++++++++++++++++++++-
 5 files changed, 123 insertions(+), 17 deletions(-)

base-commit: 93f51579e7df248780214094418f205253383cc5

Signature · 1 line
2.56.0.rc1
#1 lore raw

PATCH 1/3 Move struct cpu_feature to <linux/cpufeature.h>

struct cpu_feature used to be defined in <linux/mod_devicetable.h>. It's much better located in <linux/cpufeature.h>. The only downside is that modpost and devicetable-offsets.h need the definition and thus <linux/cpufeature.h> must be included explicitly there.

---
 arch/loongarch/kvm/main.c         |  2 +-
 include/linux/cpufeature.h        | 12 +++++++++++-
 include/linux/mod_devicetable.h   | 13 -------------
 scripts/mod/devicetable-offsets.c |  1 +
 scripts/mod/file2alias.c          |  1 +
 5 files changed, 14 insertions(+), 15 deletions(-)
arch/loongarch/kvm/main.c +1 -1
index 236523d2449d..d082dae61971 100644
@@ -5,7 +5,7 @@
 
 #include <linux/err.h>
 #include <linux/module.h>
-#include <linux/mod_devicetable.h>
+#include <linux/cpufeature.h>
 #include <linux/kvm_host.h>
 #include <asm/cacheflush.h>
 #include <asm/cpufeature.h>
include/linux/cpufeature.h +11 -1
index 6aff540ee9e5..93c1da38aaf6 100644
@@ -6,10 +6,20 @@
 #ifndef __LINUX_CPUFEATURE_H
 #define __LINUX_CPUFEATURE_H
 
+#include <linux/types.h>
+
+/*
+ * Generic table type for matching CPU features.
+ * @feature:	the bit number of the feature (0 - 65535)
+ */
+
+struct cpu_feature {
+	__u16	feature;
+};
+
 #ifdef CONFIG_GENERIC_CPU_AUTOPROBE
 
 #include <linux/init.h>
-#include <linux/mod_devicetable.h>
 #include <asm/cpufeature.h>
 
 /*
include/linux/mod_devicetable.h +0 -13
index a397213bedac..9ce2429b455f 100644
@@ -8,10 +8,6 @@
 #ifndef LINUX_MOD_DEVICETABLE_H
 #define LINUX_MOD_DEVICETABLE_H
 
-#ifdef __KERNEL__
-#include <linux/types.h>
-#endif
-
 #include "device-id/acpi.h"
 #include "device-id/amba.h"
 #include "device-id/ap.h"
@@ -69,13 +65,4 @@
 #include "device-id/x86_cpu.h"
 #include "device-id/zorro.h"
 
-/*
- * Generic table type for matching CPU features.
- * @feature:	the bit number of the feature (0 - 65535)
- */
-
-struct cpu_feature {
-	__u16	feature;
-};
-
 #endif /* LINUX_MOD_DEVICETABLE_H */
scripts/mod/devicetable-offsets.c +1 -0
index b4178c42d08f..b57dbbef8777 100644
@@ -1,5 +1,6 @@
 // SPDX-License-Identifier: GPL-2.0
 #define COMPILE_OFFSETS
+#include <linux/cpufeature.h>
 #include <linux/kbuild.h>
 #include <linux/mod_devicetable.h>
 
scripts/mod/file2alias.c +1 -0
index 8d36c74dec2d..88bff3207277 100644
@@ -121,6 +121,7 @@ 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/mod_devicetable.h"
 
 struct devtable {
Signature · 1 line
2.56.0.rc1
#2 lore raw

Re: [PATCH v1 1/3] Move struct cpu_feature to <linux/cpufeature.h>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] build: cross-compilation failure due to unguarded <linux/types.h> --

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] build: cross-compilation failure due to unguarded <linux/types.h> --

commit eeaf7eac97be82ddec1f82f3064dbaed8a04364f
Author: Uwe Kleine-König (The Capable Hub) <[email protected]>

Move struct cpu_feature to <linux/cpufeature.h>

This commit moves the definition of struct cpu_feature from <linux/mod_devicetable.h> to <linux/cpufeature.h>. It also adds explicit includes of <linux/cpufeature.h> in devicetable-offsets.c and file2alias.c to satisfy modpost requirements.

include/linux/cpufeature.h line 9

Quoted 9 lines
include/linux/cpufeature.h +1 -0
index 6aff540ee9e57..93c1da38aaf69 100644
@@ -6,10 +6,20 @@
 #ifndef __LINUX_CPUFEATURE_H
 #define __LINUX_CPUFEATURE_H
 
+#include <linux/types.h>

[Severity: Low]
Does this unguarded include cause a cross-compilation failure?

Because scripts/mod/file2alias.c is compiled using the host compiler (HOSTCC), this unguarded include in include/linux/cpufeature.h causes the host compiler to pull in the host system's <linux/types.h> when compiling file2alias.c.

On non-Linux systems (like macOS or FreeBSD), this header does not exist, leading to a missing header error. On Linux hosts, it pulls in /usr/include/linux/types.h, which risks compiler redefinition errors against the explicit __u16 typedefs in file2alias.c.

Could this be wrapped in an #ifdef __KERNEL__ guard?

[ ... ]

scripts/mod/file2alias.c typedef struct { · line 124

Quoted 9 lines
scripts/mod/file2alias.c +1 -0
index 8d36c74dec2d5..88bff32072775 100644
@@ -121,6 +121,7 @@ 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"

[Severity: Low]
Does this host-compiled inclusion of the kernel header implicitly pull in the host's linux/types.h due to the new include in cpufeature.h?

This is the inclusion path in scripts/mod/file2alias.c that triggers the cross-compilation failure mentioned above.

Quoted 2 lines
scripts/mod/file2alias.c +0 -0
 #include "../../include/linux/mod_devicetable.h"
 
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH 2/3 devicetable-offsets: Include the needed device-id headers instead of the catch-all

In reply to Uwe Kleine-König (The Capable Hub)

<linux/mod_devicetable.h> is planned to go away. Include just the needed bits in scripts/mod/devicetable-offsets.c which reduces dependencies as <linux/mod_devicetable.h> includes several headers not needed here.

---
 scripts/mod/devicetable-offsets.c | 56 ++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)
scripts/mod/devicetable-offsets.c +55 -1
index b57dbbef8777..1f4bbd014a3d 100644
@@ -2,7 +2,61 @@
 #define COMPILE_OFFSETS
 #include <linux/cpufeature.h>
 #include <linux/kbuild.h>
-#include <linux/mod_devicetable.h>
+
+#include <linux/device-id/acpi.h>
+#include <linux/device-id/amba.h>
+#include <linux/device-id/ap.h>
+#include <linux/device-id/auxiliary.h>
+#include <linux/device-id/bcma.h>
+#include <linux/device-id/ccw.h>
+#include <linux/device-id/cdx.h>
+#include <linux/device-id/coreboot.h>
+#include <linux/device-id/css.h>
+#include <linux/device-id/dfl.h>
+#include <linux/device-id/dmi.h>
+#include <linux/device-id/eisa.h>
+#include <linux/device-id/fsl_mc.h>
+#include <linux/device-id/hda.h>
+#include <linux/device-id/hid.h>
+#include <linux/device-id/hv_vmbus.h>
+#include <linux/device-id/i2c.h>
+#include <linux/device-id/i3c.h>
+#include <linux/device-id/ieee1394.h>
+#include <linux/device-id/input.h>
+#include <linux/device-id/ipack.h>
+#include <linux/device-id/isapnp.h>
+#include <linux/device-id/ishtp.h>
+#include <linux/device-id/mcb.h>
+#include <linux/device-id/mdio.h>
+#include <linux/device-id/mei_cl.h>
+#include <linux/device-id/mhi.h>
+#include <linux/device-id/mips_cdmm.h>
+#include <linux/device-id/of.h>
+#include <linux/device-id/parisc.h>
+#include <linux/device-id/pci.h>
+#include <linux/device-id/pcmcia.h>
+#include <linux/device-id/platform.h>
+#include <linux/device-id/pnp.h>
+#include <linux/device-id/rio.h>
+#include <linux/device-id/rpmsg.h>
+#include <linux/device-id/sdio.h>
+#include <linux/device-id/sdw.h>
+#include <linux/device-id/serio.h>
+#include <linux/device-id/slim.h>
+#include <linux/device-id/spi.h>
+#include <linux/device-id/ssam.h>
+#include <linux/device-id/ssb.h>
+#include <linux/device-id/tb.h>
+#include <linux/device-id/tee_client.h>
+#include <linux/device-id/typec.h>
+#include <linux/device-id/ulpi.h>
+#include <linux/device-id/usb.h>
+#include <linux/device-id/vchiq.h>
+#include <linux/device-id/vio.h>
+#include <linux/device-id/virtio.h>
+#include <linux/device-id/wmi.h>
+#include <linux/device-id/x86_cpu.h>
+#include <linux/device-id/zorro.h>
 
 #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
 #define DEVID_FIELD(devid, field) \
Signature · 1 line
2.56.0.rc1
#4 lore raw

PATCH 3/3 file2alias: Include the needed device-id headers instead of the catch-all

In reply to Uwe Kleine-König (The Capable Hub)

<linux/mod_devicetable.h> is planned to go away. Include just the needed bits in scripts/mod/devicetable-offsets.c which reduces dependencies as <linux/mod_devicetable.h> includes several headers not needed here.

---
 scripts/mod/file2alias.c | 55 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 54 insertions(+), 1 deletion(-)
scripts/mod/file2alias.c +54 -1
index 88bff3207277..7d76233a8d5d 100644
@@ -122,7 +122,60 @@ typedef struct {
  * even potentially has different endianness and word sizes, since
  * we handle those differences explicitly below */
 #include "../../include/linux/cpufeature.h"
-#include "../../include/linux/mod_devicetable.h"
+#include "../../include/linux/device-id/acpi.h"
+#include "../../include/linux/device-id/amba.h"
+#include "../../include/linux/device-id/ap.h"
+#include "../../include/linux/device-id/auxiliary.h"
+#include "../../include/linux/device-id/bcma.h"
+#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/css.h"
+#include "../../include/linux/device-id/dfl.h"
+#include "../../include/linux/device-id/dmi.h"
+#include "../../include/linux/device-id/eisa.h"
+#include "../../include/linux/device-id/fsl_mc.h"
+#include "../../include/linux/device-id/hda.h"
+#include "../../include/linux/device-id/hid.h"
+#include "../../include/linux/device-id/hv_vmbus.h"
+#include "../../include/linux/device-id/i2c.h"
+#include "../../include/linux/device-id/i3c.h"
+#include "../../include/linux/device-id/ieee1394.h"
+#include "../../include/linux/device-id/input.h"
+#include "../../include/linux/device-id/ipack.h"
+#include "../../include/linux/device-id/isapnp.h"
+#include "../../include/linux/device-id/ishtp.h"
+#include "../../include/linux/device-id/mcb.h"
+#include "../../include/linux/device-id/mdio.h"
+#include "../../include/linux/device-id/mei_cl.h"
+#include "../../include/linux/device-id/mhi.h"
+#include "../../include/linux/device-id/mips_cdmm.h"
+#include "../../include/linux/device-id/of.h"
+#include "../../include/linux/device-id/parisc.h"
+#include "../../include/linux/device-id/pci.h"
+#include "../../include/linux/device-id/pcmcia.h"
+#include "../../include/linux/device-id/platform.h"
+#include "../../include/linux/device-id/pnp.h"
+#include "../../include/linux/device-id/rio.h"
+#include "../../include/linux/device-id/rpmsg.h"
+#include "../../include/linux/device-id/sdio.h"
+#include "../../include/linux/device-id/sdw.h"
+#include "../../include/linux/device-id/serio.h"
+#include "../../include/linux/device-id/slim.h"
+#include "../../include/linux/device-id/spi.h"
+#include "../../include/linux/device-id/ssam.h"
+#include "../../include/linux/device-id/ssb.h"
+#include "../../include/linux/device-id/tb.h"
+#include "../../include/linux/device-id/tee_client.h"
+#include "../../include/linux/device-id/typec.h"
+#include "../../include/linux/device-id/ulpi.h"
+#include "../../include/linux/device-id/usb.h"
+#include "../../include/linux/device-id/vchiq.h"
+#include "../../include/linux/device-id/vio.h"
+#include "../../include/linux/device-id/virtio.h"
+#include "../../include/linux/device-id/wmi.h"
+#include "../../include/linux/device-id/x86_cpu.h"
+#include "../../include/linux/device-id/zorro.h"
 
 struct devtable {
 	const char *device_id;
Signature · 1 line
2.56.0.rc1
Acked-by on the v1 series
#5 lore raw
In reply to Uwe Kleine-König (The Capable Hub)

Am 21.09.26 um 16:18 schrieb Uwe Kleine-König (The Capable Hub):

Quoted 8 lines

Hello,

this is a next step in the deprecation of <linux/mod_devicetable.h>. scripts/mod/devicetable-offsets.c and scripts/mod/file2alias.c are the only users of that header that use more than a few device-id structs. So their number of lines actually grows when unfolding the needed includes into them. Still it is a reduction in build dependencies.

Quoted 5 lines

I suggest to take this via kbuild during the merge window. Would be great to cook in next for a while before.

Best regards
Uwe

Quoted 17 lines

Uwe Kleine-König (The Capable Hub) (3):
Move struct cpu_feature to <linux/cpufeature.h>
devicetable-offsets: Include the needed device-id headers instead of
the catch-all
file2alias: Include the needed device-id headers instead of the
catch-all

  arch/loongarch/kvm/main.c         |  2 +-
  include/linux/cpufeature.h        | 12 ++++++-
  include/linux/mod_devicetable.h   | 13 -------
  scripts/mod/devicetable-offsets.c | 57 ++++++++++++++++++++++++++++++-
  scripts/mod/file2alias.c          | 56 +++++++++++++++++++++++++++++-
  5 files changed, 123 insertions(+), 17 deletions(-)

base-commit: 93f51579e7df248780214094418f205253383cc5

#6 lore raw
In reply to Uwe Kleine-König (The Capable Hub)

Hi Uwe,

Quoted 19 lines

this is a next step in the deprecation of <linux/mod_devicetable.h>. scripts/mod/devicetable-offsets.c and scripts/mod/file2alias.c are the only users of that header that use more than a few device-id structs. So their number of lines actually grows when unfolding the needed includes into them. Still it is a reduction in build dependencies.

I suggest to take this via kbuild during the merge window. Would be great to cook in next for a while before.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (3):
Move struct cpu_feature to <linux/cpufeature.h>
devicetable-offsets: Include the needed device-id headers instead of
the catch-all
file2alias: Include the needed device-id headers instead of the
catch-all

Quoted 6 lines
 arch/loongarch/kvm/main.c         |  2 +-
 include/linux/cpufeature.h        | 12 ++++++-
 include/linux/mod_devicetable.h   | 13 -------
 scripts/mod/devicetable-offsets.c | 57 ++++++++++++++++++++++++++++++-
 scripts/mod/file2alias.c          | 56 +++++++++++++++++++++++++++++-
 5 files changed, 123 insertions(+), 17 deletions(-)

My apologies for taking some time to get to this. I was planning on building it using my personal test matrix on a local machine at home while travelling for Plumbers to avoid tying up my main workstation but my home's internet connection has been down for two weeks with very little hope of getting it online before I am back...

Sashiko has a few comments that seem relevant (most of them are the same issue):

https://sashiko.dev/#/patchset/[email protected]

I have applied it on top of next-20261005 to see what conflicts are looking like. I see a merge conflict with this series from

d59717cfbe1e ("firmware: arm_scmi: Add SCMI device table alias support")

in the soc tree, which is fairly trivial. There is a semantic conflict that results in a build error from

fe7f2a805443 ("firmware: smccc: Add an Arm SMCCC bus")

in the arm64 tree, which is also trivial but subtle.

scripts/mod/devicetable-offsets.c:317:2: error: invalid application of 'sizeof' to an incomplete type 'struct arm_smccc_device_id'

    317 |         DEVID(arm_smccc_device_id);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
  scripts/mod/devicetable-offsets.c:62:43: note: expanded from macro 'DEVID'
     62 | #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
        |                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
  include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
      6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
        |                                                                     ^~~
  scripts/mod/devicetable-offsets.c:317:8: note: forward declaration of 'struct arm_smccc_device_id'
    317 |         DEVID(arm_smccc_device_id);
        |               ^
  scripts/mod/devicetable-offsets.c:318:2: error: offsetof of incomplete type 'struct arm_smccc_device_id'
    318 |         DEVID_FIELD(arm_smccc_device_id, func_id);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  scripts/mod/devicetable-offsets.c:64:32: note: expanded from macro 'DEVID_FIELD'
     64 |         DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
        |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
     16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
        |                                 ^
  include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
      6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
        |                                                                     ^~~
  scripts/mod/devicetable-offsets.c:317:8: note: forward declaration of 'struct arm_smccc_device_id'
    317 |         DEVID(arm_smccc_device_id);
        |               ^

2 errors generated.

If you would like this in 7.4-rc1, I am not opposed to sticking your v2 into -next now but I plan to finalize the Kbuild tree for 7.4 around October 15, so we'd only get a week or so of build coverage. If that feels like too little, we should defer this until after 7.4-rc1 is out.

Signature · 2 lines
Cheers,
Nathan
#7 lore raw
Quoted 76 lines · Nathan Chancellor
Quoted 19 lines

this is a next step in the deprecation of <linux/mod_devicetable.h>. scripts/mod/devicetable-offsets.c and scripts/mod/file2alias.c are the only users of that header that use more than a few device-id structs. So their number of lines actually grows when unfolding the needed includes into them. Still it is a reduction in build dependencies.

I suggest to take this via kbuild during the merge window. Would be great to cook in next for a while before.

Best regards
Uwe

Uwe Kleine-König (The Capable Hub) (3):
Move struct cpu_feature to <linux/cpufeature.h>
devicetable-offsets: Include the needed device-id headers instead of
the catch-all
file2alias: Include the needed device-id headers instead of the
catch-all

Quoted 6 lines
 arch/loongarch/kvm/main.c         |  2 +-
 include/linux/cpufeature.h        | 12 ++++++-
 include/linux/mod_devicetable.h   | 13 -------
 scripts/mod/devicetable-offsets.c | 57 ++++++++++++++++++++++++++++++-
 scripts/mod/file2alias.c          | 56 +++++++++++++++++++++++++++++-
 5 files changed, 123 insertions(+), 17 deletions(-)

My apologies for taking some time to get to this. I was planning on building it using my personal test matrix on a local machine at home while travelling for Plumbers to avoid tying up my main workstation but my home's internet connection has been down for two weeks with very little hope of getting it online before I am back...

Sashiko has a few comments that seem relevant (most of them are the same issue):

https://sashiko.dev/#/patchset/[email protected]

I have applied it on top of next-20261005 to see what conflicts are looking like. I see a merge conflict with this series from

d59717cfbe1e ("firmware: arm_scmi: Add SCMI device table alias support")

in the soc tree, which is fairly trivial. There is a semantic conflict that results in a build error from

fe7f2a805443 ("firmware: smccc: Add an Arm SMCCC bus")

in the arm64 tree, which is also trivial but subtle.

scripts/mod/devicetable-offsets.c:317:2: error: invalid application of 'sizeof' to an incomplete type 'struct arm_smccc_device_id'

    317 |         DEVID(arm_smccc_device_id);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
  scripts/mod/devicetable-offsets.c:62:43: note: expanded from macro 'DEVID'
     62 | #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid))
        |                      ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
  include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
      6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
        |                                                                     ^~~
  scripts/mod/devicetable-offsets.c:317:8: note: forward declaration of 'struct arm_smccc_device_id'
    317 |         DEVID(arm_smccc_device_id);
        |               ^
  scripts/mod/devicetable-offsets.c:318:2: error: offsetof of incomplete type 'struct arm_smccc_device_id'
    318 |         DEVID_FIELD(arm_smccc_device_id, func_id);
        |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  scripts/mod/devicetable-offsets.c:64:32: note: expanded from macro 'DEVID_FIELD'
     64 |         DEFINE(OFF_##devid##_##field, offsetof(struct devid, field))
        |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  include/linux/stddef.h:16:32: note: expanded from macro 'offsetof'
     16 | #define offsetof(TYPE, MEMBER)  __builtin_offsetof(TYPE, MEMBER)
        |                                 ^
  include/linux/kbuild.h:6:62: note: expanded from macro 'DEFINE'
      6 |         asm volatile("\n.ascii \"->" #sym " %0 " #val "\"" : : "i" (val))
        |                                                                     ^~~
  scripts/mod/devicetable-offsets.c:317:8: note: forward declaration of 'struct arm_smccc_device_id'
    317 |         DEVID(arm_smccc_device_id);
        |               ^
Quoted 6 lines

2 errors generated.

If you would like this in 7.4-rc1, I am not opposed to sticking your v2 into -next now but I plan to finalize the Kbuild tree for 7.4 around October 15, so we'd only get a week or so of build coverage. If that feels like too little, we should defer this until after 7.4-rc1 is out.

Two more issues came up in my testing.

ARCH=loongarch defconfig:

In file included from include/linux/mmzone.h:20,
from include/linux/gfp.h:7,
from include/linux/xarray.h:16,
from include/linux/list_lru.h:14,
from include/linux/fs/super_types.h:7,
from include/linux/fs/super.h:5,
from include/linux/fs.h:5,
from arch/loongarch/include/asm/elf.h:9,
from arch/loongarch/include/asm/cpufeature.h:13,
from include/linux/cpufeature.h:23,
from scripts/mod/devicetable-offsets.c:3:
include/linux/page-flags-layout.h:6:10: fatal error: generated/bounds.h: No such file or directory
6 | #include <generated/bounds.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[4]: *** [scripts/Makefile.build:185: scripts/mod/devicetable-offsets.s] Error 1

ARCH=s390 defconfig:

drivers/s390/crypto/pkey_ep11.c:23:28: error: array type has incomplete element type 'struct ap_device_id'

     23 | static struct ap_device_id pkey_ep11_card_ids[] = {
        |                            ^~~~~~~~~~~~~~~~~~
  make[7]: *** [scripts/Makefile.build:290: drivers/s390/crypto/pkey_ep11.o] Error 1
  drivers/s390/crypto/pkey_cca.c:22:28: error: array type has incomplete element type 'struct ap_device_id'
     22 | static struct ap_device_id pkey_cca_card_ids[] = {
        |                            ^~~~~~~~~~~~~~~~~

make[7]: *** [scripts/Makefile.build:290: drivers/s390/crypto/pkey_cca.o] Error 1

Signature · 2 lines
Cheers,
Nathan
#8 lore raw
In reply to Nathan Chancellor

Hello Nathan,

Quoted 4 lines · Nathan Chancellor

If you would like this in 7.4-rc1, I am not opposed to sticking your v2 into -next now but I plan to finalize the Kbuild tree for 7.4 around October 15, so we'd only get a week or so of build coverage. If that feels like too little, we should defer this until after 7.4-rc1 is out.

I'll look into your build regressions and then I'm happy to get it into next for 7.5-rc1.

Thanks
Uwe