Skip to content

Commit

Permalink
intrcompat: replace many interrupt header includes with <machine/inte…
Browse files Browse the repository at this point in the history
…rrupt.h>

Referencing anything other than the fully compatible header is risky.
Many of these will be expected to break due to lacking later
compatibility adjustments.  Avoid direct #include of headers besides
<machine/interrupt.h>.

Differential Revision: https://reviews.freebsd.org/D35559
  • Loading branch information
ehem committed Oct 30, 2024
1 parent 30d9445 commit b7da32e
Show file tree
Hide file tree
Showing 68 changed files with 86 additions and 86 deletions.
1 change: 0 additions & 1 deletion sys/arm/annapurna/alpine/alpine_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <sys/module.h>
#include <sys/bus.h>
#include <sys/rman.h>
#include <sys/intr.h>

#include <dev/ofw/openfirm.h>
#include <dev/ofw/ofw_bus.h>
Expand Down
2 changes: 1 addition & 1 deletion sys/arm/arm/busdma_machdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <sys/bus.h>
#include <sys/busdma_bufalloc.h>
#include <sys/counter.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
Expand All @@ -59,6 +58,7 @@
#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/cpu.h>
#include <machine/interrupt.h>
#include <machine/md_var.h>

//#define ARM_BUSDMA_MAPLOAD_STATS
Expand Down
3 changes: 1 addition & 2 deletions sys/arm/arm/nexus.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
Expand All @@ -53,7 +52,7 @@

#include <machine/bus.h>
#include <machine/pcb.h>
#include <machine/intr.h>
#include <machine/interrupt.h>
#include <machine/resource.h>
#include <machine/vmparam.h>

Expand Down
3 changes: 1 addition & 2 deletions sys/arm/broadcom/bcm2835/bcm2835_gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/gpio.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
Expand All @@ -44,7 +43,7 @@
#include <sys/sysctl.h>

#include <machine/bus.h>
#include <machine/intr.h>
#include <machine/interrupt.h>

#include <dev/fdt/fdt_pinctrl.h>
#include <dev/gpio/gpiobusvar.h>
Expand Down
2 changes: 0 additions & 2 deletions sys/arm/broadcom/bcm2835/bcm2838_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <sys/bus.h>
#include <sys/proc.h>
#include <sys/rman.h>
#include <sys/intr.h>
#include <sys/mutex.h>

#include <dev/ofw/openfirm.h>
Expand All @@ -47,7 +46,6 @@
#include <dev/pci/pcib_private.h>

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

#include "pcib_if.h"
#include "msi_if.h"
Expand Down
4 changes: 2 additions & 2 deletions sys/arm/mv/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <sys/bus.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/interrupt.h>
#include <sys/module.h>
#include <sys/malloc.h>
#include <sys/mutex.h>
Expand All @@ -45,8 +44,9 @@
#include <sys/timetc.h>
#include <sys/callout.h>
#include <sys/gpio.h>

#include <machine/bus.h>
#include <machine/intr.h>
#include <machine/interrupt.h>

#include <dev/gpio/gpiobusvar.h>
#include <dev/ofw/ofw_bus.h>
Expand Down
2 changes: 1 addition & 1 deletion sys/arm64/arm64/busdma_bounce.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <sys/domainset.h>
#include <sys/malloc.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
Expand All @@ -55,6 +54,7 @@

#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/interrupt.h>
#include <machine/md_var.h>
#include <arm64/include/bus_dma_impl.h>

Expand Down
3 changes: 1 addition & 2 deletions sys/arm64/arm64/gic_v3.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,13 @@
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/smp.h>
#include <sys/interrupt.h>

#include <vm/vm.h>
#include <vm/pmap.h>

#include <machine/bus.h>
#include <machine/cpu.h>
#include <machine/intr.h>
#include <machine/interrupt.h>

#ifdef FDT
#include <dev/fdt/fdt_intr.h>
Expand Down
3 changes: 1 addition & 2 deletions sys/arm64/arm64/nexus.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
Expand All @@ -54,7 +53,7 @@
#include <vm/pmap.h>

#include <machine/bus.h>
#include <machine/intr.h>
#include <machine/interrupt.h>
#include <machine/machdep.h>
#include <machine/pcb.h>
#include <machine/resource.h>
Expand Down
2 changes: 0 additions & 2 deletions sys/arm64/rockchip/rk3568_pcie.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/bus.h>
#include <sys/proc.h>
#include <sys/rman.h>
#include <sys/intr.h>
#include <sys/mutex.h>
#include <sys/gpio.h>

Expand All @@ -55,7 +54,6 @@
#include <dev/hwreset/hwreset.h>

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

#include <vm/vm.h>
#include <vm/vm_extern.h>
Expand Down
2 changes: 1 addition & 1 deletion sys/cam/mmc/mmc_xpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <sys/time.h>
#include <sys/conf.h>
#include <sys/fcntl.h>
#include <sys/interrupt.h>
#include <sys/sbuf.h>

#include <sys/lock.h>
Expand All @@ -58,6 +57,7 @@
#include <cam/mmc/mmc.h>
#include <cam/mmc/mmc_bus.h>

#include <machine/interrupt.h>
#include <machine/stdarg.h> /* for xpt_print below */
#include <machine/_inttypes.h> /* for PRIu64 */

Expand Down
3 changes: 2 additions & 1 deletion sys/compat/linuxkpi/common/include/linux/hardirq.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@

#include <sys/param.h>
#include <sys/bus.h>
#include <sys/interrupt.h>

#include <machine/interrupt.h>

#define synchronize_irq(irq) _intr_drain((irq))

Expand Down
3 changes: 2 additions & 1 deletion sys/compat/linuxkpi/common/include/linux/interrupt.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
#include <linux/hardirq.h>

#include <sys/param.h>
#include <sys/interrupt.h>

#include <machine/interrupt.h>

typedef irqreturn_t (*irq_handler_t)(int, void *);

Expand Down
3 changes: 2 additions & 1 deletion sys/compat/linuxkpi/common/src/linux_kthread.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@
#include <linux/wait.h>

#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/priority.h>

#include <machine/interrupt.h>

enum {
KTHREAD_SHOULD_STOP_MASK = (1 << 0),
KTHREAD_SHOULD_PARK_MASK = (1 << 1),
Expand Down
3 changes: 2 additions & 1 deletion sys/dev/acpica/acpi_apei.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/callout.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
Expand All @@ -42,6 +41,8 @@
#include <vm/vm.h>
#include <vm/pmap.h>

#include <machine/interrupt.h>

#include <contrib/dev/acpica/include/acpi.h>
#include <contrib/dev/acpica/include/accommon.h>
#include <contrib/dev/acpica/include/aclocal.h>
Expand Down
6 changes: 3 additions & 3 deletions sys/dev/acpica/acpivar.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
#include "acpi_if.h"
#include "bus_if.h"
#include <sys/_eventhandler.h>
#ifdef INTRNG
#include <sys/intr.h>
#endif
#include <sys/ktr.h>
#include <sys/lock.h>
#include <sys/mutex.h>
Expand All @@ -45,6 +42,9 @@
#include <sys/sysctl.h>

#include <machine/bus.h>
#ifdef INTRNG
#include <machine/interrupt.h>
#endif
#include <machine/resource.h>

struct apm_clone_data;
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/amdgpio/amdgpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/gpio.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/lock.h>
#include <sys/module.h>
Expand All @@ -43,6 +42,7 @@
#include <sys/sysctl.h>

#include <machine/bus.h>
#include <machine/interrupt.h>
#include <machine/resource.h>

#include <contrib/dev/acpica/include/acpi.h>
Expand Down
3 changes: 0 additions & 3 deletions sys/dev/gpio/gpiobus.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/gpio.h>
#ifdef INTRNG
#include <sys/intr.h>
#endif
#include <sys/kernel.h>
#include <sys/malloc.h>
#include <sys/module.h>
Expand Down
3 changes: 2 additions & 1 deletion sys/dev/gpio/gpiobusvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
#endif

#ifdef INTRNG
#include <sys/intr.h>
/* touched by LINT-ACPI */
#include <machine/interrupt.h>
#endif

#include "gpio_if.h"
Expand Down
1 change: 0 additions & 1 deletion sys/dev/gpio/pl061.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/gpio.h>
#include <sys/interrupt.h>

#include <machine/bus.h>
#include <machine/intr.h>
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/hyperv/pcib/vmbus_pcib.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
#include <vm/pmap.h>

#if defined(__aarch64__)
#include <arm64/include/intr.h>
#include <arm64/include/interrupt.h>
#endif
#include <machine/atomic.h>
#include <machine/bus.h>
Expand Down
5 changes: 3 additions & 2 deletions sys/dev/iommu/busdma_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/malloc.h>
#include <sys/bus.h>
#include <sys/conf.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
Expand All @@ -57,10 +56,12 @@
#include <vm/vm_page.h>
#include <vm/vm_map.h>
#include <dev/iommu/iommu.h>

#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/md_var.h>
#include <machine/interrupt.h>
#include <machine/iommu.h>
#include <machine/md_var.h>
#include <dev/iommu/busdma_iommu.h>

/*
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/iommu/iommu_gas.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include <sys/systm.h>
#include <sys/malloc.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/kernel.h>
#include <sys/ktr.h>
#include <sys/lock.h>
Expand Down Expand Up @@ -63,6 +62,7 @@
#include <machine/atomic.h>
#include <machine/bus.h>
#include <machine/md_var.h>
#include <machine/interrupt.h>
#include <machine/iommu.h>
#include <dev/iommu/busdma_iommu.h>

Expand Down
2 changes: 1 addition & 1 deletion sys/dev/mfi/mfi.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@
#include <sys/taskqueue.h>

#include <machine/bus.h>
#include <machine/interrupt.h>
#include <machine/resource.h>

#include <dev/mfi/mfireg.h>
#include <dev/mfi/mfi_ioctl.h>
#include <dev/mfi/mfivar.h>
#include <sys/interrupt.h>
#include <sys/priority.h>

static int mfi_alloc_commands(struct mfi_softc *);
Expand Down
3 changes: 2 additions & 1 deletion sys/dev/mlx5/mlx5_en/en_rl.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@
#include <sys/sx.h>
#include <sys/proc.h>
#include <sys/condvar.h>
#include <sys/interrupt.h>
#include <sys/unistd.h>

#include <sys/queue.h>

#include <machine/interrupt.h>

#define MLX5E_RL_MAX_WORKERS 128 /* limited by Toeplitz hash */
#define MLX5E_RL_MAX_TX_RATES (64 * 1024) /* software limit */
#define MLX5E_RL_DEF_SQ_PER_WORKER (12 * 1024) /* software limit */
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ntb/ntb_hw/ntb_hw_intel.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/endian.h>
#include <sys/interrupt.h>
#include <sys/lock.h>
#include <sys/malloc.h>
#include <sys/module.h>
Expand Down
1 change: 0 additions & 1 deletion sys/dev/ntb/ntb_hw/ntb_hw_plx.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
#include <sys/kernel.h>
#include <sys/systm.h>
#include <sys/bus.h>
#include <sys/interrupt.h>
#include <sys/module.h>
#include <sys/rman.h>
#include <sys/sysctl.h>
Expand Down
2 changes: 1 addition & 1 deletion sys/dev/ofw/ofw_bus_subr.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@

#include <sys/bus.h>
#ifdef INTRNG
#include <sys/intr.h>
#include <machine/interrupt.h>
#endif
#include <dev/ofw/openfirm.h>

Expand Down
Loading

0 comments on commit b7da32e

Please sign in to comment.