]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
irqwork: Move data struct to a types header
authorThomas Gleixner <tglx@linutronix.de>
Wed, 19 Nov 2025 17:27:18 +0000 (18:27 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Tue, 25 Nov 2025 18:45:41 +0000 (19:45 +0100)
... to avoid header recursion hell.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Link: https://patch.msgid.link/20251119172550.152813625@linutronix.de
include/linux/irq_work.h
include/linux/irq_work_types.h [new file with mode: 0644]

index 136f2980cba3030adefb65d006758322c44cb36f..c5afd053ae32c26339ec9490c5005a077b642573 100644 (file)
@@ -2,8 +2,9 @@
 #ifndef _LINUX_IRQ_WORK_H
 #define _LINUX_IRQ_WORK_H
 
-#include <linux/smp_types.h>
+#include <linux/irq_work_types.h>
 #include <linux/rcuwait.h>
+#include <linux/smp_types.h>
 
 /*
  * An entry can be in one of four states:
  * busy      NULL, 2 -> {free, claimed} : callback in progress, can be claimed
  */
 
-struct irq_work {
-       struct __call_single_node node;
-       void (*func)(struct irq_work *);
-       struct rcuwait irqwait;
-};
-
 #define __IRQ_WORK_INIT(_func, _flags) (struct irq_work){      \
        .node = { .u_flags = (_flags), },                       \
        .func = (_func),                                        \
diff --git a/include/linux/irq_work_types.h b/include/linux/irq_work_types.h
new file mode 100644 (file)
index 0000000..73abec5
--- /dev/null
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_IRQ_WORK_TYPES_H
+#define _LINUX_IRQ_WORK_TYPES_H
+
+#include <linux/smp_types.h>
+#include <linux/types.h>
+
+struct irq_work {
+       struct __call_single_node       node;
+       void                            (*func)(struct irq_work *);
+       struct rcuwait                  irqwait;
+};
+
+#endif