Skip to content

Commit

Permalink
sys/intr.h: formally depend on machine/intr.h
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kevans91 committed Oct 24, 2024
1 parent 536c8d9 commit 4f12b52
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 12 deletions.
2 changes: 1 addition & 1 deletion sys/arm/arm/mp_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>
Expand Down
2 changes: 0 additions & 2 deletions sys/arm/include/intr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 0 additions & 2 deletions sys/arm64/include/intr.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion sys/kern/subr_intr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -72,7 +73,6 @@

#include <machine/atomic.h>
#include <machine/cpu.h>
#include <machine/intr.h>
#include <machine/smp.h>
#include <machine/stdarg.h>

Expand Down
2 changes: 0 additions & 2 deletions sys/riscv/include/intr.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,6 @@ enum root_type {
#define NIRQ 1024
#endif

#include <sys/intr.h>

enum {
IRQ_SOFTWARE_USER,
IRQ_SOFTWARE_SUPERVISOR,
Expand Down
2 changes: 1 addition & 1 deletion sys/riscv/riscv/mp_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion sys/riscv/riscv/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -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>

Expand Down
4 changes: 2 additions & 2 deletions sys/riscv/riscv/trap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand All @@ -63,7 +64,6 @@
#include <machine/pcpu.h>

#include <machine/resource.h>
#include <machine/intr.h>

#ifdef KDTRACE_HOOKS
#include <sys/dtrace_bsd.h>
Expand Down
2 changes: 2 additions & 0 deletions sys/sys/intr.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@

#include <sys/systm.h>

#include <machine/intr.h>

#define INTR_IRQ_INVALID 0xFFFFFFFF

enum intr_map_data_type {
Expand Down

0 comments on commit 4f12b52

Please sign in to comment.