* [PATCH 0/6] Remove the error-injection.h include from linux/module.h
@ 2026-09-11 15:04 Petr Pavlu
2026-09-11 15:04 ` [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION() Petr Pavlu
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
linux/module.h appears in roughly 15k #include directives across the
kernel. This makes it a "hot" header, so it should avoid pulling in
unnecessary definitions.
The header currently includes linux/error-injection.h to obtain the
definition of `struct error_injection_entry`. However, this is unnecessary
because the type is only referenced in the file as a pointer, for which an
incomplete type is sufficient.
Add explicit includes of linux/error-injection.h to files that use the
ALLOW_ERROR_INJECTION() macro and currently rely on it being provided
indirectly via linux/module.h. Then remove the linux/error-injection.h
include from linux/module.h.
The first five patches can go through their respective trees if preferred.
The final patch depends on the preceding cleanups.
---
Petr Pavlu (6):
block: Include error-injection.h for ALLOW_ERROR_INJECTION()
net: Include error-injection.h for ALLOW_ERROR_INJECTION()
syscalls: Include error-injection.h for ALLOW_ERROR_INJECTION()
drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION()
module: Remove the error-injection.h include from linux/module.h
block/blk-core.c | 1 +
drivers/gpu/drm/i915/display/intel_connector.c | 1 +
drivers/gpu/drm/i915/display/intel_display_driver.c | 1 +
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 1 +
drivers/gpu/drm/i915/gt/uc/intel_uc.c | 1 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 +
drivers/gpu/drm/i915/i915_driver.c | 1 +
drivers/gpu/drm/i915/i915_pci.c | 2 ++
drivers/gpu/drm/i915/intel_uncore.c | 1 +
drivers/gpu/drm/xe/xe_device.c | 2 +-
drivers/gpu/drm/xe/xe_exec_queue.c | 1 +
drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
drivers/gpu/drm/xe/xe_guc.c | 1 +
drivers/gpu/drm/xe/xe_guc_ads.c | 2 +-
drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
drivers/gpu/drm/xe/xe_guc_log.c | 2 +-
drivers/gpu/drm/xe/xe_guc_relay.c | 2 +-
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 1 +
drivers/gpu/drm/xe/xe_hw_engine_group.c | 2 ++
drivers/gpu/drm/xe/xe_mmio.c | 1 +
drivers/gpu/drm/xe/xe_oa.c | 1 +
drivers/gpu/drm/xe/xe_pm.c | 2 +-
drivers/gpu/drm/xe/xe_pt.c | 2 ++
drivers/gpu/drm/xe/xe_pxp.c | 2 ++
drivers/gpu/drm/xe/xe_sriov.c | 2 +-
drivers/gpu/drm/xe/xe_sync.c | 1 +
drivers/gpu/drm/xe/xe_tile.c | 2 +-
drivers/gpu/drm/xe/xe_tuning.c | 2 ++
drivers/gpu/drm/xe/xe_uc_fw.c | 2 +-
drivers/gpu/drm/xe/xe_vm.c | 1 +
drivers/gpu/drm/xe/xe_wa.c | 2 +-
drivers/gpu/drm/xe/xe_wopcm.c | 2 +-
drivers/net/netdevsim/tc.c | 1 +
include/linux/compat.h | 1 +
include/linux/module.h | 1 -
include/linux/syscalls.h | 1 +
kernel/module/main.c | 1 +
net/core/skb_fault_injection.c | 1 +
40 files changed, 45 insertions(+), 13 deletions(-)
---
base-commit: df2908090cda368b01ff43709f51890076c56157
change-id: 20260816-module-include-error_injection-4f80e37a8ea6
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-11 15:10 ` Jens Axboe
2026-09-11 15:04 ` [PATCH 2/6] net: " Petr Pavlu
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
block/blk-core.c uses ALLOW_ERROR_INJECTION(), which is defined in
asm-generic/error-injection.h. It currently relies on this header being
included indirectly through linux/module.h -> linux/error-injection.h.
Add the missing include in preparation for removing the
linux/error-injection.h include from linux/module.h.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
block/blk-core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index 196bccf27f58..324a2d1bb727 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -40,6 +40,7 @@
#include <linux/part_stat.h>
#include <linux/sched/sysctl.h>
#include <linux/blk-crypto.h>
+#include <linux/error-injection.h>
#define CREATE_TRACE_POINTS
#include <trace/events/block.h>
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 2/6] net: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
2026-09-11 15:04 ` [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION() Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-11 15:04 ` [PATCH 3/6] syscalls: " Petr Pavlu
` (3 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
drivers/net/netdevsim/tc.c and net/core/skb_fault_injection.c use
ALLOW_ERROR_INJECTION(), which is defined in asm-generic/error-injection.h.
They currently rely on this header being included indirectly through
linux/module.h -> linux/error-injection.h.
Add the missing include in preparation for removing the
linux/error-injection.h include from linux/module.h.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
drivers/net/netdevsim/tc.c | 1 +
net/core/skb_fault_injection.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/netdevsim/tc.c b/drivers/net/netdevsim/tc.c
index a415e02a6df1..e2d7d3aba193 100644
--- a/drivers/net/netdevsim/tc.c
+++ b/drivers/net/netdevsim/tc.c
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
+#include <linux/error-injection.h>
#include <linux/netdevice.h>
#include <net/pkt_sched.h>
#include <net/pkt_cls.h>
diff --git a/net/core/skb_fault_injection.c b/net/core/skb_fault_injection.c
index 4235db6bdfad..2c7f519bef80 100644
--- a/net/core/skb_fault_injection.c
+++ b/net/core/skb_fault_injection.c
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: GPL-2.0-only
#include <linux/debugfs.h>
+#include <linux/error-injection.h>
#include <linux/fault-inject.h>
#include <linux/netdevice.h>
#include <linux/skbuff.h>
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 3/6] syscalls: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
2026-09-11 15:04 ` [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION() Petr Pavlu
2026-09-11 15:04 ` [PATCH 2/6] net: " Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-11 15:04 ` [PATCH 4/6] drm/i915: " Petr Pavlu
` (2 subsequent siblings)
5 siblings, 0 replies; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
include/linux/compat.h and include/linux/syscalls.h use
ALLOW_ERROR_INJECTION(), which is defined in asm-generic/error-injection.h.
They currently rely on that header being included indirectly through other
files, typically via linux/module.h -> linux/error-injection.h.
Add the missing include in preparation for removing the
linux/error-injection.h include from linux/module.h.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
include/linux/compat.h | 1 +
include/linux/syscalls.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/include/linux/compat.h b/include/linux/compat.h
index 8da0a15c95f4..ad37ca617e65 100644
--- a/include/linux/compat.h
+++ b/include/linux/compat.h
@@ -18,6 +18,7 @@
#include <linux/aio_abi.h> /* for aio_context_t */
#include <linux/uaccess.h>
#include <linux/unistd.h>
+#include <linux/error-injection.h>
#include <asm/compat.h>
#include <asm/siginfo.h>
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h
index 8413b624ad47..552d9710a0d5 100644
--- a/include/linux/syscalls.h
+++ b/include/linux/syscalls.h
@@ -92,6 +92,7 @@ struct file_attr;
#include <linux/quota.h>
#include <linux/key.h>
#include <linux/personality.h>
+#include <linux/error-injection.h>
#include <trace/syscall.h>
#ifdef CONFIG_ARCH_HAS_SYSCALL_WRAPPER
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 4/6] drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
` (2 preceding siblings ...)
2026-09-11 15:04 ` [PATCH 3/6] syscalls: " Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-14 7:51 ` Francois Dugast
2026-09-14 12:03 ` Jani Nikula
2026-09-11 15:04 ` [PATCH 5/6] drm/xe: " Petr Pavlu
2026-09-11 15:04 ` [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h Petr Pavlu
5 siblings, 2 replies; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
Several drivers/gpu/drm/i915/*.c files use ALLOW_ERROR_INJECTION(), which
is defined in asm-generic/error-injection.h. They currently rely on this
header being included indirectly through linux/module.h ->
linux/error-injection.h.
Add the missing includes in preparation for removing the
linux/error-injection.h include from linux/module.h.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
drivers/gpu/drm/i915/display/intel_connector.c | 1 +
drivers/gpu/drm/i915/display/intel_display_driver.c | 1 +
drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++
drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 1 +
drivers/gpu/drm/i915/gt/uc/intel_uc.c | 1 +
drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 +
drivers/gpu/drm/i915/i915_driver.c | 1 +
drivers/gpu/drm/i915/i915_pci.c | 2 ++
drivers/gpu/drm/i915/intel_uncore.c | 1 +
10 files changed, 12 insertions(+)
diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c
index 7ef9338d67ab..a287884c0045 100644
--- a/drivers/gpu/drm/i915/display/intel_connector.c
+++ b/drivers/gpu/drm/i915/display/intel_connector.c
@@ -23,6 +23,7 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include <linux/error-injection.h>
#include <linux/i2c.h>
#include <linux/slab.h>
diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
index 70d112fd4287..204810a11e46 100644
--- a/drivers/gpu/drm/i915/display/intel_display_driver.c
+++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
@@ -7,6 +7,7 @@
* details here.
*/
+#include <linux/error-injection.h>
#include <linux/vga_switcheroo.h>
#include <acpi/video.h>
#include <drm/display/drm_dp_mst_helper.h>
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index c0fd349a4600..2c3bc7b67c0d 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -3,6 +3,7 @@
* Copyright © 2016 Intel Corporation
*/
+#include <linux/error-injection.h>
#include <linux/string_helpers.h>
#include <drm/drm_print.h>
diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
index 5c7f862f7100..2f0e1cb5578c 100644
--- a/drivers/gpu/drm/i915/gt/intel_gt.c
+++ b/drivers/gpu/drm/i915/gt/intel_gt.c
@@ -3,6 +3,8 @@
* Copyright © 2019 Intel Corporation
*/
+#include <linux/error-injection.h>
+
#include <drm/drm_managed.h>
#include <drm/intel/intel-gtt.h>
#include <drm/intel/intel_gmd_interrupt_regs.h>
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
index 1c455d84bf9d..091aa33f624a 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
@@ -4,6 +4,7 @@
*/
#include <linux/circ_buf.h>
+#include <linux/error-injection.h>
#include <linux/ktime.h>
#include <linux/string_helpers.h>
#include <linux/time64.h>
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
index bd07c72a66fc..d367a897c86b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
@@ -3,6 +3,7 @@
* Copyright © 2016-2019 Intel Corporation
*/
+#include <linux/error-injection.h>
#include <linux/string_helpers.h>
#include "gt/intel_gt.h"
diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
index 7fac97fe30a6..d7c731fe972b 100644
--- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
+++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
@@ -4,6 +4,7 @@
*/
#include <linux/bitfield.h>
+#include <linux/error-injection.h>
#include <linux/firmware.h>
#include <linux/highmem.h>
diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
index ce6d20958320..aeb7b24c81c8 100644
--- a/drivers/gpu/drm/i915/i915_driver.c
+++ b/drivers/gpu/drm/i915/i915_driver.c
@@ -30,6 +30,7 @@
#include <linux/aperture.h>
#include <linux/acpi.h>
#include <linux/device.h>
+#include <linux/error-injection.h>
#include <linux/module.h>
#include <linux/oom.h>
#include <linux/pci.h>
diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
index 2f03f95945f1..84a7dc6ab5db 100644
--- a/drivers/gpu/drm/i915/i915_pci.c
+++ b/drivers/gpu/drm/i915/i915_pci.c
@@ -22,6 +22,8 @@
*
*/
+#include <linux/error-injection.h>
+
#include <drm/drm_color_mgmt.h>
#include <drm/drm_drv.h>
#include <drm/intel/pci_config.h>
diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
index 170e83a8c9fc..e360e4f9d9a2 100644
--- a/drivers/gpu/drm/i915/intel_uncore.c
+++ b/drivers/gpu/drm/i915/intel_uncore.c
@@ -21,6 +21,7 @@
* IN THE SOFTWARE.
*/
+#include <linux/error-injection.h>
#include <linux/pm_runtime.h>
#include <drm/drm_managed.h>
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 5/6] drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
` (3 preceding siblings ...)
2026-09-11 15:04 ` [PATCH 4/6] drm/i915: " Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-14 7:41 ` Francois Dugast
2026-09-11 15:04 ` [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h Petr Pavlu
5 siblings, 1 reply; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
Several drivers/gpu/drm/xe/*.c files use ALLOW_ERROR_INJECTION(), which is
defined in asm-generic/error-injection.h. They currently rely on this
header being included indirectly through linux/module.h ->
linux/error-injection.h.
Add the missing includes in preparation for removing the
linux/error-injection.h include from linux/module.h.
Remove also the linux/fault-injection.h include, which commit 91b2c42c214f
("drm/xe: Use fault injection infrastructure to find issues at probe time")
mistakenly used to provide the definition of ALLOW_ERROR_INJECTION().
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
drivers/gpu/drm/xe/xe_device.c | 2 +-
drivers/gpu/drm/xe/xe_exec_queue.c | 1 +
drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
drivers/gpu/drm/xe/xe_guc.c | 1 +
drivers/gpu/drm/xe/xe_guc_ads.c | 2 +-
drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
drivers/gpu/drm/xe/xe_guc_log.c | 2 +-
drivers/gpu/drm/xe/xe_guc_relay.c | 2 +-
drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 1 +
drivers/gpu/drm/xe/xe_hw_engine_group.c | 2 ++
drivers/gpu/drm/xe/xe_mmio.c | 1 +
drivers/gpu/drm/xe/xe_oa.c | 1 +
drivers/gpu/drm/xe/xe_pm.c | 2 +-
drivers/gpu/drm/xe/xe_pt.c | 2 ++
drivers/gpu/drm/xe/xe_pxp.c | 2 ++
drivers/gpu/drm/xe/xe_sriov.c | 2 +-
drivers/gpu/drm/xe/xe_sync.c | 1 +
drivers/gpu/drm/xe/xe_tile.c | 2 +-
drivers/gpu/drm/xe/xe_tuning.c | 2 ++
drivers/gpu/drm/xe/xe_uc_fw.c | 2 +-
drivers/gpu/drm/xe/xe_vm.c | 1 +
drivers/gpu/drm/xe/xe_wa.c | 2 +-
drivers/gpu/drm/xe/xe_wopcm.c | 2 +-
23 files changed, 27 insertions(+), 12 deletions(-)
diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
index ee732e5495f7..fcef8d5fc7ca 100644
--- a/drivers/gpu/drm/xe/xe_device.c
+++ b/drivers/gpu/drm/xe/xe_device.c
@@ -7,7 +7,7 @@
#include <linux/aperture.h>
#include <linux/delay.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <linux/units.h>
#include <drm/drm_client.h>
diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
index cd053de3c6b5..3e46c14584c4 100644
--- a/drivers/gpu/drm/xe/xe_exec_queue.c
+++ b/drivers/gpu/drm/xe/xe_exec_queue.c
@@ -5,6 +5,7 @@
#include "xe_exec_queue.h"
+#include <linux/error-injection.h>
#include <linux/nospec.h>
#include <drm/drm_device.h>
diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
index 8ec23862477f..e05582ad098a 100644
--- a/drivers/gpu/drm/xe/xe_ggtt.c
+++ b/drivers/gpu/drm/xe/xe_ggtt.c
@@ -6,7 +6,7 @@
#include "xe_ggtt.h"
#include <kunit/visibility.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/sizes.h>
diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
index 4286bd05c686..34e21a70d5ad 100644
--- a/drivers/gpu/drm/xe/xe_guc.c
+++ b/drivers/gpu/drm/xe/xe_guc.c
@@ -5,6 +5,7 @@
#include "xe_guc.h"
+#include <linux/error-injection.h>
#include <linux/iopoll.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
index ff8eee3831aa..41a2b8c807d6 100644
--- a/drivers/gpu/drm/xe/xe_guc_ads.c
+++ b/drivers/gpu/drm/xe/xe_guc_ads.c
@@ -5,7 +5,7 @@
#include "xe_guc_ads.h"
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
index fe70c0fd85c5..ac6cbbaa6cc0 100644
--- a/drivers/gpu/drm/xe/xe_guc_ct.c
+++ b/drivers/gpu/drm/xe/xe_guc_ct.c
@@ -8,7 +8,7 @@
#include <linux/bitfield.h>
#include <linux/circ_buf.h>
#include <linux/delay.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <kunit/static_stub.h>
diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
index 538d4df0f7aa..6f0739204d9e 100644
--- a/drivers/gpu/drm/xe/xe_guc_log.c
+++ b/drivers/gpu/drm/xe/xe_guc_log.c
@@ -5,7 +5,7 @@
#include "xe_guc_log.h"
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <linux/utsname.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
index eed0a750d2eb..e528d95ba7fe 100644
--- a/drivers/gpu/drm/xe/xe_guc_relay.c
+++ b/drivers/gpu/drm/xe/xe_guc_relay.c
@@ -5,7 +5,7 @@
#include <linux/bitfield.h>
#include <linux/delay.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
index d42e263e0611..ac81f382e7dc 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
@@ -4,6 +4,7 @@
*/
#include <drm/drm_managed.h>
+#include <linux/error-injection.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>
diff --git a/drivers/gpu/drm/xe/xe_hw_engine_group.c b/drivers/gpu/drm/xe/xe_hw_engine_group.c
index 0804b426b6f9..418ff427ae30 100644
--- a/drivers/gpu/drm/xe/xe_hw_engine_group.c
+++ b/drivers/gpu/drm/xe/xe_hw_engine_group.c
@@ -3,6 +3,8 @@
* Copyright © 2024 Intel Corporation
*/
+#include <linux/error-injection.h>
+
#include <drm/drm_managed.h>
#include "xe_assert.h"
diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
index 7fa18dfcb5a2..d8f8a2453bb6 100644
--- a/drivers/gpu/drm/xe/xe_mmio.c
+++ b/drivers/gpu/drm/xe/xe_mmio.c
@@ -6,6 +6,7 @@
#include "xe_mmio.h"
#include <linux/delay.h>
+#include <linux/error-injection.h>
#include <linux/io-64-nonatomic-lo-hi.h>
#include <linux/minmax.h>
#include <linux/pci.h>
diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
index ab09dcff5860..b15c96e35fab 100644
--- a/drivers/gpu/drm/xe/xe_oa.c
+++ b/drivers/gpu/drm/xe/xe_oa.c
@@ -5,6 +5,7 @@
#include <linux/anon_inodes.h>
#include <linux/delay.h>
+#include <linux/error-injection.h>
#include <linux/nospec.h>
#include <linux/poll.h>
diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
index a5289a9df8d2..c0489a8d8a62 100644
--- a/drivers/gpu/drm/xe/xe_pm.c
+++ b/drivers/gpu/drm/xe/xe_pm.c
@@ -5,7 +5,7 @@
#include "xe_pm.h"
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include <linux/dmi.h>
diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
index a07316a45d79..6c6d9be2717e 100644
--- a/drivers/gpu/drm/xe/xe_pt.c
+++ b/drivers/gpu/drm/xe/xe_pt.c
@@ -5,6 +5,8 @@
#include "xe_pt.h"
+#include <linux/error-injection.h>
+
#include "regs/xe_gtt_defs.h"
#include "xe_bo.h"
#include "xe_device.h"
diff --git a/drivers/gpu/drm/xe/xe_pxp.c b/drivers/gpu/drm/xe/xe_pxp.c
index 2fef274a585e..2f3632ac201a 100644
--- a/drivers/gpu/drm/xe/xe_pxp.c
+++ b/drivers/gpu/drm/xe/xe_pxp.c
@@ -5,6 +5,8 @@
#include "xe_pxp.h"
+#include <linux/error-injection.h>
+
#include <drm/drm_managed.h>
#include <uapi/drm/xe_drm.h>
diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
index f3835867fce5..ec254b950daf 100644
--- a/drivers/gpu/drm/xe/xe_sriov.c
+++ b/drivers/gpu/drm/xe/xe_sriov.c
@@ -3,7 +3,7 @@
* Copyright © 2023 Intel Corporation
*/
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
index 37866768d64c..711de22f4986 100644
--- a/drivers/gpu/drm/xe/xe_sync.c
+++ b/drivers/gpu/drm/xe/xe_sync.c
@@ -6,6 +6,7 @@
#include "xe_sync.h"
#include <linux/dma-fence-array.h>
+#include <linux/error-injection.h>
#include <linux/kthread.h>
#include <linux/sched/mm.h>
#include <linux/uaccess.h>
diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
index 74d925a337b7..810dfd98d830 100644
--- a/drivers/gpu/drm/xe/xe_tile.c
+++ b/drivers/gpu/drm/xe/xe_tile.c
@@ -3,7 +3,7 @@
* Copyright © 2023 Intel Corporation
*/
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <drm/drm_managed.h>
#include <drm/drm_pagemap_util.h>
diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c
index bcec40ca2d35..d3d38b4380be 100644
--- a/drivers/gpu/drm/xe/xe_tuning.c
+++ b/drivers/gpu/drm/xe/xe_tuning.c
@@ -5,6 +5,8 @@
#include "xe_tuning.h"
+#include <linux/error-injection.h>
+
#include <kunit/visibility.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
index a8e6f18cc9b4..f17925ad53f5 100644
--- a/drivers/gpu/drm/xe/xe_uc_fw.c
+++ b/drivers/gpu/drm/xe/xe_uc_fw.c
@@ -4,7 +4,7 @@
*/
#include <linux/bitfield.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <linux/firmware.h>
#include <drm/drm_managed.h>
diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
index 23952ad8951e..f000564f1e59 100644
--- a/drivers/gpu/drm/xe/xe_vm.c
+++ b/drivers/gpu/drm/xe/xe_vm.c
@@ -6,6 +6,7 @@
#include "xe_vm.h"
#include <linux/dma-fence-array.h>
+#include <linux/error-injection.h>
#include <linux/nospec.h>
#include <drm/drm_drv.h>
diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
index 139434946f8f..98d2fdd3ba6f 100644
--- a/drivers/gpu/drm/xe/xe_wa.c
+++ b/drivers/gpu/drm/xe/xe_wa.c
@@ -8,7 +8,7 @@
#include <drm/drm_managed.h>
#include <kunit/visibility.h>
#include <linux/compiler_types.h>
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include <generated/xe_device_wa_oob.h>
#include <generated/xe_wa_oob.h>
diff --git a/drivers/gpu/drm/xe/xe_wopcm.c b/drivers/gpu/drm/xe/xe_wopcm.c
index fe65ed246775..7da1e3ebc839 100644
--- a/drivers/gpu/drm/xe/xe_wopcm.c
+++ b/drivers/gpu/drm/xe/xe_wopcm.c
@@ -5,7 +5,7 @@
#include "xe_wopcm.h"
-#include <linux/fault-inject.h>
+#include <linux/error-injection.h>
#include "regs/xe_guc_regs.h"
#include "xe_device.h"
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
` (4 preceding siblings ...)
2026-09-11 15:04 ` [PATCH 5/6] drm/xe: " Petr Pavlu
@ 2026-09-11 15:04 ` Petr Pavlu
2026-09-11 17:31 ` Aaron Tomlin
5 siblings, 1 reply; 12+ messages in thread
From: Petr Pavlu @ 2026-09-11 15:04 UTC (permalink / raw)
To: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
linux/module.h appears in roughly 15k #include directives across the
kernel. This makes it a "hot" header, so it should avoid pulling in
unnecessary definitions.
The header currently includes linux/error-injection.h to obtain the
definition of `struct error_injection_entry`. However, this is unnecessary
because the type is only referenced in the file as a pointer, for which an
incomplete type is sufficient.
Remove the linux/error-injection.h include from linux/module.h and add it
to kernel/module/main.c instead, where
`sizeof(struct error_injection_entry)` is actually needed.
Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
---
include/linux/module.h | 1 -
kernel/module/main.c | 1 +
2 files changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/module.h b/include/linux/module.h
index 96cc98568eea..b3a3d5827384 100644
--- a/include/linux/module.h
+++ b/include/linux/module.h
@@ -24,7 +24,6 @@
#include <linux/jump_label.h>
#include <linux/export.h>
#include <linux/rbtree_latch.h>
-#include <linux/error-injection.h>
#include <linux/tracepoint-defs.h>
#include <linux/srcu.h>
#include <linux/static_call_types.h>
diff --git a/kernel/module/main.c b/kernel/module/main.c
index d0e1e0bd2ad0..f1392c10907a 100644
--- a/kernel/module/main.c
+++ b/kernel/module/main.c
@@ -60,6 +60,7 @@
#include <linux/codetag.h>
#include <linux/debugfs.h>
#include <linux/execmem.h>
+#include <linux/error-injection.h>
#include <uapi/linux/module.h>
#include "internal.h"
--
2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 ` [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION() Petr Pavlu
@ 2026-09-11 15:10 ` Jens Axboe
0 siblings, 0 replies; 12+ messages in thread
From: Jens Axboe @ 2026-09-11 15:10 UTC (permalink / raw)
To: Petr Pavlu, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Daniel Gomez, Sami Tolvanen, Aaron Tomlin,
linux-block, netdev, linux-api, intel-gfx, intel-xe, dri-devel,
linux-modules, linux-kernel
On 9/11/26 9:04 AM, Petr Pavlu wrote:
> block/blk-core.c uses ALLOW_ERROR_INJECTION(), which is defined in
> asm-generic/error-injection.h. It currently relies on this header being
> included indirectly through linux/module.h -> linux/error-injection.h.
>
> Add the missing include in preparation for removing the
> linux/error-injection.h include from linux/module.h.
Reviewed-by: Jens Axboe <axboe@kernel.dk>
if you want to shove this upstream somewhere else.
--
Jens Axboe
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h
2026-09-11 15:04 ` [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h Petr Pavlu
@ 2026-09-11 17:31 ` Aaron Tomlin
0 siblings, 0 replies; 12+ messages in thread
From: Aaron Tomlin @ 2026-09-11 17:31 UTC (permalink / raw)
To: Petr Pavlu
Cc: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström, Simon Horman, David Airlie, Simona Vetter,
Francois Dugast, Luis Chamberlain, Daniel Gomez, Sami Tolvanen,
linux-block, netdev, linux-api, intel-gfx, intel-xe, dri-devel,
linux-modules, linux-kernel
On Fri, Sep 11, 2026 at 05:04:06PM +0200, Petr Pavlu wrote:
> linux/module.h appears in roughly 15k #include directives across the
> kernel. This makes it a "hot" header, so it should avoid pulling in
> unnecessary definitions.
>
> The header currently includes linux/error-injection.h to obtain the
> definition of `struct error_injection_entry`. However, this is unnecessary
> because the type is only referenced in the file as a pointer, for which an
> incomplete type is sufficient.
>
> Remove the linux/error-injection.h include from linux/module.h and add it
> to kernel/module/main.c instead, where
> `sizeof(struct error_injection_entry)` is actually needed.
>
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
> ---
> include/linux/module.h | 1 -
> kernel/module/main.c | 1 +
> 2 files changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/module.h b/include/linux/module.h
> index 96cc98568eea..b3a3d5827384 100644
> --- a/include/linux/module.h
> +++ b/include/linux/module.h
> @@ -24,7 +24,6 @@
> #include <linux/jump_label.h>
> #include <linux/export.h>
> #include <linux/rbtree_latch.h>
> -#include <linux/error-injection.h>
> #include <linux/tracepoint-defs.h>
> #include <linux/srcu.h>
> #include <linux/static_call_types.h>
> diff --git a/kernel/module/main.c b/kernel/module/main.c
> index d0e1e0bd2ad0..f1392c10907a 100644
> --- a/kernel/module/main.c
> +++ b/kernel/module/main.c
> @@ -60,6 +60,7 @@
> #include <linux/codetag.h>
> #include <linux/debugfs.h>
> #include <linux/execmem.h>
> +#include <linux/error-injection.h>
> #include <uapi/linux/module.h>
> #include "internal.h"
>
>
> --
> 2.55.0
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
--
Aaron Tomlin
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 5/6] drm/xe: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 ` [PATCH 5/6] drm/xe: " Petr Pavlu
@ 2026-09-14 7:41 ` Francois Dugast
0 siblings, 0 replies; 12+ messages in thread
From: Francois Dugast @ 2026-09-14 7:41 UTC (permalink / raw)
To: Petr Pavlu
Cc: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström, Simon Horman, David Airlie, Simona Vetter,
Luis Chamberlain, Daniel Gomez, Sami Tolvanen, Aaron Tomlin,
linux-block, netdev, linux-api, intel-gfx, intel-xe, dri-devel,
linux-modules, linux-kernel
On Fri, Sep 11, 2026 at 05:04:05PM +0200, Petr Pavlu wrote:
> Several drivers/gpu/drm/xe/*.c files use ALLOW_ERROR_INJECTION(), which is
> defined in asm-generic/error-injection.h. They currently rely on this
> header being included indirectly through linux/module.h ->
> linux/error-injection.h.
>
> Add the missing includes in preparation for removing the
> linux/error-injection.h include from linux/module.h.
>
> Remove also the linux/fault-injection.h include, which commit 91b2c42c214f
> ("drm/xe: Use fault injection infrastructure to find issues at probe time")
> mistakenly used to provide the definition of ALLOW_ERROR_INJECTION().
>
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
> ---
> drivers/gpu/drm/xe/xe_device.c | 2 +-
> drivers/gpu/drm/xe/xe_exec_queue.c | 1 +
> drivers/gpu/drm/xe/xe_ggtt.c | 2 +-
> drivers/gpu/drm/xe/xe_guc.c | 1 +
> drivers/gpu/drm/xe/xe_guc_ads.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_ct.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_log.c | 2 +-
> drivers/gpu/drm/xe/xe_guc_relay.c | 2 +-
> drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c | 1 +
> drivers/gpu/drm/xe/xe_hw_engine_group.c | 2 ++
> drivers/gpu/drm/xe/xe_mmio.c | 1 +
> drivers/gpu/drm/xe/xe_oa.c | 1 +
> drivers/gpu/drm/xe/xe_pm.c | 2 +-
> drivers/gpu/drm/xe/xe_pt.c | 2 ++
> drivers/gpu/drm/xe/xe_pxp.c | 2 ++
> drivers/gpu/drm/xe/xe_sriov.c | 2 +-
> drivers/gpu/drm/xe/xe_sync.c | 1 +
> drivers/gpu/drm/xe/xe_tile.c | 2 +-
> drivers/gpu/drm/xe/xe_tuning.c | 2 ++
> drivers/gpu/drm/xe/xe_uc_fw.c | 2 +-
> drivers/gpu/drm/xe/xe_vm.c | 1 +
> drivers/gpu/drm/xe/xe_wa.c | 2 +-
> drivers/gpu/drm/xe/xe_wopcm.c | 2 +-
> 23 files changed, 27 insertions(+), 12 deletions(-)
>
> diff --git a/drivers/gpu/drm/xe/xe_device.c b/drivers/gpu/drm/xe/xe_device.c
> index ee732e5495f7..fcef8d5fc7ca 100644
> --- a/drivers/gpu/drm/xe/xe_device.c
> +++ b/drivers/gpu/drm/xe/xe_device.c
> @@ -7,7 +7,7 @@
>
> #include <linux/aperture.h>
> #include <linux/delay.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
> #include <linux/units.h>
>
> #include <drm/drm_client.h>
> diff --git a/drivers/gpu/drm/xe/xe_exec_queue.c b/drivers/gpu/drm/xe/xe_exec_queue.c
> index cd053de3c6b5..3e46c14584c4 100644
> --- a/drivers/gpu/drm/xe/xe_exec_queue.c
> +++ b/drivers/gpu/drm/xe/xe_exec_queue.c
> @@ -5,6 +5,7 @@
>
> #include "xe_exec_queue.h"
>
> +#include <linux/error-injection.h>
> #include <linux/nospec.h>
>
> #include <drm/drm_device.h>
> diff --git a/drivers/gpu/drm/xe/xe_ggtt.c b/drivers/gpu/drm/xe/xe_ggtt.c
> index 8ec23862477f..e05582ad098a 100644
> --- a/drivers/gpu/drm/xe/xe_ggtt.c
> +++ b/drivers/gpu/drm/xe/xe_ggtt.c
> @@ -6,7 +6,7 @@
> #include "xe_ggtt.h"
>
> #include <kunit/visibility.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
> #include <linux/io-64-nonatomic-lo-hi.h>
> #include <linux/sizes.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
> index 4286bd05c686..34e21a70d5ad 100644
> --- a/drivers/gpu/drm/xe/xe_guc.c
> +++ b/drivers/gpu/drm/xe/xe_guc.c
> @@ -5,6 +5,7 @@
>
> #include "xe_guc.h"
>
> +#include <linux/error-injection.h>
> #include <linux/iopoll.h>
> #include <drm/drm_managed.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ads.c b/drivers/gpu/drm/xe/xe_guc_ads.c
> index ff8eee3831aa..41a2b8c807d6 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ads.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ads.c
> @@ -5,7 +5,7 @@
>
> #include "xe_guc_ads.h"
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <drm/drm_managed.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_ct.c b/drivers/gpu/drm/xe/xe_guc_ct.c
> index fe70c0fd85c5..ac6cbbaa6cc0 100644
> --- a/drivers/gpu/drm/xe/xe_guc_ct.c
> +++ b/drivers/gpu/drm/xe/xe_guc_ct.c
> @@ -8,7 +8,7 @@
> #include <linux/bitfield.h>
> #include <linux/circ_buf.h>
> #include <linux/delay.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <kunit/static_stub.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_guc_log.c b/drivers/gpu/drm/xe/xe_guc_log.c
> index 538d4df0f7aa..6f0739204d9e 100644
> --- a/drivers/gpu/drm/xe/xe_guc_log.c
> +++ b/drivers/gpu/drm/xe/xe_guc_log.c
> @@ -5,7 +5,7 @@
>
> #include "xe_guc_log.h"
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <linux/utsname.h>
> #include <drm/drm_managed.h>
> diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
> index eed0a750d2eb..e528d95ba7fe 100644
> --- a/drivers/gpu/drm/xe/xe_guc_relay.c
> +++ b/drivers/gpu/drm/xe/xe_guc_relay.c
> @@ -5,7 +5,7 @@
>
> #include <linux/bitfield.h>
> #include <linux/delay.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <drm/drm_managed.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> index d42e263e0611..ac81f382e7dc 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_class_sysfs.c
> @@ -4,6 +4,7 @@
> */
>
> #include <drm/drm_managed.h>
> +#include <linux/error-injection.h>
> #include <linux/kobject.h>
> #include <linux/sysfs.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_hw_engine_group.c b/drivers/gpu/drm/xe/xe_hw_engine_group.c
> index 0804b426b6f9..418ff427ae30 100644
> --- a/drivers/gpu/drm/xe/xe_hw_engine_group.c
> +++ b/drivers/gpu/drm/xe/xe_hw_engine_group.c
> @@ -3,6 +3,8 @@
> * Copyright © 2024 Intel Corporation
> */
>
> +#include <linux/error-injection.h>
> +
> #include <drm/drm_managed.h>
>
> #include "xe_assert.h"
> diff --git a/drivers/gpu/drm/xe/xe_mmio.c b/drivers/gpu/drm/xe/xe_mmio.c
> index 7fa18dfcb5a2..d8f8a2453bb6 100644
> --- a/drivers/gpu/drm/xe/xe_mmio.c
> +++ b/drivers/gpu/drm/xe/xe_mmio.c
> @@ -6,6 +6,7 @@
> #include "xe_mmio.h"
>
> #include <linux/delay.h>
> +#include <linux/error-injection.h>
> #include <linux/io-64-nonatomic-lo-hi.h>
> #include <linux/minmax.h>
> #include <linux/pci.h>
> diff --git a/drivers/gpu/drm/xe/xe_oa.c b/drivers/gpu/drm/xe/xe_oa.c
> index ab09dcff5860..b15c96e35fab 100644
> --- a/drivers/gpu/drm/xe/xe_oa.c
> +++ b/drivers/gpu/drm/xe/xe_oa.c
> @@ -5,6 +5,7 @@
>
> #include <linux/anon_inodes.h>
> #include <linux/delay.h>
> +#include <linux/error-injection.h>
> #include <linux/nospec.h>
> #include <linux/poll.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_pm.c b/drivers/gpu/drm/xe/xe_pm.c
> index a5289a9df8d2..c0489a8d8a62 100644
> --- a/drivers/gpu/drm/xe/xe_pm.c
> +++ b/drivers/gpu/drm/xe/xe_pm.c
> @@ -5,7 +5,7 @@
>
> #include "xe_pm.h"
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
> #include <linux/pm_runtime.h>
> #include <linux/suspend.h>
> #include <linux/dmi.h>
> diff --git a/drivers/gpu/drm/xe/xe_pt.c b/drivers/gpu/drm/xe/xe_pt.c
> index a07316a45d79..6c6d9be2717e 100644
> --- a/drivers/gpu/drm/xe/xe_pt.c
> +++ b/drivers/gpu/drm/xe/xe_pt.c
> @@ -5,6 +5,8 @@
>
> #include "xe_pt.h"
>
> +#include <linux/error-injection.h>
> +
> #include "regs/xe_gtt_defs.h"
> #include "xe_bo.h"
> #include "xe_device.h"
> diff --git a/drivers/gpu/drm/xe/xe_pxp.c b/drivers/gpu/drm/xe/xe_pxp.c
> index 2fef274a585e..2f3632ac201a 100644
> --- a/drivers/gpu/drm/xe/xe_pxp.c
> +++ b/drivers/gpu/drm/xe/xe_pxp.c
> @@ -5,6 +5,8 @@
>
> #include "xe_pxp.h"
>
> +#include <linux/error-injection.h>
> +
> #include <drm/drm_managed.h>
> #include <uapi/drm/xe_drm.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_sriov.c b/drivers/gpu/drm/xe/xe_sriov.c
> index f3835867fce5..ec254b950daf 100644
> --- a/drivers/gpu/drm/xe/xe_sriov.c
> +++ b/drivers/gpu/drm/xe/xe_sriov.c
> @@ -3,7 +3,7 @@
> * Copyright © 2023 Intel Corporation
> */
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <drm/drm_managed.h>
>
> diff --git a/drivers/gpu/drm/xe/xe_sync.c b/drivers/gpu/drm/xe/xe_sync.c
> index 37866768d64c..711de22f4986 100644
> --- a/drivers/gpu/drm/xe/xe_sync.c
> +++ b/drivers/gpu/drm/xe/xe_sync.c
> @@ -6,6 +6,7 @@
> #include "xe_sync.h"
>
> #include <linux/dma-fence-array.h>
> +#include <linux/error-injection.h>
> #include <linux/kthread.h>
> #include <linux/sched/mm.h>
> #include <linux/uaccess.h>
> diff --git a/drivers/gpu/drm/xe/xe_tile.c b/drivers/gpu/drm/xe/xe_tile.c
> index 74d925a337b7..810dfd98d830 100644
> --- a/drivers/gpu/drm/xe/xe_tile.c
> +++ b/drivers/gpu/drm/xe/xe_tile.c
> @@ -3,7 +3,7 @@
> * Copyright © 2023 Intel Corporation
> */
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <drm/drm_managed.h>
> #include <drm/drm_pagemap_util.h>
> diff --git a/drivers/gpu/drm/xe/xe_tuning.c b/drivers/gpu/drm/xe/xe_tuning.c
> index bcec40ca2d35..d3d38b4380be 100644
> --- a/drivers/gpu/drm/xe/xe_tuning.c
> +++ b/drivers/gpu/drm/xe/xe_tuning.c
> @@ -5,6 +5,8 @@
>
> #include "xe_tuning.h"
>
> +#include <linux/error-injection.h>
> +
> #include <kunit/visibility.h>
>
> #include <drm/drm_managed.h>
> diff --git a/drivers/gpu/drm/xe/xe_uc_fw.c b/drivers/gpu/drm/xe/xe_uc_fw.c
> index a8e6f18cc9b4..f17925ad53f5 100644
> --- a/drivers/gpu/drm/xe/xe_uc_fw.c
> +++ b/drivers/gpu/drm/xe/xe_uc_fw.c
> @@ -4,7 +4,7 @@
> */
>
> #include <linux/bitfield.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
> #include <linux/firmware.h>
>
> #include <drm/drm_managed.h>
> diff --git a/drivers/gpu/drm/xe/xe_vm.c b/drivers/gpu/drm/xe/xe_vm.c
> index 23952ad8951e..f000564f1e59 100644
> --- a/drivers/gpu/drm/xe/xe_vm.c
> +++ b/drivers/gpu/drm/xe/xe_vm.c
> @@ -6,6 +6,7 @@
> #include "xe_vm.h"
>
> #include <linux/dma-fence-array.h>
> +#include <linux/error-injection.h>
> #include <linux/nospec.h>
>
> #include <drm/drm_drv.h>
> diff --git a/drivers/gpu/drm/xe/xe_wa.c b/drivers/gpu/drm/xe/xe_wa.c
> index 139434946f8f..98d2fdd3ba6f 100644
> --- a/drivers/gpu/drm/xe/xe_wa.c
> +++ b/drivers/gpu/drm/xe/xe_wa.c
> @@ -8,7 +8,7 @@
> #include <drm/drm_managed.h>
> #include <kunit/visibility.h>
> #include <linux/compiler_types.h>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include <generated/xe_device_wa_oob.h>
> #include <generated/xe_wa_oob.h>
> diff --git a/drivers/gpu/drm/xe/xe_wopcm.c b/drivers/gpu/drm/xe/xe_wopcm.c
> index fe65ed246775..7da1e3ebc839 100644
> --- a/drivers/gpu/drm/xe/xe_wopcm.c
> +++ b/drivers/gpu/drm/xe/xe_wopcm.c
> @@ -5,7 +5,7 @@
>
> #include "xe_wopcm.h"
>
> -#include <linux/fault-inject.h>
> +#include <linux/error-injection.h>
>
> #include "regs/xe_guc_regs.h"
> #include "xe_device.h"
>
> --
> 2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/6] drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 ` [PATCH 4/6] drm/i915: " Petr Pavlu
@ 2026-09-14 7:51 ` Francois Dugast
2026-09-14 12:03 ` Jani Nikula
1 sibling, 0 replies; 12+ messages in thread
From: Francois Dugast @ 2026-09-14 7:51 UTC (permalink / raw)
To: Petr Pavlu
Cc: Jens Axboe, Jakub Kicinski, Andrew Lunn, David S. Miller,
Eric Dumazet, Paolo Abeni, Jani Nikula, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström, Simon Horman, David Airlie, Simona Vetter,
Luis Chamberlain, Daniel Gomez, Sami Tolvanen, Aaron Tomlin,
linux-block, netdev, linux-api, intel-gfx, intel-xe, dri-devel,
linux-modules, linux-kernel
On Fri, Sep 11, 2026 at 05:04:04PM +0200, Petr Pavlu wrote:
> Several drivers/gpu/drm/i915/*.c files use ALLOW_ERROR_INJECTION(), which
> is defined in asm-generic/error-injection.h. They currently rely on this
> header being included indirectly through linux/module.h ->
> linux/error-injection.h.
>
> Add the missing includes in preparation for removing the
> linux/error-injection.h include from linux/module.h.
>
> Signed-off-by: Petr Pavlu <petr.pavlu@suse.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_connector.c | 1 +
> drivers/gpu/drm/i915/display/intel_display_driver.c | 1 +
> drivers/gpu/drm/i915/gt/intel_engine_cs.c | 1 +
> drivers/gpu/drm/i915/gt/intel_gt.c | 2 ++
> drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c | 1 +
> drivers/gpu/drm/i915/gt/uc/intel_uc.c | 1 +
> drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c | 1 +
> drivers/gpu/drm/i915/i915_driver.c | 1 +
> drivers/gpu/drm/i915/i915_pci.c | 2 ++
> drivers/gpu/drm/i915/intel_uncore.c | 1 +
> 10 files changed, 12 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_connector.c b/drivers/gpu/drm/i915/display/intel_connector.c
> index 7ef9338d67ab..a287884c0045 100644
> --- a/drivers/gpu/drm/i915/display/intel_connector.c
> +++ b/drivers/gpu/drm/i915/display/intel_connector.c
> @@ -23,6 +23,7 @@
> * DEALINGS IN THE SOFTWARE.
> */
>
> +#include <linux/error-injection.h>
> #include <linux/i2c.h>
> #include <linux/slab.h>
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_driver.c b/drivers/gpu/drm/i915/display/intel_display_driver.c
> index 70d112fd4287..204810a11e46 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_driver.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_driver.c
> @@ -7,6 +7,7 @@
> * details here.
> */
>
> +#include <linux/error-injection.h>
> #include <linux/vga_switcheroo.h>
> #include <acpi/video.h>
> #include <drm/display/drm_dp_mst_helper.h>
> diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> index c0fd349a4600..2c3bc7b67c0d 100644
> --- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> +++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
> @@ -3,6 +3,7 @@
> * Copyright © 2016 Intel Corporation
> */
>
> +#include <linux/error-injection.h>
> #include <linux/string_helpers.h>
>
> #include <drm/drm_print.h>
> diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c
> index 5c7f862f7100..2f0e1cb5578c 100644
> --- a/drivers/gpu/drm/i915/gt/intel_gt.c
> +++ b/drivers/gpu/drm/i915/gt/intel_gt.c
> @@ -3,6 +3,8 @@
> * Copyright © 2019 Intel Corporation
> */
>
> +#include <linux/error-injection.h>
> +
> #include <drm/drm_managed.h>
> #include <drm/intel/intel-gtt.h>
> #include <drm/intel/intel_gmd_interrupt_regs.h>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> index 1c455d84bf9d..091aa33f624a 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ct.c
> @@ -4,6 +4,7 @@
> */
>
> #include <linux/circ_buf.h>
> +#include <linux/error-injection.h>
> #include <linux/ktime.h>
> #include <linux/string_helpers.h>
> #include <linux/time64.h>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> index bd07c72a66fc..d367a897c86b 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c
> @@ -3,6 +3,7 @@
> * Copyright © 2016-2019 Intel Corporation
> */
>
> +#include <linux/error-injection.h>
> #include <linux/string_helpers.h>
>
> #include "gt/intel_gt.h"
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> index 7fac97fe30a6..d7c731fe972b 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc_fw.c
> @@ -4,6 +4,7 @@
> */
>
> #include <linux/bitfield.h>
> +#include <linux/error-injection.h>
> #include <linux/firmware.h>
> #include <linux/highmem.h>
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index ce6d20958320..aeb7b24c81c8 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -30,6 +30,7 @@
> #include <linux/aperture.h>
> #include <linux/acpi.h>
> #include <linux/device.h>
> +#include <linux/error-injection.h>
> #include <linux/module.h>
> #include <linux/oom.h>
> #include <linux/pci.h>
> diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c
> index 2f03f95945f1..84a7dc6ab5db 100644
> --- a/drivers/gpu/drm/i915/i915_pci.c
> +++ b/drivers/gpu/drm/i915/i915_pci.c
> @@ -22,6 +22,8 @@
> *
> */
>
> +#include <linux/error-injection.h>
> +
> #include <drm/drm_color_mgmt.h>
> #include <drm/drm_drv.h>
> #include <drm/intel/pci_config.h>
> diff --git a/drivers/gpu/drm/i915/intel_uncore.c b/drivers/gpu/drm/i915/intel_uncore.c
> index 170e83a8c9fc..e360e4f9d9a2 100644
> --- a/drivers/gpu/drm/i915/intel_uncore.c
> +++ b/drivers/gpu/drm/i915/intel_uncore.c
> @@ -21,6 +21,7 @@
> * IN THE SOFTWARE.
> */
>
> +#include <linux/error-injection.h>
> #include <linux/pm_runtime.h>
>
> #include <drm/drm_managed.h>
>
> --
> 2.55.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/6] drm/i915: Include error-injection.h for ALLOW_ERROR_INJECTION()
2026-09-11 15:04 ` [PATCH 4/6] drm/i915: " Petr Pavlu
2026-09-14 7:51 ` Francois Dugast
@ 2026-09-14 12:03 ` Jani Nikula
1 sibling, 0 replies; 12+ messages in thread
From: Jani Nikula @ 2026-09-14 12:03 UTC (permalink / raw)
To: Petr Pavlu, Jens Axboe, Jakub Kicinski, Andrew Lunn,
David S. Miller, Eric Dumazet, Paolo Abeni, Rodrigo Vivi,
Joonas Lahtinen, Tvrtko Ursulin, Matthew Brost,
Thomas Hellström
Cc: Simon Horman, David Airlie, Simona Vetter, Francois Dugast,
Luis Chamberlain, Petr Pavlu, Daniel Gomez, Sami Tolvanen,
Aaron Tomlin, linux-block, netdev, linux-api, intel-gfx,
intel-xe, dri-devel, linux-modules, linux-kernel
On Fri, 11 Sep 2026, Petr Pavlu <petr.pavlu@suse.com> wrote:
> Several drivers/gpu/drm/i915/*.c files use ALLOW_ERROR_INJECTION(), which
> is defined in asm-generic/error-injection.h. They currently rely on this
> header being included indirectly through linux/module.h ->
> linux/error-injection.h.
>
> Add the missing includes in preparation for removing the
> linux/error-injection.h include from linux/module.h.
I guess merging all of this through one tree would speed things up for
you.
Acked-by: Jani Nikula <jani.nikula@intel.com>
for merging via whichever tree you prefer. However, please let me know
if you do want this merged through drm-intel.
Thanks for doing this.
BR,
Jani.
--
Jani Nikula, Intel
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-09-14 12:04 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-11 15:04 [PATCH 0/6] Remove the error-injection.h include from linux/module.h Petr Pavlu
2026-09-11 15:04 ` [PATCH 1/6] block: Include error-injection.h for ALLOW_ERROR_INJECTION() Petr Pavlu
2026-09-11 15:10 ` Jens Axboe
2026-09-11 15:04 ` [PATCH 2/6] net: " Petr Pavlu
2026-09-11 15:04 ` [PATCH 3/6] syscalls: " Petr Pavlu
2026-09-11 15:04 ` [PATCH 4/6] drm/i915: " Petr Pavlu
2026-09-14 7:51 ` Francois Dugast
2026-09-14 12:03 ` Jani Nikula
2026-09-11 15:04 ` [PATCH 5/6] drm/xe: " Petr Pavlu
2026-09-14 7:41 ` Francois Dugast
2026-09-11 15:04 ` [PATCH 6/6] module: Remove the error-injection.h include from linux/module.h Petr Pavlu
2026-09-11 17:31 ` Aaron Tomlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®