Skip to content

Commit c809f08

Browse files
committed
irqwork: Move data struct to a types header
... 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
1 parent fbd0e71 commit c809f08

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

include/linux/irq_work.h

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
#ifndef _LINUX_IRQ_WORK_H
33
#define _LINUX_IRQ_WORK_H
44

5-
#include <linux/smp_types.h>
5+
#include <linux/irq_work_types.h>
66
#include <linux/rcuwait.h>
7+
#include <linux/smp_types.h>
78

89
/*
910
* An entry can be in one of four states:
@@ -14,12 +15,6 @@
1415
* busy NULL, 2 -> {free, claimed} : callback in progress, can be claimed
1516
*/
1617

17-
struct irq_work {
18-
struct __call_single_node node;
19-
void (*func)(struct irq_work *);
20-
struct rcuwait irqwait;
21-
};
22-
2318
#define __IRQ_WORK_INIT(_func, _flags) (struct irq_work){ \
2419
.node = { .u_flags = (_flags), }, \
2520
.func = (_func), \

include/linux/irq_work_types.h

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/* SPDX-License-Identifier: GPL-2.0 */
2+
#ifndef _LINUX_IRQ_WORK_TYPES_H
3+
#define _LINUX_IRQ_WORK_TYPES_H
4+
5+
#include <linux/smp_types.h>
6+
#include <linux/types.h>
7+
8+
struct irq_work {
9+
struct __call_single_node node;
10+
void (*func)(struct irq_work *);
11+
struct rcuwait irqwait;
12+
};
13+
14+
#endif

0 commit comments

Comments
 (0)