Split out irqflags_types.h
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 11 Dec 2023 19:01:25 +0000 (14:01 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Thu, 21 Dec 2023 00:26:31 +0000 (19:26 -0500)
We're working on only pulling in type definitions to sched.h whenever
possible.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
include/linux/irqflags.h
include/linux/irqflags_types.h [new file with mode: 0644]
include/linux/sched.h

index 2b665c32f5fe66edee1f88a19aa6f0a8f12877a3..147feebd508cabfa98a1844fb75e2235fb9b56d6 100644 (file)
@@ -12,6 +12,7 @@
 #ifndef _LINUX_TRACE_IRQFLAGS_H
 #define _LINUX_TRACE_IRQFLAGS_H
 
+#include <linux/irqflags_types.h>
 #include <linux/typecheck.h>
 #include <linux/cleanup.h>
 #include <asm/irqflags.h>
 
 #ifdef CONFIG_TRACE_IRQFLAGS
 
-/* Per-task IRQ trace events information. */
-struct irqtrace_events {
-       unsigned int    irq_events;
-       unsigned long   hardirq_enable_ip;
-       unsigned long   hardirq_disable_ip;
-       unsigned int    hardirq_enable_event;
-       unsigned int    hardirq_disable_event;
-       unsigned long   softirq_disable_ip;
-       unsigned long   softirq_enable_ip;
-       unsigned int    softirq_disable_event;
-       unsigned int    softirq_enable_event;
-};
-
 DECLARE_PER_CPU(int, hardirqs_enabled);
 DECLARE_PER_CPU(int, hardirq_context);
 
diff --git a/include/linux/irqflags_types.h b/include/linux/irqflags_types.h
new file mode 100644 (file)
index 0000000..c13f0d9
--- /dev/null
@@ -0,0 +1,22 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_IRQFLAGS_TYPES_H
+#define _LINUX_IRQFLAGS_TYPES_H
+
+#ifdef CONFIG_TRACE_IRQFLAGS
+
+/* Per-task IRQ trace events information. */
+struct irqtrace_events {
+       unsigned int    irq_events;
+       unsigned long   hardirq_enable_ip;
+       unsigned long   hardirq_disable_ip;
+       unsigned int    hardirq_enable_event;
+       unsigned int    hardirq_disable_event;
+       unsigned long   softirq_disable_ip;
+       unsigned long   softirq_enable_ip;
+       unsigned int    softirq_disable_event;
+       unsigned int    softirq_enable_event;
+};
+
+#endif
+
+#endif /* _LINUX_IRQFLAGS_TYPES_H */
index 34400b16e57ce5c72fd5b6a50ee8d78220b73aee..026390e6fe59b60a9241fd98fa8db70c3073e833 100644 (file)
@@ -11,6 +11,7 @@
 
 #include <asm/current.h>
 
+#include <linux/irqflags_types.h>
 #include <linux/pid_types.h>
 #include <linux/sem.h>
 #include <linux/shm.h>
@@ -18,7 +19,6 @@
 #include <linux/mutex_types.h>
 #include <linux/plist_types.h>
 #include <linux/hrtimer_types.h>
-#include <linux/irqflags.h>
 #include <linux/seccomp.h>
 #include <linux/nodemask_types.h>
 #include <linux/rcupdate.h>