From 71e8a915855857e0d45b322826778516cc3e3055 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:38 +0200 Subject: Include sysemu/reset.h a lot less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing sysemu/reset.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). The main culprit is hw/hw.h, which supposedly includes it for convenience. Include sysemu/reset.h only where it's needed. Touching it now recompiles less than 200 objects. Signed-off-by: Markus Armbruster Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Alistair Francis Tested-by: Philippe Mathieu-Daudé Message-Id: <20190812052359.30071-9-armbru@redhat.com> --- hw/intc/mips_gic.c | 1 + hw/intc/pnv_xive.c | 1 + hw/intc/spapr_xive.c | 1 + hw/intc/xics.c | 1 + hw/intc/xive.c | 1 + 5 files changed, 5 insertions(+) (limited to 'hw/intc') diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 33ab51c..e27e333 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -18,6 +18,7 @@ #include "exec/memory.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" +#include "sysemu/reset.h" #include "kvm_mips.h" #include "hw/intc/mips_gic.h" diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 4dc92ef..63b0f46 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -14,6 +14,7 @@ #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" +#include "sysemu/reset.h" #include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/pnv.h" diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 3ae311d..2e39cc1 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -14,6 +14,7 @@ #include "qemu/error-report.h" #include "target/ppc/cpu.h" #include "sysemu/cpus.h" +#include "sysemu/reset.h" #include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/spapr.h" diff --git a/hw/intc/xics.c b/hw/intc/xics.c index faa976e..9ed224c 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -38,6 +38,7 @@ #include "monitor/monitor.h" #include "hw/intc/intc.h" #include "sysemu/kvm.h" +#include "sysemu/reset.h" void icp_pic_print_info(ICPState *icp, Monitor *mon) { diff --git a/hw/intc/xive.c b/hw/intc/xive.c index da148e9..f30bd68 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -14,6 +14,7 @@ #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/dma.h" +#include "sysemu/reset.h" #include "hw/qdev-properties.h" #include "monitor/monitor.h" #include "hw/ppc/xive.h" -- cgit v1.1 From ca77ee28e03fb5052be01b9237b0a7cef5d90d4a Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:39 +0200 Subject: Include migration/qemu-file-types.h a lot less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing migration/qemu-file-types.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). The culprit is again hw/hw.h, which supposedly includes it for convenience. Include migration/qemu-file-types.h only where it's needed. Touching it now recompiles less than 200 objects. Signed-off-by: Markus Armbruster Message-Id: <20190812052359.30071-10-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/intc/apic_common.c | 1 + hw/intc/s390_flic_kvm.c | 1 + 2 files changed, 2 insertions(+) (limited to 'hw/intc') diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index e764a2b..7045761 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -31,6 +31,7 @@ #include "sysemu/kvm.h" #include "hw/qdev.h" #include "hw/sysbus.h" +#include "migration/qemu-file-types.h" static int apic_irq_delivered; bool apic_report_tpr_access; diff --git a/hw/intc/s390_flic_kvm.c b/hw/intc/s390_flic_kvm.c index ff45b4a..819aa5e 100644 --- a/hw/intc/s390_flic_kvm.c +++ b/hw/intc/s390_flic_kvm.c @@ -22,6 +22,7 @@ #include "hw/s390x/s390_flic.h" #include "hw/s390x/adapter.h" #include "hw/s390x/css.h" +#include "migration/qemu-file-types.h" #include "trace.h" #define FLIC_SAVE_INITIAL_SIZE getpagesize() -- cgit v1.1 From 64552b6be4758d3a774f7787b294543ccebd5358 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:42 +0200 Subject: Include hw/irq.h a lot less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Message-Id: <20190812052359.30071-13-armbru@redhat.com> --- hw/intc/allwinner-a10-pic.c | 1 + hw/intc/arm_gic.c | 1 + hw/intc/arm_gicv2m.c | 1 + hw/intc/arm_gicv3_cpuif.c | 1 + hw/intc/armv7m_nvic.c | 1 + hw/intc/aspeed_vic.c | 1 + hw/intc/bcm2835_ic.c | 1 + hw/intc/bcm2836_control.c | 1 + hw/intc/etraxfs_pic.c | 1 + hw/intc/exynos4210_combiner.c | 1 + hw/intc/heathrow_pic.c | 1 + hw/intc/i8259.c | 2 ++ hw/intc/imx_avic.c | 1 + hw/intc/lm32_pic.c | 1 + hw/intc/mips_gic.c | 1 + hw/intc/nios2_iic.c | 1 + hw/intc/omap_intc.c | 1 + hw/intc/ompic.c | 1 + hw/intc/openpic.c | 1 + hw/intc/pl190.c | 1 + hw/intc/puv3_intc.c | 1 + hw/intc/realview_gic.c | 1 + hw/intc/sh_intc.c | 1 + hw/intc/slavio_intctl.c | 1 + hw/intc/xics.c | 1 + hw/intc/xilinx_intc.c | 1 + hw/intc/xive.c | 1 + hw/intc/xlnx-pmu-iomod-intc.c | 1 + hw/intc/xlnx-zynqmp-ipi.c | 1 + 29 files changed, 30 insertions(+) (limited to 'hw/intc') diff --git a/hw/intc/allwinner-a10-pic.c b/hw/intc/allwinner-a10-pic.c index 080bdd7..9df3e18 100644 --- a/hw/intc/allwinner-a10-pic.c +++ b/hw/intc/allwinner-a10-pic.c @@ -19,6 +19,7 @@ #include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "hw/intc/allwinner-a10-pic.h" +#include "hw/irq.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c index 77427a4..7af591d 100644 --- a/hw/intc/arm_gic.c +++ b/hw/intc/arm_gic.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/sysbus.h" #include "gic_internal.h" #include "qapi/error.h" diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c index 05f299f..2c96d4f 100644 --- a/hw/intc/arm_gicv2m.c +++ b/hw/intc/arm_gicv2m.c @@ -28,6 +28,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/sysbus.h" +#include "hw/irq.h" #include "hw/pci/msi.h" #include "sysemu/kvm.h" #include "qemu/log.h" diff --git a/hw/intc/arm_gicv3_cpuif.c b/hw/intc/arm_gicv3_cpuif.c index 3b212d9..a254b0c 100644 --- a/hw/intc/arm_gicv3_cpuif.c +++ b/hw/intc/arm_gicv3_cpuif.c @@ -17,6 +17,7 @@ #include "qemu/main-loop.h" #include "trace.h" #include "gicv3_internal.h" +#include "hw/irq.h" #include "cpu.h" void gicv3_set_gicv3state(CPUState *cpu, GICv3CPUState *s) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 9f8f0d3..69670a2 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -16,6 +16,7 @@ #include "hw/sysbus.h" #include "qemu/timer.h" #include "hw/intc/armv7m_nvic.h" +#include "hw/irq.h" #include "target/arm/cpu.h" #include "exec/exec-all.h" #include "qemu/log.h" diff --git a/hw/intc/aspeed_vic.c b/hw/intc/aspeed_vic.c index 266a309..e17343c 100644 --- a/hw/intc/aspeed_vic.c +++ b/hw/intc/aspeed_vic.c @@ -29,6 +29,7 @@ #include "qemu/osdep.h" #include "hw/intc/aspeed_vic.h" +#include "hw/irq.h" #include "qemu/bitops.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 61d3764..20db52b 100644 --- a/hw/intc/bcm2835_ic.c +++ b/hw/intc/bcm2835_ic.c @@ -14,6 +14,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2835_ic.h" +#include "hw/irq.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index 66417c8..a983fe5 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2836_control.h" +#include "hw/irq.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c index 20e1391..dc72dd5 100644 --- a/hw/intc/etraxfs_pic.c +++ b/hw/intc/etraxfs_pic.c @@ -26,6 +26,7 @@ #include "hw/sysbus.h" #include "qemu/module.h" #include "hw/hw.h" +#include "hw/irq.h" //#include "pc.h" //#include "etraxfs.h" diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 6fed0e8..ed55811 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -32,6 +32,7 @@ #include "qemu/module.h" #include "hw/arm/exynos4210.h" +#include "hw/irq.h" //#define DEBUG_COMBINER diff --git a/hw/intc/heathrow_pic.c b/hw/intc/heathrow_pic.c index c282ac4..ac1f7c0 100644 --- a/hw/intc/heathrow_pic.c +++ b/hw/intc/heathrow_pic.c @@ -28,6 +28,7 @@ #include "hw/ppc/mac.h" #include "qemu/module.h" #include "hw/intc/heathrow_pic.h" +#include "hw/irq.h" #include "trace.h" static inline int heathrow_check_irq(HeathrowPICState *pic) diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index 76f3d87..e581e6b 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -21,9 +21,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/i386/pc.h" +#include "hw/irq.h" #include "hw/isa/isa.h" #include "qemu/timer.h" #include "qemu/log.h" diff --git a/hw/intc/imx_avic.c b/hw/intc/imx_avic.c index 83a4101..022ed05 100644 --- a/hw/intc/imx_avic.c +++ b/hw/intc/imx_avic.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "hw/intc/imx_avic.h" +#include "hw/irq.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c index 170fa7a..c133d30 100644 --- a/hw/intc/lm32_pic.c +++ b/hw/intc/lm32_pic.c @@ -26,6 +26,7 @@ #include "trace.h" #include "hw/lm32/lm32_pic.h" #include "hw/intc/intc.h" +#include "hw/irq.h" #define TYPE_LM32_PIC "lm32-pic" #define LM32_PIC(obj) OBJECT_CHECK(LM32PicState, (obj), TYPE_LM32_PIC) diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index e27e333..166eb6e 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -21,6 +21,7 @@ #include "sysemu/reset.h" #include "kvm_mips.h" #include "hw/intc/mips_gic.h" +#include "hw/irq.h" static void mips_gic_set_vp_irq(MIPSGICState *gic, int vp, int pin) { diff --git a/hw/intc/nios2_iic.c b/hw/intc/nios2_iic.c index 7329434..3a5d86c 100644 --- a/hw/intc/nios2_iic.c +++ b/hw/intc/nios2_iic.c @@ -22,6 +22,7 @@ #include "qemu/module.h" #include "qapi/error.h" +#include "hw/irq.h" #include "hw/sysbus.h" #include "cpu.h" diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c index 053e67c..4b3ddc0 100644 --- a/hw/intc/omap_intc.c +++ b/hw/intc/omap_intc.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" +#include "hw/irq.h" #include "hw/arm/omap.h" #include "hw/sysbus.h" #include "qemu/error-report.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 9cb310a..31004ac 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -11,6 +11,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "hw/hw.h" +#include "hw/irq.h" #include "hw/sysbus.h" #include "exec/memory.h" diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 9b4fc6c..49d64bc 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -36,6 +36,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" +#include "hw/irq.h" #include "hw/ppc/mac.h" #include "hw/pci/pci.h" #include "hw/ppc/openpic.h" diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c index b4f31ef..1a5e760 100644 --- a/hw/intc/pl190.c +++ b/hw/intc/pl190.c @@ -8,6 +8,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/sysbus.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/puv3_intc.c b/hw/intc/puv3_intc.c index e2f6d98..e018955 100644 --- a/hw/intc/puv3_intc.c +++ b/hw/intc/puv3_intc.c @@ -10,6 +10,7 @@ */ #include "qemu/osdep.h" +#include "hw/irq.h" #include "hw/sysbus.h" #undef DEBUG_PUV3 diff --git a/hw/intc/realview_gic.c b/hw/intc/realview_gic.c index 9955754..ac22a2a 100644 --- a/hw/intc/realview_gic.c +++ b/hw/intc/realview_gic.c @@ -11,6 +11,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/intc/realview_gic.h" +#include "hw/irq.h" static void realview_gic_set_irq(void *opaque, int irq, int level) { diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index bac7886..6252150 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -12,6 +12,7 @@ #include "cpu.h" #include "hw/sh4/sh_intc.h" #include "hw/hw.h" +#include "hw/irq.h" #include "hw/sh4/sh.h" //#define DEBUG_INTC diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index ca52875..e97afca 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -27,6 +27,7 @@ #include "qemu/module.h" #include "hw/sysbus.h" #include "hw/intc/intc.h" +#include "hw/irq.h" #include "trace.h" //#define DEBUG_IRQ_COUNT diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 9ed224c..beb37b1 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -37,6 +37,7 @@ #include "qapi/visitor.h" #include "monitor/monitor.h" #include "hw/intc/intc.h" +#include "hw/irq.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index d5363e9..baf5353 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -26,6 +26,7 @@ #include "hw/sysbus.h" #include "qemu/module.h" #include "hw/hw.h" +#include "hw/irq.h" #define D(x) diff --git a/hw/intc/xive.c b/hw/intc/xive.c index f30bd68..9dcbe8b 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -17,6 +17,7 @@ #include "sysemu/reset.h" #include "hw/qdev-properties.h" #include "monitor/monitor.h" +#include "hw/irq.h" #include "hw/ppc/xive.h" #include "hw/ppc/xive_regs.h" diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c index 0b8ff89..9fcd17c 100644 --- a/hw/intc/xlnx-pmu-iomod-intc.c +++ b/hw/intc/xlnx-pmu-iomod-intc.c @@ -31,6 +31,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "hw/intc/xlnx-pmu-iomod-intc.h" +#include "hw/irq.h" #ifndef XLNX_PMU_IO_INTC_ERR_DEBUG #define XLNX_PMU_IO_INTC_ERR_DEBUG 0 diff --git a/hw/intc/xlnx-zynqmp-ipi.c b/hw/intc/xlnx-zynqmp-ipi.c index 0dad6c0..43a1b789 100644 --- a/hw/intc/xlnx-zynqmp-ipi.c +++ b/hw/intc/xlnx-zynqmp-ipi.c @@ -32,6 +32,7 @@ #include "qemu/log.h" #include "qemu/module.h" #include "hw/intc/xlnx-zynqmp-ipi.h" +#include "hw/irq.h" #ifndef XLNX_ZYNQMP_IPI_ERR_DEBUG #define XLNX_ZYNQMP_IPI_ERR_DEBUG 0 -- cgit v1.1 From d6454270575da1f16a8923c7cb240e46ef243f72 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:45 +0200 Subject: Include migration/vmstate.h less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing migration/vmstate.h triggers a recompile of some 2700 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 VMStateDescription. The previous commit made that unnecessary. Include migration/vmstate.h only where it's still needed. Touching it now recompiles only some 1600 objects. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Message-Id: <20190812052359.30071-16-armbru@redhat.com> Tested-by: Philippe Mathieu-Daudé --- hw/intc/allwinner-a10-pic.c | 1 + hw/intc/apic_common.c | 1 + hw/intc/arm_gic_common.c | 1 + hw/intc/arm_gicv3_common.c | 1 + hw/intc/arm_gicv3_its_common.c | 1 + hw/intc/armv7m_nvic.c | 1 + hw/intc/aspeed_vic.c | 1 + hw/intc/bcm2835_ic.c | 1 + hw/intc/bcm2836_control.c | 1 + hw/intc/exynos4210_combiner.c | 1 + hw/intc/exynos4210_gic.c | 1 + hw/intc/heathrow_pic.c | 1 + hw/intc/i8259_common.c | 2 ++ hw/intc/imx_avic.c | 1 + hw/intc/imx_gpcv2.c | 1 + hw/intc/ioapic_common.c | 1 + hw/intc/lm32_pic.c | 1 + hw/intc/ompic.c | 1 + hw/intc/openpic.c | 1 + hw/intc/pl190.c | 1 + hw/intc/slavio_intctl.c | 1 + hw/intc/spapr_xive.c | 1 + hw/intc/xics.c | 1 + hw/intc/xive.c | 1 + hw/intc/xlnx-pmu-iomod-intc.c | 1 + hw/intc/xlnx-zynqmp-ipi.c | 1 + 26 files changed, 27 insertions(+) (limited to 'hw/intc') diff --git a/hw/intc/allwinner-a10-pic.c b/hw/intc/allwinner-a10-pic.c index 9df3e18..79959a4 100644 --- a/hw/intc/allwinner-a10-pic.c +++ b/hw/intc/allwinner-a10-pic.c @@ -17,6 +17,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "sysemu/sysemu.h" #include "hw/intc/allwinner-a10-pic.h" #include "hw/irq.h" diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index 7045761..fbb6e25 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -32,6 +32,7 @@ #include "hw/qdev.h" #include "hw/sysbus.h" #include "migration/qemu-file-types.h" +#include "migration/vmstate.h" static int apic_irq_delivered; bool apic_report_tpr_access; diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index ccc50d0..5d506be 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -23,6 +23,7 @@ #include "qemu/module.h" #include "gic_internal.h" #include "hw/arm/linux-boot-if.h" +#include "migration/vmstate.h" static int gic_pre_save(void *opaque) { diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index 5edabb9..12479f9 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -26,6 +26,7 @@ #include "qemu/module.h" #include "qom/cpu.h" #include "hw/intc/arm_gicv3_common.h" +#include "migration/vmstate.h" #include "gicv3_internal.h" #include "hw/arm/linux-boot-if.h" #include "sysemu/kvm.h" diff --git a/hw/intc/arm_gicv3_its_common.c b/hw/intc/arm_gicv3_its_common.c index efb3d51..66c4c6a 100644 --- a/hw/intc/arm_gicv3_its_common.c +++ b/hw/intc/arm_gicv3_its_common.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "hw/pci/msi.h" +#include "migration/vmstate.h" #include "hw/intc/arm_gicv3_its_common.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 69670a2..0c7fc70 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -14,6 +14,7 @@ #include "qapi/error.h" #include "cpu.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "qemu/timer.h" #include "hw/intc/armv7m_nvic.h" #include "hw/irq.h" diff --git a/hw/intc/aspeed_vic.c b/hw/intc/aspeed_vic.c index e17343c..5ba06c5 100644 --- a/hw/intc/aspeed_vic.c +++ b/hw/intc/aspeed_vic.c @@ -30,6 +30,7 @@ #include "qemu/osdep.h" #include "hw/intc/aspeed_vic.h" #include "hw/irq.h" +#include "migration/vmstate.h" #include "qemu/bitops.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c index 20db52b..05bd28e 100644 --- a/hw/intc/bcm2835_ic.c +++ b/hw/intc/bcm2835_ic.c @@ -15,6 +15,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2835_ic.h" #include "hw/irq.h" +#include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c index a983fe5..04229b8 100644 --- a/hw/intc/bcm2836_control.c +++ b/hw/intc/bcm2836_control.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "hw/intc/bcm2836_control.h" #include "hw/irq.h" +#include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index ed55811..3b49ce4 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -29,6 +29,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "qemu/module.h" #include "hw/arm/exynos4210.h" diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index e37d457..7fa4583 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "qemu/module.h" #include "hw/irq.h" #include "hw/arm/exynos4210.h" diff --git a/hw/intc/heathrow_pic.c b/hw/intc/heathrow_pic.c index ac1f7c0..572e911 100644 --- a/hw/intc/heathrow_pic.c +++ b/hw/intc/heathrow_pic.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" #include "hw/ppc/mac.h" +#include "migration/vmstate.h" #include "qemu/module.h" #include "hw/intc/heathrow_pic.h" #include "hw/irq.h" diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index c75c880..c7ff2b3 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -22,9 +22,11 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN * THE SOFTWARE. */ + #include "qemu/osdep.h" #include "hw/i386/pc.h" #include "hw/isa/i8259_internal.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" static int irq_level[16]; diff --git a/hw/intc/imx_avic.c b/hw/intc/imx_avic.c index 022ed05..63fc602 100644 --- a/hw/intc/imx_avic.c +++ b/hw/intc/imx_avic.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "hw/intc/imx_avic.h" #include "hw/irq.h" +#include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/imx_gpcv2.c b/hw/intc/imx_gpcv2.c index a83333b..17007a4 100644 --- a/hw/intc/imx_gpcv2.c +++ b/hw/intc/imx_gpcv2.c @@ -11,6 +11,7 @@ #include "qemu/osdep.h" #include "hw/intc/imx_gpcv2.h" +#include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/ioapic_common.c b/hw/intc/ioapic_common.c index fa50382..5538b5b 100644 --- a/hw/intc/ioapic_common.c +++ b/hw/intc/ioapic_common.c @@ -22,6 +22,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "hw/i386/ioapic.h" #include "hw/i386/ioapic_internal.h" diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c index c133d30..4df4eef 100644 --- a/hw/intc/lm32_pic.c +++ b/hw/intc/lm32_pic.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "hw/hw.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "qemu/module.h" #include "hw/sysbus.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 31004ac..77591f8 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -13,6 +13,7 @@ #include "hw/hw.h" #include "hw/irq.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "exec/memory.h" #define TYPE_OR1K_OMPIC "or1k-ompic" diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 49d64bc..bb869ca 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -42,6 +42,7 @@ #include "hw/ppc/openpic.h" #include "hw/ppc/ppc_e500.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "hw/pci/msi.h" #include "qapi/error.h" #include "qemu/bitops.h" diff --git a/hw/intc/pl190.c b/hw/intc/pl190.c index 1a5e760..e3bd3dd 100644 --- a/hw/intc/pl190.c +++ b/hw/intc/pl190.c @@ -10,6 +10,7 @@ #include "qemu/osdep.h" #include "hw/irq.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/slavio_intctl.c b/hw/intc/slavio_intctl.c index e97afca..c4cf909 100644 --- a/hw/intc/slavio_intctl.c +++ b/hw/intc/slavio_intctl.c @@ -23,6 +23,7 @@ */ #include "qemu/osdep.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "qemu/module.h" #include "hw/sysbus.h" diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 2e39cc1..2fdd680 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -15,6 +15,7 @@ #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/reset.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "hw/ppc/fdt.h" #include "hw/ppc/spapr.h" diff --git a/hw/intc/xics.c b/hw/intc/xics.c index beb37b1..41da9b3 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -35,6 +35,7 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "qapi/visitor.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "hw/intc/intc.h" #include "hw/irq.h" diff --git a/hw/intc/xive.c b/hw/intc/xive.c index 9dcbe8b..7a6e4b7 100644 --- a/hw/intc/xive.c +++ b/hw/intc/xive.c @@ -16,6 +16,7 @@ #include "sysemu/dma.h" #include "sysemu/reset.h" #include "hw/qdev-properties.h" +#include "migration/vmstate.h" #include "monitor/monitor.h" #include "hw/irq.h" #include "hw/ppc/xive.h" diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c index 9fcd17c..f2ba9b4 100644 --- a/hw/intc/xlnx-pmu-iomod-intc.c +++ b/hw/intc/xlnx-pmu-iomod-intc.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "hw/register.h" #include "qemu/bitops.h" #include "qemu/log.h" diff --git a/hw/intc/xlnx-zynqmp-ipi.c b/hw/intc/xlnx-zynqmp-ipi.c index 43a1b789..adc1179 100644 --- a/hw/intc/xlnx-zynqmp-ipi.c +++ b/hw/intc/xlnx-zynqmp-ipi.c @@ -27,6 +27,7 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" +#include "migration/vmstate.h" #include "hw/register.h" #include "qemu/bitops.h" #include "qemu/log.h" -- cgit v1.1 From 650d103d3ea959212f826acb9d3fe80cf30e347b Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:48 +0200 Subject: Include hw/hw.h exactly where needed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing hw/hw.h triggers a recompile of some 2600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). The previous commits have left only the declaration of hw_error() in hw/hw.h. This permits dropping most of its inclusions. Touching it now recompiles less than 200 objects. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Message-Id: <20190812052359.30071-19-armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/intc/etraxfs_pic.c | 1 - hw/intc/exynos4210_combiner.c | 1 + hw/intc/heathrow_pic.c | 1 - hw/intc/i8259.c | 1 - hw/intc/ioapic.c | 1 - hw/intc/lm32_pic.c | 1 - hw/intc/mips_gic.c | 1 - hw/intc/omap_intc.c | 1 - hw/intc/ompic.c | 1 - hw/intc/openpic.c | 1 - hw/intc/openpic_kvm.c | 1 - hw/intc/sh_intc.c | 1 - hw/intc/xics.c | 1 - hw/intc/xics_kvm.c | 1 - hw/intc/xics_spapr.c | 1 - hw/intc/xilinx_intc.c | 1 - 16 files changed, 1 insertion(+), 15 deletions(-) (limited to 'hw/intc') diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c index dc72dd5..88d3b0c 100644 --- a/hw/intc/etraxfs_pic.c +++ b/hw/intc/etraxfs_pic.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "qemu/module.h" -#include "hw/hw.h" #include "hw/irq.h" //#include "pc.h" //#include "etraxfs.h" diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 3b49ce4..833e164 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -33,6 +33,7 @@ #include "qemu/module.h" #include "hw/arm/exynos4210.h" +#include "hw/hw.h" #include "hw/irq.h" //#define DEBUG_COMBINER diff --git a/hw/intc/heathrow_pic.c b/hw/intc/heathrow_pic.c index 572e911..cb97c31 100644 --- a/hw/intc/heathrow_pic.c +++ b/hw/intc/heathrow_pic.c @@ -24,7 +24,6 @@ */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/ppc/mac.h" #include "migration/vmstate.h" #include "qemu/module.h" diff --git a/hw/intc/i8259.c b/hw/intc/i8259.c index e581e6b..211a989 100644 --- a/hw/intc/i8259.c +++ b/hw/intc/i8259.c @@ -23,7 +23,6 @@ */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/irq.h" #include "hw/isa/isa.h" diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index e99c37c..c346f50 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -23,7 +23,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "monitor/monitor.h" -#include "hw/hw.h" #include "hw/i386/pc.h" #include "hw/i386/apic.h" #include "hw/i386/ioapic.h" diff --git a/hw/intc/lm32_pic.c b/hw/intc/lm32_pic.c index 4df4eef..36de670 100644 --- a/hw/intc/lm32_pic.c +++ b/hw/intc/lm32_pic.c @@ -19,7 +19,6 @@ #include "qemu/osdep.h" -#include "hw/hw.h" #include "migration/vmstate.h" #include "monitor/monitor.h" #include "qemu/module.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 166eb6e..6b4322b 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -13,7 +13,6 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/sysbus.h" #include "exec/memory.h" #include "sysemu/sysemu.h" diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c index 4b3ddc0..f740578 100644 --- a/hw/intc/omap_intc.c +++ b/hw/intc/omap_intc.c @@ -19,7 +19,6 @@ */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/arm/omap.h" #include "hw/sysbus.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 77591f8..8a4a422 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -10,7 +10,6 @@ #include "qemu/log.h" #include "qemu/module.h" #include "qapi/error.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/sysbus.h" #include "migration/vmstate.h" diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index bb869ca..312ac54 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -35,7 +35,6 @@ */ #include "qemu/osdep.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/ppc/mac.h" #include "hw/pci/pci.h" diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index 49fc6fa..e91910b 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -27,7 +27,6 @@ #include "cpu.h" #include #include "exec/address-spaces.h" -#include "hw/hw.h" #include "hw/ppc/openpic.h" #include "hw/ppc/openpic_kvm.h" #include "hw/pci/msi.h" diff --git a/hw/intc/sh_intc.c b/hw/intc/sh_intc.c index 6252150..72a55e3 100644 --- a/hw/intc/sh_intc.c +++ b/hw/intc/sh_intc.c @@ -11,7 +11,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "hw/sh4/sh_intc.h" -#include "hw/hw.h" #include "hw/irq.h" #include "hw/sh4/sh.h" diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 41da9b3..88709d4 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -28,7 +28,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "cpu.h" -#include "hw/hw.h" #include "trace.h" #include "qemu/timer.h" #include "hw/ppc/xics.h" diff --git a/hw/intc/xics_kvm.c b/hw/intc/xics_kvm.c index 65c35f9..a4d2e87 100644 --- a/hw/intc/xics_kvm.c +++ b/hw/intc/xics_kvm.c @@ -29,7 +29,6 @@ #include "qapi/error.h" #include "qemu-common.h" #include "cpu.h" -#include "hw/hw.h" #include "trace.h" #include "sysemu/kvm.h" #include "hw/ppc/spapr.h" diff --git a/hw/intc/xics_spapr.c b/hw/intc/xics_spapr.c index 7cd3c93..6577be0 100644 --- a/hw/intc/xics_spapr.c +++ b/hw/intc/xics_spapr.c @@ -27,7 +27,6 @@ #include "qemu/osdep.h" #include "cpu.h" -#include "hw/hw.h" #include "trace.h" #include "qemu/timer.h" #include "hw/ppc/spapr.h" diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index baf5353..3a5c7f8 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -25,7 +25,6 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "qemu/module.h" -#include "hw/hw.h" #include "hw/irq.h" #define D(x) -- cgit v1.1 From db725815985654007ade0fd53590d613fd657208 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:50 +0200 Subject: Include qemu/main-loop.h less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing qemu/main-loop.h triggers a recompile of some 5600 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). It includes block/aio.h, which in turn includes qemu/event_notifier.h, qemu/notify.h, qemu/processor.h, qemu/qsp.h, qemu/queue.h, qemu/thread-posix.h, qemu/thread.h, qemu/timer.h, and a few more. Include qemu/main-loop.h only where it's needed. Touching it now recompiles only some 1700 objects. For block/aio.h and qemu/event_notifier.h, these numbers drop from 5600 to 2800. For the others, they shrink only slightly. Signed-off-by: Markus Armbruster Message-Id: <20190812052359.30071-21-armbru@redhat.com> Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé --- hw/intc/s390_flic.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/intc') diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index d0be755..a1b28e7 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -12,6 +12,7 @@ #include "qemu/osdep.h" #include "qemu/error-report.h" +#include "qemu/main-loop.h" #include "qemu/module.h" #include "hw/sysbus.h" #include "hw/s390x/ioinst.h" -- cgit v1.1 From a27bd6c779badb8d76e4430d810ef710a1b98f4e Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:51 +0200 Subject: Include hw/qdev-properties.h less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing hw/qdev-properties.h triggers a recompile of some 2700 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). Many places including hw/qdev-properties.h (directly or via hw/qdev.h) actually need only hw/qdev-core.h. Include hw/qdev-core.h there instead. hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h and hw/qdev-properties.h, which in turn includes hw/qdev-core.h. Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h. While there, delete a few superfluous inclusions of hw/qdev-core.h. Touching hw/qdev-properties.h now recompiles some 1200 objects. Cc: Paolo Bonzini Cc: "Daniel P. Berrangé" Cc: Eduardo Habkost Signed-off-by: Markus Armbruster Reviewed-by: Eduardo Habkost Message-Id: <20190812052359.30071-22-armbru@redhat.com> --- hw/intc/apic_common.c | 2 +- hw/intc/arm_gic_common.c | 1 + hw/intc/arm_gicv2m.c | 1 + hw/intc/arm_gicv3_common.c | 1 + hw/intc/arm_gicv3_its_kvm.c | 1 + hw/intc/armv7m_nvic.c | 1 + hw/intc/etraxfs_pic.c | 1 + hw/intc/exynos4210_combiner.c | 1 + hw/intc/exynos4210_gic.c | 1 + hw/intc/grlib_irqmp.c | 1 + hw/intc/i8259_common.c | 1 + hw/intc/ioapic.c | 1 + hw/intc/mips_gic.c | 1 + hw/intc/omap_intc.c | 1 + hw/intc/ompic.c | 1 + hw/intc/openpic.c | 1 + hw/intc/openpic_kvm.c | 1 + hw/intc/pnv_xive.c | 1 + hw/intc/realview_gic.c | 1 + hw/intc/s390_flic.c | 2 +- hw/intc/spapr_xive.c | 1 + hw/intc/xics.c | 1 + hw/intc/xilinx_intc.c | 1 + hw/intc/xlnx-pmu-iomod-intc.c | 1 + 24 files changed, 24 insertions(+), 2 deletions(-) (limited to 'hw/intc') diff --git a/hw/intc/apic_common.c b/hw/intc/apic_common.c index fbb6e25..aafd8e0 100644 --- a/hw/intc/apic_common.c +++ b/hw/intc/apic_common.c @@ -29,7 +29,7 @@ #include "trace.h" #include "sysemu/hax.h" #include "sysemu/kvm.h" -#include "hw/qdev.h" +#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/qemu-file-types.h" #include "migration/vmstate.h" diff --git a/hw/intc/arm_gic_common.c b/hw/intc/arm_gic_common.c index 5d506be..f0d0d7c 100644 --- a/hw/intc/arm_gic_common.c +++ b/hw/intc/arm_gic_common.c @@ -23,6 +23,7 @@ #include "qemu/module.h" #include "gic_internal.h" #include "hw/arm/linux-boot-if.h" +#include "hw/qdev-properties.h" #include "migration/vmstate.h" static int gic_pre_save(void *opaque) diff --git a/hw/intc/arm_gicv2m.c b/hw/intc/arm_gicv2m.c index 2c96d4f..6e45f4f 100644 --- a/hw/intc/arm_gicv2m.c +++ b/hw/intc/arm_gicv2m.c @@ -30,6 +30,7 @@ #include "hw/sysbus.h" #include "hw/irq.h" #include "hw/pci/msi.h" +#include "hw/qdev-properties.h" #include "sysemu/kvm.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c index 12479f9..8f5f4c8 100644 --- a/hw/intc/arm_gicv3_common.c +++ b/hw/intc/arm_gicv3_common.c @@ -26,6 +26,7 @@ #include "qemu/module.h" #include "qom/cpu.h" #include "hw/intc/arm_gicv3_common.h" +#include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "gicv3_internal.h" #include "hw/arm/linux-boot-if.h" diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index 52ac01a..d0bd4f1 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_kvm.c @@ -22,6 +22,7 @@ #include "qapi/error.h" #include "qemu/module.h" #include "hw/intc/arm_gicv3_its_common.h" +#include "hw/qdev-properties.h" #include "sysemu/sysemu.h" #include "sysemu/kvm.h" #include "kvm_arm.h" diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 0c7fc70..62ab8b7 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -18,6 +18,7 @@ #include "qemu/timer.h" #include "hw/intc/armv7m_nvic.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #include "target/arm/cpu.h" #include "exec/exec-all.h" #include "qemu/log.h" diff --git a/hw/intc/etraxfs_pic.c b/hw/intc/etraxfs_pic.c index 88d3b0c..77f652a 100644 --- a/hw/intc/etraxfs_pic.c +++ b/hw/intc/etraxfs_pic.c @@ -26,6 +26,7 @@ #include "hw/sysbus.h" #include "qemu/module.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" //#include "pc.h" //#include "etraxfs.h" diff --git a/hw/intc/exynos4210_combiner.c b/hw/intc/exynos4210_combiner.c index 833e164..5b33ca6 100644 --- a/hw/intc/exynos4210_combiner.c +++ b/hw/intc/exynos4210_combiner.c @@ -35,6 +35,7 @@ #include "hw/arm/exynos4210.h" #include "hw/hw.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" //#define DEBUG_COMBINER diff --git a/hw/intc/exynos4210_gic.c b/hw/intc/exynos4210_gic.c index 7fa4583..a1b699b 100644 --- a/hw/intc/exynos4210_gic.c +++ b/hw/intc/exynos4210_gic.c @@ -25,6 +25,7 @@ #include "migration/vmstate.h" #include "qemu/module.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #include "hw/arm/exynos4210.h" enum ExtGicId { diff --git a/hw/intc/grlib_irqmp.c b/hw/intc/grlib_irqmp.c index 21c77a5..bc78e1a 100644 --- a/hw/intc/grlib_irqmp.c +++ b/hw/intc/grlib_irqmp.c @@ -28,6 +28,7 @@ #include "hw/sysbus.h" #include "cpu.h" +#include "hw/qdev-properties.h" #include "hw/sparc/grlib.h" #include "trace.h" diff --git a/hw/intc/i8259_common.c b/hw/intc/i8259_common.c index c7ff2b3..bd37bb5 100644 --- a/hw/intc/i8259_common.c +++ b/hw/intc/i8259_common.c @@ -26,6 +26,7 @@ #include "qemu/osdep.h" #include "hw/i386/pc.h" #include "hw/isa/i8259_internal.h" +#include "hw/qdev-properties.h" #include "migration/vmstate.h" #include "monitor/monitor.h" diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index c346f50..dddd231 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -28,6 +28,7 @@ #include "hw/i386/ioapic.h" #include "hw/i386/ioapic_internal.h" #include "hw/pci/msi.h" +#include "hw/qdev-properties.h" #include "sysemu/kvm.h" #include "hw/i386/apic-msidef.h" #include "hw/i386/x86-iommu.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 6b4322b..524cc3c 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -21,6 +21,7 @@ #include "kvm_mips.h" #include "hw/intc/mips_gic.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" static void mips_gic_set_vp_irq(MIPSGICState *gic, int vp, int pin) { diff --git a/hw/intc/omap_intc.c b/hw/intc/omap_intc.c index f740578..854b709 100644 --- a/hw/intc/omap_intc.c +++ b/hw/intc/omap_intc.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #include "hw/arm/omap.h" #include "hw/sysbus.h" #include "qemu/error-report.h" diff --git a/hw/intc/ompic.c b/hw/intc/ompic.c index 8a4a422..ca9614f 100644 --- a/hw/intc/ompic.c +++ b/hw/intc/ompic.c @@ -11,6 +11,7 @@ #include "qemu/module.h" #include "qapi/error.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "exec/memory.h" diff --git a/hw/intc/openpic.c b/hw/intc/openpic.c index 312ac54..c797ba7 100644 --- a/hw/intc/openpic.c +++ b/hw/intc/openpic.c @@ -40,6 +40,7 @@ #include "hw/pci/pci.h" #include "hw/ppc/openpic.h" #include "hw/ppc/ppc_e500.h" +#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "migration/vmstate.h" #include "hw/pci/msi.h" diff --git a/hw/intc/openpic_kvm.c b/hw/intc/openpic_kvm.c index e91910b..c09bebe 100644 --- a/hw/intc/openpic_kvm.c +++ b/hw/intc/openpic_kvm.c @@ -30,6 +30,7 @@ #include "hw/ppc/openpic.h" #include "hw/ppc/openpic_kvm.h" #include "hw/pci/msi.h" +#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "sysemu/kvm.h" #include "qemu/log.h" diff --git a/hw/intc/pnv_xive.c b/hw/intc/pnv_xive.c index 63b0f46..a8caf25 100644 --- a/hw/intc/pnv_xive.c +++ b/hw/intc/pnv_xive.c @@ -22,6 +22,7 @@ #include "hw/ppc/pnv_xscom.h" #include "hw/ppc/pnv_xive.h" #include "hw/ppc/xive_regs.h" +#include "hw/qdev-properties.h" #include "hw/ppc/ppc.h" #include diff --git a/hw/intc/realview_gic.c b/hw/intc/realview_gic.c index ac22a2a..73fe8cd 100644 --- a/hw/intc/realview_gic.c +++ b/hw/intc/realview_gic.c @@ -12,6 +12,7 @@ #include "qemu/module.h" #include "hw/intc/realview_gic.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" static void realview_gic_set_irq(void *opaque, int irq, int level) { diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c index a1b28e7..a159c0c 100644 --- a/hw/intc/s390_flic.c +++ b/hw/intc/s390_flic.c @@ -17,10 +17,10 @@ #include "hw/sysbus.h" #include "hw/s390x/ioinst.h" #include "hw/s390x/s390_flic.h" +#include "hw/qdev-properties.h" #include "hw/s390x/css.h" #include "trace.h" #include "cpu.h" -#include "hw/qdev.h" #include "qapi/error.h" #include "hw/s390x/s390-virtio-ccw.h" diff --git a/hw/intc/spapr_xive.c b/hw/intc/spapr_xive.c index 2fdd680..aad981c 100644 --- a/hw/intc/spapr_xive.c +++ b/hw/intc/spapr_xive.c @@ -23,6 +23,7 @@ #include "hw/ppc/spapr_xive.h" #include "hw/ppc/xive.h" #include "hw/ppc/xive_regs.h" +#include "hw/qdev-properties.h" /* * XIVE Virtualization Controller BAR and Thread Managment BAR that we diff --git a/hw/intc/xics.c b/hw/intc/xics.c index 88709d4..b2fca29 100644 --- a/hw/intc/xics.c +++ b/hw/intc/xics.c @@ -31,6 +31,7 @@ #include "trace.h" #include "qemu/timer.h" #include "hw/ppc/xics.h" +#include "hw/qdev-properties.h" #include "qemu/error-report.h" #include "qemu/module.h" #include "qapi/visitor.h" diff --git a/hw/intc/xilinx_intc.c b/hw/intc/xilinx_intc.c index 3a5c7f8..e15cb42 100644 --- a/hw/intc/xilinx_intc.c +++ b/hw/intc/xilinx_intc.c @@ -26,6 +26,7 @@ #include "hw/sysbus.h" #include "qemu/module.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #define D(x) diff --git a/hw/intc/xlnx-pmu-iomod-intc.c b/hw/intc/xlnx-pmu-iomod-intc.c index f2ba9b4..f9a1401 100644 --- a/hw/intc/xlnx-pmu-iomod-intc.c +++ b/hw/intc/xlnx-pmu-iomod-intc.c @@ -33,6 +33,7 @@ #include "qemu/module.h" #include "hw/intc/xlnx-pmu-iomod-intc.h" #include "hw/irq.h" +#include "hw/qdev-properties.h" #ifndef XLNX_PMU_IO_INTC_ERR_DEBUG #define XLNX_PMU_IO_INTC_ERR_DEBUG 0 -- cgit v1.1 From d5938f29fea29581725426f203a74da746ca03e7 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:56 +0200 Subject: Clean up inclusion of sysemu/sysemu.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing sysemu/sysemu.h triggers a recompile of some 5400 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h). Almost a third of its inclusions are actually superfluous. Delete them. Downgrade two more to qapi/qapi-types-run-state.h, and move one from char/serial.h to char/serial.c. hw/semihosting/config.c, monitor/monitor.c, qdev-monitor.c, and stubs/semihost.c define variables declared in sysemu/sysemu.h without including it. The compiler is cool with that, but include it anyway. This doesn't reduce actual use much, as it's still included into widely included headers. The next commit will tackle that. Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Message-Id: <20190812052359.30071-27-armbru@redhat.com> Reviewed-by: Alex Bennée --- hw/intc/allwinner-a10-pic.c | 1 - hw/intc/mips_gic.c | 1 - hw/intc/xics_pnv.c | 1 - 3 files changed, 3 deletions(-) (limited to 'hw/intc') diff --git a/hw/intc/allwinner-a10-pic.c b/hw/intc/allwinner-a10-pic.c index 79959a4..8cca124 100644 --- a/hw/intc/allwinner-a10-pic.c +++ b/hw/intc/allwinner-a10-pic.c @@ -18,7 +18,6 @@ #include "qemu/osdep.h" #include "hw/sysbus.h" #include "migration/vmstate.h" -#include "sysemu/sysemu.h" #include "hw/intc/allwinner-a10-pic.h" #include "hw/irq.h" #include "qemu/log.h" diff --git a/hw/intc/mips_gic.c b/hw/intc/mips_gic.c index 524cc3c..54b3059 100644 --- a/hw/intc/mips_gic.c +++ b/hw/intc/mips_gic.c @@ -15,7 +15,6 @@ #include "qapi/error.h" #include "hw/sysbus.h" #include "exec/memory.h" -#include "sysemu/sysemu.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" #include "kvm_mips.h" diff --git a/hw/intc/xics_pnv.c b/hw/intc/xics_pnv.c index 67f2702..35f3811 100644 --- a/hw/intc/xics_pnv.c +++ b/hw/intc/xics_pnv.c @@ -19,7 +19,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "sysemu/sysemu.h" #include "qemu/log.h" #include "qemu/module.h" #include "hw/ppc/xics.h" -- cgit v1.1 From 46517dd4971fc1fdd5b379e72cc377626ad98160 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:57 +0200 Subject: Include sysemu/sysemu.h a lot less MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In my "build everything" tree, changing sysemu/sysemu.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/qdev-core.h includes sysemu/sysemu.h since recent commit e965ffa70a "qdev: add qdev_add_vm_change_state_handler()". This is a bad idea: hw/qdev-core.h is widely included. Move the declaration of qdev_add_vm_change_state_handler() to sysemu/sysemu.h, and drop the problematic include from hw/qdev-core.h. Touching sysemu/sysemu.h now recompiles some 1800 objects. qemu/uuid.h also drops from 5400 to 1800. A few more headers show smaller improvement: qemu/notify.h drops from 5600 to 5200, qemu/timer.h from 5600 to 4500, and qapi/qapi-types-run-state.h from 5500 to 5000. Cc: Stefan Hajnoczi Signed-off-by: Markus Armbruster Reviewed-by: Alistair Francis Reviewed-by: Stefan Hajnoczi Message-Id: <20190812052359.30071-28-armbru@redhat.com> Reviewed-by: Alex Bennée --- hw/intc/ioapic.c | 1 + 1 file changed, 1 insertion(+) (limited to 'hw/intc') diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c index dddd231..1ede055 100644 --- a/hw/intc/ioapic.c +++ b/hw/intc/ioapic.c @@ -30,6 +30,7 @@ #include "hw/pci/msi.h" #include "hw/qdev-properties.h" #include "sysemu/kvm.h" +#include "sysemu/sysemu.h" #include "hw/i386/apic-msidef.h" #include "hw/i386/x86-iommu.h" #include "trace.h" -- cgit v1.1 From 54d31236b906c8f03eb011717de7bc47000720c3 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Mon, 12 Aug 2019 07:23:59 +0200 Subject: sysemu: Split sysemu/runstate.h off sysemu/sysemu.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit sysemu/sysemu.h is a rather unfocused dumping ground for stuff related to the system-emulator. Evidence: * It's included widely: in my "build everything" tree, changing sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600 objects (not counting tests and objects that don't depend on qemu/osdep.h, down from 5400 due to the previous two commits). * It pulls in more than a dozen additional headers. Split stuff related to run state management into its own header sysemu/runstate.h. Touching sysemu/sysemu.h now recompiles some 850 objects. qemu/uuid.h also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400 to 4200. Touching new sysemu/runstate.h recompiles some 500 objects. Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also add qemu/main-loop.h. Suggested-by: Paolo Bonzini Signed-off-by: Markus Armbruster Message-Id: <20190812052359.30071-30-armbru@redhat.com> Reviewed-by: Alex Bennée [Unbreak OS-X build] --- hw/intc/arm_gicv3_its_kvm.c | 2 +- hw/intc/arm_gicv3_kvm.c | 2 +- hw/intc/spapr_xive_kvm.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) (limited to 'hw/intc') diff --git a/hw/intc/arm_gicv3_its_kvm.c b/hw/intc/arm_gicv3_its_kvm.c index d0bd4f1..d66f243 100644 --- a/hw/intc/arm_gicv3_its_kvm.c +++ b/hw/intc/arm_gicv3_its_kvm.c @@ -23,7 +23,7 @@ #include "qemu/module.h" #include "hw/intc/arm_gicv3_its_common.h" #include "hw/qdev-properties.h" -#include "sysemu/sysemu.h" +#include "sysemu/runstate.h" #include "sysemu/kvm.h" #include "kvm_arm.h" #include "migration/blocker.h" diff --git a/hw/intc/arm_gicv3_kvm.c b/hw/intc/arm_gicv3_kvm.c index d9c72f8..9c7f4ab 100644 --- a/hw/intc/arm_gicv3_kvm.c +++ b/hw/intc/arm_gicv3_kvm.c @@ -26,7 +26,7 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "sysemu/kvm.h" -#include "sysemu/sysemu.h" +#include "sysemu/runstate.h" #include "kvm_arm.h" #include "gicv3_internal.h" #include "vgic_common.h" diff --git a/hw/intc/spapr_xive_kvm.c b/hw/intc/spapr_xive_kvm.c index 8898615..17af4d1 100644 --- a/hw/intc/spapr_xive_kvm.c +++ b/hw/intc/spapr_xive_kvm.c @@ -14,6 +14,7 @@ #include "target/ppc/cpu.h" #include "sysemu/cpus.h" #include "sysemu/kvm.h" +#include "sysemu/runstate.h" #include "hw/ppc/spapr.h" #include "hw/ppc/spapr_cpu_core.h" #include "hw/ppc/spapr_xive.h" -- cgit v1.1