Skip to content

Commit

Permalink
Include hw/qdev-properties.h less
Browse files Browse the repository at this point in the history
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 <pbonzini@redhat.com>
Cc: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20190812052359.30071-22-armbru@redhat.com>
  • Loading branch information
Markus Armbruster committed Aug 16, 2019
1 parent db72581 commit a27bd6c
Show file tree
Hide file tree
Showing 497 changed files with 461 additions and 117 deletions.
1 change: 0 additions & 1 deletion backends/vhost-user.c
Expand Up @@ -12,7 +12,6 @@


#include "qemu/osdep.h"
#include "hw/qdev.h"
#include "qapi/error.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions hw/9pfs/virtio-9p-device.c
Expand Up @@ -17,6 +17,7 @@
#include "virtio-9p.h"
#include "fsdev/qemu-fsdev.h"
#include "coth.h"
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-access.h"
#include "qemu/iov.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions hw/acpi/piix4.c
Expand Up @@ -25,6 +25,7 @@
#include "hw/isa/apm.h"
#include "hw/i2c/pm_smbus.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "hw/acpi/acpi.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/acpi/vmgenid.c
Expand Up @@ -18,6 +18,7 @@
#include "hw/acpi/aml-build.h"
#include "hw/acpi/vmgenid.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/armv7m.c
Expand Up @@ -14,6 +14,7 @@
#include "hw/sysbus.h"
#include "hw/arm/boot.h"
#include "hw/loader.h"
#include "hw/qdev-properties.h"
#include "elf.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/aspeed.c
Expand Up @@ -20,6 +20,7 @@
#include "hw/i2c/smbus_eeprom.h"
#include "hw/misc/pca9552.h"
#include "hw/misc/tmp105.h"
#include "hw/qdev-properties.h"
#include "qemu/log.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/digic.c
Expand Up @@ -24,6 +24,7 @@
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/arm/digic.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"

#define DIGIC4_TIMER_BASE(n) (0xc0210000 + (n) * 0x100)
Expand Down
1 change: 1 addition & 0 deletions hw/arm/exynos4210.c
Expand Up @@ -32,6 +32,7 @@
#include "hw/sysbus.h"
#include "hw/arm/boot.h"
#include "hw/loader.h"
#include "hw/qdev-properties.h"
#include "hw/arm/exynos4210.h"
#include "hw/sd/sdhci.h"
#include "hw/usb/hcd-ehci.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/exynos4_boards.c
Expand Up @@ -33,6 +33,7 @@
#include "exec/address-spaces.h"
#include "hw/arm/exynos4210.h"
#include "hw/net/lan9118.h"
#include "hw/qdev-properties.h"
#include "hw/boards.h"
#include "hw/irq.h"

Expand Down
1 change: 1 addition & 0 deletions hw/arm/fsl-imx25.c
Expand Up @@ -29,6 +29,7 @@
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "chardev/char.h"

static void fsl_imx25_init(Object *obj)
Expand Down
1 change: 1 addition & 0 deletions hw/arm/fsl-imx31.c
Expand Up @@ -26,6 +26,7 @@
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "chardev/char.h"

static void fsl_imx31_init(Object *obj)
Expand Down
1 change: 1 addition & 0 deletions hw/arm/fsl-imx6.c
Expand Up @@ -23,6 +23,7 @@
#include "qapi/error.h"
#include "hw/arm/fsl-imx6.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "chardev/char.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/mcimx6ul-evk.c
Expand Up @@ -14,6 +14,7 @@
#include "qapi/error.h"
#include "hw/arm/fsl-imx6ul.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/mcimx7d-sabre.c
Expand Up @@ -16,6 +16,7 @@
#include "qapi/error.h"
#include "hw/arm/fsl-imx7.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/microbit.c
Expand Up @@ -17,6 +17,7 @@

#include "hw/arm/nrf51_soc.h"
#include "hw/i2c/microbit_i2c.h"
#include "hw/qdev-properties.h"

typedef struct {
MachineState parent;
Expand Down
1 change: 1 addition & 0 deletions hw/arm/msf2-som.c
Expand Up @@ -27,6 +27,7 @@
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "hw/arm/boot.h"
#include "exec/address-spaces.h"
#include "hw/arm/msf2-soc.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/musicpal.c
Expand Up @@ -22,6 +22,7 @@
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "hw/qdev-properties.h"
#include "hw/block/flash.h"
#include "ui/console.h"
#include "hw/i2c/i2c.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/netduino2.c
Expand Up @@ -25,6 +25,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"
#include "hw/arm/stm32f205_soc.h"
#include "hw/arm/boot.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/nseries.c
Expand Up @@ -35,6 +35,7 @@
#include "hw/input/tsc2xxx.h"
#include "hw/misc/cbus.h"
#include "hw/misc/tmp105.h"
#include "hw/qdev-properties.h"
#include "hw/block/flash.h"
#include "hw/hw.h"
#include "hw/bt.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/omap1.c
Expand Up @@ -26,6 +26,7 @@
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/arm/boot.h"
#include "hw/arm/omap.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/omap2.c
Expand Up @@ -26,6 +26,7 @@
#include "sysemu/reset.h"
#include "hw/boards.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/arm/boot.h"
#include "hw/arm/omap.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/pxa2xx.c
Expand Up @@ -20,6 +20,7 @@
#include "hw/char/serial.h"
#include "hw/i2c/i2c.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/ssi/ssi.h"
#include "chardev/char-fe.h"
#include "sysemu/blockdev.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/pxa2xx_gpio.c
Expand Up @@ -11,6 +11,7 @@
#include "cpu.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/arm/pxa.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/sabrelite.c
Expand Up @@ -14,6 +14,7 @@
#include "qapi/error.h"
#include "hw/arm/fsl-imx6.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/sbsa-ref.c
Expand Up @@ -36,6 +36,7 @@
#include "hw/intc/arm_gicv3_common.h"
#include "hw/loader.h"
#include "hw/pci-host/gpex.h"
#include "hw/qdev-properties.h"
#include "hw/usb.h"
#include "net/net.h"

Expand Down
1 change: 1 addition & 0 deletions hw/arm/spitz.c
Expand Up @@ -16,6 +16,7 @@
#include "hw/arm/boot.h"
#include "sysemu/sysemu.h"
#include "hw/pcmcia.h"
#include "hw/qdev-properties.h"
#include "hw/i2c/i2c.h"
#include "hw/irq.h"
#include "hw/ssi/ssi.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/stm32f205_soc.c
Expand Up @@ -28,6 +28,7 @@
#include "hw/arm/boot.h"
#include "exec/address-spaces.h"
#include "hw/arm/stm32f205_soc.h"
#include "hw/qdev-properties.h"

/* At the moment only Timer 2 to 5 are modelled */
static const uint32_t timer_addr[STM_NUM_TIMERS] = { 0x40000000, 0x40000400,
Expand Down
1 change: 1 addition & 0 deletions hw/arm/strongarm.c
Expand Up @@ -32,6 +32,7 @@
#include "cpu.h"
#include "hw/boards.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "strongarm.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/virt.c
Expand Up @@ -54,6 +54,7 @@
#include "hw/pci-host/gpex.h"
#include "hw/arm/sysbus-fdt.h"
#include "hw/platform-bus.h"
#include "hw/qdev-properties.h"
#include "hw/arm/fdt.h"
#include "hw/intc/arm_gic.h"
#include "hw/intc/arm_gicv3_common.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/ac97.c
Expand Up @@ -21,6 +21,7 @@
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/dma.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/adlib.c
Expand Up @@ -28,6 +28,7 @@
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"

//#define DEBUG

Expand Down
2 changes: 1 addition & 1 deletion hw/audio/cs4231a.c
Expand Up @@ -27,7 +27,7 @@
#include "audio/audio.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
#include "hw/qdev.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "qemu/timer.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/gus.c
Expand Up @@ -29,6 +29,7 @@
#include "audio/audio.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "gusemu.h"
#include "gustate.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/hda-codec.c
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "intel-hda.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/intel-hda.c
Expand Up @@ -19,6 +19,7 @@

#include "qemu/osdep.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "hw/pci/msi.h"
#include "qemu/timer.h"
#include "qemu/bitops.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/audio/intel-hda.h
@@ -1,7 +1,7 @@
#ifndef HW_INTEL_HDA_H
#define HW_INTEL_HDA_H

#include "hw/qdev.h"
#include "hw/qdev-core.h"

/* --------------------------------------------------------------------- */
/* hda bus */
Expand Down
1 change: 1 addition & 0 deletions hw/audio/marvell_88w8618.c
Expand Up @@ -14,6 +14,7 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/audio/wm8750.h"
#include "audio/audio.h"
#include "qapi/error.h"
Expand Down
1 change: 1 addition & 0 deletions hw/audio/pl041.c
Expand Up @@ -22,6 +22,7 @@

#include "qemu/osdep.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "qemu/log.h"
#include "qemu/module.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/audio/sb16.c
Expand Up @@ -27,7 +27,7 @@
#include "audio/audio.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
#include "hw/qdev.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
#include "qemu/host-utils.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/fdc.c
Expand Up @@ -34,6 +34,7 @@
#include "qemu/timer.h"
#include "hw/irq.h"
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/block/block.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/m25p80.c
Expand Up @@ -24,6 +24,7 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "sysemu/block-backend.h"
#include "hw/qdev-properties.h"
#include "hw/ssi/ssi.h"
#include "migration/vmstate.h"
#include "qemu/bitops.h"
Expand Down
2 changes: 1 addition & 1 deletion hw/block/nand.c
Expand Up @@ -20,9 +20,9 @@

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/qdev-properties.h"
#include "hw/block/flash.h"
#include "sysemu/block-backend.h"
#include "hw/qdev.h"
#include "migration/vmstate.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/nvme.c
Expand Up @@ -30,6 +30,7 @@
#include "hw/block/block.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/onenand.c
Expand Up @@ -23,6 +23,7 @@
#include "hw/hw.h"
#include "hw/block/flash.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "sysemu/block-backend.h"
#include "exec/memory.h"
#include "hw/sysbus.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/pflash_cfi01.c
Expand Up @@ -39,6 +39,7 @@
#include "qemu/osdep.h"
#include "hw/block/block.h"
#include "hw/block/flash.h"
#include "hw/qdev-properties.h"
#include "sysemu/block-backend.h"
#include "qapi/error.h"
#include "qemu/timer.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/pflash_cfi02.c
Expand Up @@ -35,6 +35,7 @@
#include "qemu/osdep.h"
#include "hw/block/block.h"
#include "hw/block/flash.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu/bitmap.h"
#include "qemu/timer.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/vhost-user-blk.c
Expand Up @@ -22,6 +22,7 @@
#include "qemu/cutils.h"
#include "qom/object.h"
#include "hw/qdev-core.h"
#include "hw/qdev-properties.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-user-blk.h"
#include "hw/virtio/virtio.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/virtio-blk.c
Expand Up @@ -18,6 +18,7 @@
#include "qemu/error-report.h"
#include "trace.h"
#include "hw/block/block.h"
#include "hw/qdev-properties.h"
#include "sysemu/blockdev.h"
#include "hw/virtio/virtio-blk.h"
#include "dataplane/virtio-blk.h"
Expand Down
1 change: 1 addition & 0 deletions hw/block/xen-block.c
Expand Up @@ -20,6 +20,7 @@
#include "qapi/qmp/qstring.h"
#include "hw/xen/xen_common.h"
#include "hw/block/xen_blkif.h"
#include "hw/qdev-properties.h"
#include "hw/xen/xen-block.h"
#include "hw/xen/xen-backend.h"
#include "sysemu/blockdev.h"
Expand Down

0 comments on commit a27bd6c

Please sign in to comment.