diff options
author | Markus Armbruster <armbru@redhat.com> | 2019-08-12 07:23:42 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2019-08-16 13:31:52 +0200 |
commit | 64552b6be4758d3a774f7787b294543ccebd5358 (patch) | |
tree | 585e4f41f5bc934e7dbdba73a2e49dc23ac4e190 /include | |
parent | 2a28720d773df2193c9fb633c02092cca107a9e5 (diff) |
Include hw/irq.h a lot less
In my "build everything" tree, changing hw/irq.h triggers a recompile
of some 5400 out of 6600 objects (not counting tests and objects that
don't depend on qemu/osdep.h).
hw/hw.h supposedly includes it for convenience. Several other headers
include it just to get qemu_irq and.or qemu_irq_handler.
Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
qemu/typedefs.h, and then include hw/irq.h only where it's still
needed. Touching it now recompiles only some 500 objects.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190812052359.30071-13-armbru@redhat.com>
Diffstat (limited to 'include')
31 files changed, 10 insertions, 32 deletions
diff --git a/include/hw/acpi/acpi.h b/include/hw/acpi/acpi.h index c91e2b9df2..1f2dafbd7d 100644 --- a/include/hw/acpi/acpi.h +++ b/include/hw/acpi/acpi.h @@ -22,7 +22,6 @@ #include "qemu/notify.h" #include "exec/memory.h" -#include "hw/irq.h" #include "hw/acpi/acpi_dev_interface.h" /* diff --git a/include/hw/arm/boot.h b/include/hw/arm/boot.h index c48cc4c2bc..350d4b0498 100644 --- a/include/hw/arm/boot.h +++ b/include/hw/arm/boot.h @@ -13,7 +13,6 @@ #include "exec/memory.h" #include "target/arm/cpu-qom.h" -#include "hw/irq.h" #include "qemu/notify.h" typedef enum { diff --git a/include/hw/arm/omap.h b/include/hw/arm/omap.h index d21e418242..2fda996648 100644 --- a/include/hw/arm/omap.h +++ b/include/hw/arm/omap.h @@ -21,7 +21,6 @@ #define HW_ARM_OMAP_H #include "exec/memory.h" -#include "hw/irq.h" #include "hw/input/tsc2xxx.h" #include "target/arm/cpu-qom.h" #include "qemu/log.h" diff --git a/include/hw/arm/soc_dma.h b/include/hw/arm/soc_dma.h index fae322997e..7886291d54 100644 --- a/include/hw/arm/soc_dma.h +++ b/include/hw/arm/soc_dma.h @@ -22,7 +22,6 @@ #define HW_SOC_DMA_H #include "exec/memory.h" -#include "hw/irq.h" struct soc_dma_s; struct soc_dma_ch_s; diff --git a/include/hw/block/fdc.h b/include/hw/block/fdc.h index f4fe2f471b..c15ff4c623 100644 --- a/include/hw/block/fdc.h +++ b/include/hw/block/fdc.h @@ -2,7 +2,6 @@ #define HW_FDC_H #include "exec/hwaddr.h" -#include "hw/irq.h" #include "qapi/qapi-types-block.h" /* fdc.c */ diff --git a/include/hw/bt.h b/include/hw/bt.h index b5e11d4d43..d9ee2fc29a 100644 --- a/include/hw/bt.h +++ b/include/hw/bt.h @@ -26,7 +26,6 @@ #ifndef HW_BT_H #define HW_BT_H -#include "hw/irq.h" /* BD Address */ typedef struct { diff --git a/include/hw/core/split-irq.h b/include/hw/core/split-irq.h index bb87157c5a..872a39aa4f 100644 --- a/include/hw/core/split-irq.h +++ b/include/hw/core/split-irq.h @@ -35,7 +35,6 @@ #ifndef HW_SPLIT_IRQ_H #define HW_SPLIT_IRQ_H -#include "hw/irq.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/cris/etraxfs_dma.h b/include/hw/cris/etraxfs_dma.h index 31ae360611..095d76b956 100644 --- a/include/hw/cris/etraxfs_dma.h +++ b/include/hw/cris/etraxfs_dma.h @@ -2,7 +2,6 @@ #define HW_ETRAXFS_DMA_H #include "exec/hwaddr.h" -#include "hw/irq.h" struct dma_context_metadata { /* data descriptor md */ diff --git a/include/hw/display/blizzard.h b/include/hw/display/blizzard.h index ef72bbc186..5b33018835 100644 --- a/include/hw/display/blizzard.h +++ b/include/hw/display/blizzard.h @@ -11,7 +11,6 @@ #ifndef HW_DISPLAY_BLIZZARD_H #define HW_DISPLAY_BLIZZARD_H -#include "hw/irq.h" void *s1d13745_init(qemu_irq gpio_int); void s1d13745_write(void *opaque, int dc, uint16_t value); diff --git a/include/hw/display/tc6393xb.h b/include/hw/display/tc6393xb.h index 5c4da91f80..c653ef717b 100644 --- a/include/hw/display/tc6393xb.h +++ b/include/hw/display/tc6393xb.h @@ -13,7 +13,6 @@ #define HW_DISPLAY_TC6393XB_H #include "exec/memory.h" -#include "hw/irq.h" typedef struct TC6393xbState TC6393xbState; diff --git a/include/hw/hw.h b/include/hw/hw.h index b399627cbe..38d2fb1f40 100644 --- a/include/hw/hw.h +++ b/include/hw/hw.h @@ -9,7 +9,6 @@ #include "exec/cpu-common.h" #include "qom/object.h" #include "exec/memory.h" -#include "hw/irq.h" #include "migration/vmstate.h" void QEMU_NORETURN hw_error(const char *fmt, ...) GCC_FMT_ATTR(1, 2); diff --git a/include/hw/ide/internal.h b/include/hw/ide/internal.h index 8efd03132b..c6954c1d56 100644 --- a/include/hw/ide/internal.h +++ b/include/hw/ide/internal.h @@ -7,6 +7,7 @@ * non-internal declarations are in hw/ide.h */ #include "hw/ide.h" +#include "hw/irq.h" #include "hw/isa/isa.h" #include "sysemu/dma.h" #include "sysemu/sysemu.h" diff --git a/include/hw/input/gamepad.h b/include/hw/input/gamepad.h index e20211baef..6f6aa2406a 100644 --- a/include/hw/input/gamepad.h +++ b/include/hw/input/gamepad.h @@ -11,7 +11,6 @@ #ifndef HW_INPUT_GAMEPAD_H #define HW_INPUT_GAMEPAD_H -#include "hw/irq.h" /* stellaris_input.c */ void stellaris_gamepad_init(int n, qemu_irq *irq, const int *keycode); diff --git a/include/hw/input/tsc2xxx.h b/include/hw/input/tsc2xxx.h index dbfe5c55c1..3cd8f1bf55 100644 --- a/include/hw/input/tsc2xxx.h +++ b/include/hw/input/tsc2xxx.h @@ -11,7 +11,6 @@ #ifndef HW_INPUT_TSC2XXX_H #define HW_INPUT_TSC2XXX_H -#include "hw/irq.h" #include "ui/console.h" typedef struct uWireSlave { diff --git a/include/hw/irq.h b/include/hw/irq.h index 7a40e3ed26..fe527f6f51 100644 --- a/include/hw/irq.h +++ b/include/hw/irq.h @@ -5,10 +5,6 @@ #define TYPE_IRQ "irq" -typedef struct IRQState *qemu_irq; - -typedef void (*qemu_irq_handler)(void *opaque, int n, int level); - void qemu_set_irq(qemu_irq irq, int level); static inline void qemu_irq_raise(qemu_irq irq) diff --git a/include/hw/isa/vt82c686.h b/include/hw/isa/vt82c686.h index a54c3fe60a..f23f45dfb1 100644 --- a/include/hw/isa/vt82c686.h +++ b/include/hw/isa/vt82c686.h @@ -1,7 +1,6 @@ #ifndef HW_VT82C686_H #define HW_VT82C686_H -#include "hw/irq.h" #define TYPE_VT82C686B_SUPERIO "vt82c686b-superio" diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 2f6774d540..0af4c3d5d7 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -6,7 +6,6 @@ #define INITRD_PAGE_MASK (~((1 << 16) - 1)) #include "exec/memory.h" -#include "hw/irq.h" /* gt64xxx.c */ PCIBus *gt64120_register(qemu_irq *pic); diff --git a/include/hw/misc/cbus.h b/include/hw/misc/cbus.h index c899943e03..5334984020 100644 --- a/include/hw/misc/cbus.h +++ b/include/hw/misc/cbus.h @@ -13,7 +13,6 @@ #ifndef HW_MISC_CBUS_H #define HW_MISC_CBUS_H -#include "hw/irq.h" typedef struct { qemu_irq clk; diff --git a/include/hw/net/lan9118.h b/include/hw/net/lan9118.h index 500acb4c14..3d0c67f339 100644 --- a/include/hw/net/lan9118.h +++ b/include/hw/net/lan9118.h @@ -11,7 +11,6 @@ #ifndef HW_NET_LAN9118_H #define HW_NET_LAN9118_H -#include "hw/irq.h" #include "net/net.h" #define TYPE_LAN9118 "lan9118" diff --git a/include/hw/net/smc91c111.h b/include/hw/net/smc91c111.h index a66ba4112f..df5b11dcef 100644 --- a/include/hw/net/smc91c111.h +++ b/include/hw/net/smc91c111.h @@ -11,7 +11,6 @@ #ifndef HW_NET_SMC91C111_H #define HW_NET_SMC91C111_H -#include "hw/irq.h" #include "net/net.h" void smc91c111_init(NICInfo *, uint32_t, qemu_irq); diff --git a/include/hw/or-irq.h b/include/hw/or-irq.h index 5a31e5a188..3a3230dd84 100644 --- a/include/hw/or-irq.h +++ b/include/hw/or-irq.h @@ -25,7 +25,6 @@ #ifndef HW_OR_IRQ_H #define HW_OR_IRQ_H -#include "hw/irq.h" #include "hw/sysbus.h" #include "qom/object.h" diff --git a/include/hw/ppc/spapr_irq.h b/include/hw/ppc/spapr_irq.h index cd6e18b05e..8132e00366 100644 --- a/include/hw/ppc/spapr_irq.h +++ b/include/hw/ppc/spapr_irq.h @@ -10,7 +10,6 @@ #ifndef HW_SPAPR_IRQ_H #define HW_SPAPR_IRQ_H -#include "hw/irq.h" #include "target/ppc/cpu-qom.h" /* diff --git a/include/hw/qdev-core.h b/include/hw/qdev-core.h index 136df7774c..b870c8ceeb 100644 --- a/include/hw/qdev-core.h +++ b/include/hw/qdev-core.h @@ -4,7 +4,6 @@ #include "qemu/queue.h" #include "qemu/bitmap.h" #include "qom/object.h" -#include "hw/irq.h" #include "hw/hotplug.h" #include "sysemu/sysemu.h" diff --git a/include/hw/sh4/sh_intc.h b/include/hw/sh4/sh_intc.h index 3d3efde059..65f3425057 100644 --- a/include/hw/sh4/sh_intc.h +++ b/include/hw/sh4/sh_intc.h @@ -2,7 +2,6 @@ #define SH_INTC_H #include "exec/memory.h" -#include "hw/irq.h" typedef unsigned char intc_enum; diff --git a/include/hw/timer/m48t59.h b/include/hw/timer/m48t59.h index d3fb50e08c..f74854c026 100644 --- a/include/hw/timer/m48t59.h +++ b/include/hw/timer/m48t59.h @@ -2,7 +2,6 @@ #define HW_M48T59_H #include "exec/hwaddr.h" -#include "hw/irq.h" #include "qom/object.h" #define TYPE_NVRAM "nvram" diff --git a/include/hw/tricore/tricore.h b/include/hw/tricore/tricore.h index 89ef922c67..c19ed3f013 100644 --- a/include/hw/tricore/tricore.h +++ b/include/hw/tricore/tricore.h @@ -2,7 +2,6 @@ #define HW_TRICORE_H #include "exec/memory.h" -#include "hw/irq.h" struct tricore_boot_info { uint64_t ram_size; diff --git a/include/hw/vfio/vfio-platform.h b/include/hw/vfio/vfio-platform.h index 30d3c28d3b..4ec70c813a 100644 --- a/include/hw/vfio/vfio-platform.h +++ b/include/hw/vfio/vfio-platform.h @@ -20,7 +20,6 @@ #include "hw/vfio/vfio-common.h" #include "qemu/event_notifier.h" #include "qemu/queue.h" -#include "hw/irq.h" #define TYPE_VFIO_PLATFORM "vfio-platform" diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h index 9c7b5f78dc..5ac1c6dc55 100644 --- a/include/hw/xen/xen.h +++ b/include/hw/xen/xen.h @@ -9,7 +9,6 @@ */ #include "exec/cpu-common.h" -#include "hw/irq.h" /* xen-machine.c */ enum xen_mode { diff --git a/include/hw/xtensa/mx_pic.h b/include/hw/xtensa/mx_pic.h index c9ea9e737c..500424c8d3 100644 --- a/include/hw/xtensa/mx_pic.h +++ b/include/hw/xtensa/mx_pic.h @@ -29,7 +29,6 @@ #define XTENSA_MX_PIC_H #include "exec/memory.h" -#include "hw/irq.h" struct XtensaMxPic; typedef struct XtensaMxPic XtensaMxPic; diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h index 7fb165423a..2738343bf7 100644 --- a/include/qemu/typedefs.h +++ b/include/qemu/typedefs.h @@ -119,9 +119,18 @@ typedef struct VirtIODevice VirtIODevice; typedef struct Visitor Visitor; /* + * Pointer types + * Such typedefs should be limited to cases where the typedef's users + * are oblivious of its "pointer-ness". + * Please keep this list in case-insensitive alphabetical order. + */ +typedef struct IRQState *qemu_irq; + +/* * Function types */ typedef void SaveStateHandler(QEMUFile *f, void *opaque); typedef int LoadStateHandler(QEMUFile *f, void *opaque, int version_id); +typedef void (*qemu_irq_handler)(void *opaque, int n, int level); #endif /* QEMU_TYPEDEFS_H */ diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index acd90aebb6..c8ea412f62 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -17,7 +17,6 @@ #include "qemu/queue.h" #include "qom/cpu.h" #include "exec/memattrs.h" -#include "hw/irq.h" #ifdef NEED_CPU_H # ifdef CONFIG_KVM |