aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKyle Evans <kevans@FreeBSD.org>2024-10-24 03:55:22 +0000
committerKyle Evans <kevans@FreeBSD.org>2024-10-24 03:55:29 +0000
commit4f12b529f40422589404fc939ed4a92710412a61 (patch)
treef49d852cb22745e4a00e6bb1f76e0706893ff7df /sys
parent536c8d948e8563141356fd41fb8bfe65be289385 (diff)
downloadsrc-4f12b529f40422589404fc939ed4a92710412a61.tar.gz
src-4f12b529f40422589404fc939ed4a92710412a61.zip
sys/intr.h: formally depend on machine/intr.h
sys/intr.h originally started life as an extract of arm's intr.h, and this include was dropped in its place. Changes in flight want to add some MD definitions that we'll use in the more MI parts of INTRNG. Let's formally reverse the dependency now since this is way more common in general. All of the includes switched in this change that I spot-checked were in-fact wanting declarations historically included in sys/intr.h anyways. Reviewed by: andrew, imp, jrtc27, mhorne, mmel, olce Differential Revision: https://reviews.freebsd.org/D47002
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/arm/mp_machdep.c2
-rw-r--r--sys/arm/include/intr.h2
-rw-r--r--sys/arm64/include/intr.h2
-rw-r--r--sys/kern/subr_intr.c2
-rw-r--r--sys/riscv/include/intr.h2
-rw-r--r--sys/riscv/riscv/mp_machdep.c2
-rw-r--r--sys/riscv/riscv/timer.c2
-rw-r--r--sys/riscv/riscv/trap.c4
-rw-r--r--sys/sys/intr.h2
9 files changed, 8 insertions, 12 deletions
diff --git a/sys/arm/arm/mp_machdep.c b/sys/arm/arm/mp_machdep.c
index ce9a83042d4a..9a4dc4e503e1 100644
--- a/sys/arm/arm/mp_machdep.c
+++ b/sys/arm/arm/mp_machdep.c
@@ -30,6 +30,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/mutex.h>
@@ -51,7 +52,6 @@
#include <machine/debug_monitor.h>
#include <machine/smp.h>
#include <machine/pcb.h>
-#include <machine/intr.h>
#include <machine/vmparam.h>
#ifdef VFP
#include <machine/vfp.h>
diff --git a/sys/arm/include/intr.h b/sys/arm/include/intr.h
index e74be3ac548e..32297f656392 100644
--- a/sys/arm/include/intr.h
+++ b/sys/arm/include/intr.h
@@ -53,8 +53,6 @@ enum root_type {
#define NIRQ 1024 /* XXX - It should be an option. */
#endif
-#include <sys/intr.h>
-
void arm_irq_memory_barrier(uintptr_t);
#endif /* _MACHINE_INTR_H */
diff --git a/sys/arm64/include/intr.h b/sys/arm64/include/intr.h
index 008c377b7a16..c3fe5edc8a6c 100644
--- a/sys/arm64/include/intr.h
+++ b/sys/arm64/include/intr.h
@@ -38,8 +38,6 @@ enum root_type {
INTR_ROOT_COUNT /* MUST BE LAST */
};
-#include <sys/intr.h>
-
#ifndef NIRQ
#define NIRQ 16384 /* XXX - It should be an option. */
#endif
diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c
index 6b4ebd16675c..b8c085367dd6 100644
--- a/sys/kern/subr_intr.c
+++ b/sys/kern/subr_intr.c
@@ -51,6 +51,7 @@
#include <sys/conf.h>
#include <sys/cpuset.h>
#include <sys/interrupt.h>
+#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/malloc.h>
@@ -72,7 +73,6 @@
#include <machine/atomic.h>
#include <machine/cpu.h>
-#include <machine/intr.h>
#include <machine/smp.h>
#include <machine/stdarg.h>
diff --git a/sys/riscv/include/intr.h b/sys/riscv/include/intr.h
index 8cbb07c6be24..100f1ba40ff3 100644
--- a/sys/riscv/include/intr.h
+++ b/sys/riscv/include/intr.h
@@ -45,8 +45,6 @@ enum root_type {
#define NIRQ 1024
#endif
-#include <sys/intr.h>
-
enum {
IRQ_SOFTWARE_USER,
IRQ_SOFTWARE_SUPERVISOR,
diff --git a/sys/riscv/riscv/mp_machdep.c b/sys/riscv/riscv/mp_machdep.c
index 0e4d18ce47fb..235bee15ca29 100644
--- a/sys/riscv/riscv/mp_machdep.c
+++ b/sys/riscv/riscv/mp_machdep.c
@@ -44,6 +44,7 @@
#include <sys/bus.h>
#include <sys/cpu.h>
#include <sys/cpuset.h>
+#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/malloc.h>
@@ -59,7 +60,6 @@
#include <vm/vm_kern.h>
#include <vm/vm_map.h>
-#include <machine/intr.h>
#include <machine/smp.h>
#include <machine/sbi.h>
diff --git a/sys/riscv/riscv/timer.c b/sys/riscv/riscv/timer.c
index 7ff8a84f3769..dc909082edae 100644
--- a/sys/riscv/riscv/timer.c
+++ b/sys/riscv/riscv/timer.c
@@ -41,6 +41,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
+#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/module.h>
#include <sys/rman.h>
@@ -50,7 +51,6 @@
#include <sys/watchdog.h>
#include <machine/cpufunc.h>
-#include <machine/intr.h>
#include <machine/md_var.h>
#include <machine/sbi.h>
diff --git a/sys/riscv/riscv/trap.c b/sys/riscv/riscv/trap.c
index 89eb6a1a378b..3bb1fc7f1010 100644
--- a/sys/riscv/riscv/trap.c
+++ b/sys/riscv/riscv/trap.c
@@ -37,11 +37,12 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/bus.h>
+#include <sys/intr.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
-#include <sys/bus.h>
#include <sys/proc.h>
#include <sys/ptrace.h>
#include <sys/syscall.h>
@@ -63,7 +64,6 @@
#include <machine/pcpu.h>
#include <machine/resource.h>
-#include <machine/intr.h>
#ifdef KDTRACE_HOOKS
#include <sys/dtrace_bsd.h>
diff --git a/sys/sys/intr.h b/sys/sys/intr.h
index 0208844e90c8..f612fc2744f1 100644
--- a/sys/sys/intr.h
+++ b/sys/sys/intr.h
@@ -35,6 +35,8 @@
#include <sys/systm.h>
+#include <machine/intr.h>
+
#define INTR_IRQ_INVALID 0xFFFFFFFF
enum intr_map_data_type {