Skip to content

Commit

Permalink
Include hw/hw.h exactly where needed
Browse files Browse the repository at this point in the history
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 <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190812052359.30071-19-armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
  • Loading branch information
Markus Armbruster committed Aug 16, 2019
1 parent e7febd9 commit 650d103
Show file tree
Hide file tree
Showing 401 changed files with 27 additions and 374 deletions.
1 change: 0 additions & 1 deletion accel/kvm/kvm-all.c
Expand Up @@ -23,7 +23,6 @@
#include "qemu/config-file.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "hw/s390x/adapter.h"
Expand Down
1 change: 0 additions & 1 deletion audio/audio.c
Expand Up @@ -23,7 +23,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "audio.h"
#include "migration/vmstate.h"
#include "monitor/monitor.h"
Expand Down
1 change: 0 additions & 1 deletion audio/spiceaudio.c
Expand Up @@ -18,7 +18,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "qemu/host-utils.h"
#include "qemu/module.h"
#include "qemu/error-report.h"
Expand Down
1 change: 0 additions & 1 deletion audio/wavcapture.c
@@ -1,5 +1,4 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "monitor/monitor.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
Expand Down
1 change: 1 addition & 0 deletions cpus.c
Expand Up @@ -56,6 +56,7 @@
#include "hw/nmi.h"
#include "sysemu/replay.h"
#include "hw/boards.h"
#include "hw/hw.h"

#ifdef CONFIG_LINUX

Expand Down
1 change: 0 additions & 1 deletion device-hotplug.c
Expand Up @@ -23,7 +23,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
Expand Down
1 change: 0 additions & 1 deletion exec.c
Expand Up @@ -42,7 +42,6 @@
#if defined(CONFIG_USER_ONLY)
#include "qemu.h"
#else /* !CONFIG_USER_ONLY */
#include "hw/hw.h"
#include "exec/memory.h"
#include "exec/ioport.h"
#include "sysemu/dma.h"
Expand Down
1 change: 0 additions & 1 deletion hw/9pfs/xen-9p-backend.c
Expand Up @@ -10,7 +10,6 @@

#include "qemu/osdep.h"

#include "hw/hw.h"
#include "hw/9pfs/9p.h"
#include "hw/xen/xen-legacy-backend.h"
#include "hw/9pfs/xen-9pfs.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/core.c
Expand Up @@ -21,7 +21,6 @@

#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/acpi/acpi.h"
#include "hw/nvram/fw_cfg.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/cpu_hotplug.c
Expand Up @@ -10,7 +10,6 @@
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/acpi/cpu_hotplug.h"
#include "qapi/error.h"
#include "qom/cpu.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/ich9.c
Expand Up @@ -25,7 +25,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "hw/i386/pc.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/pcihp.c
Expand Up @@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "hw/acpi/pcihp.h"

#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bridge.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/piix4.c
Expand Up @@ -20,7 +20,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/i386/pc.h"
#include "hw/irq.h"
#include "hw/isa/apm.h"
Expand Down
1 change: 0 additions & 1 deletion hw/adc/stm32f2xx_adc.c
Expand Up @@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/hw.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "hw/adc/stm32f2xx_adc.h"
Expand Down
1 change: 0 additions & 1 deletion hw/alpha/dp264.c
Expand Up @@ -9,7 +9,6 @@
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "cpu.h"
#include "hw/hw.h"
#include "elf.h"
#include "hw/loader.h"
#include "hw/boards.h"
Expand Down
1 change: 0 additions & 1 deletion hw/alpha/typhoon.c
Expand Up @@ -11,7 +11,6 @@
#include "qemu/units.h"
#include "qapi/error.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "sysemu/sysemu.h"
#include "alpha_sys.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/boot.c
Expand Up @@ -12,7 +12,6 @@
#include "qemu/error-report.h"
#include "qapi/error.h"
#include <libfdt.h>
#include "hw/hw.h"
#include "hw/arm/boot.h"
#include "hw/arm/linux-boot-if.h"
#include "sysemu/kvm.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/collie.c
Expand Up @@ -10,7 +10,6 @@
*/
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "hw/boards.h"
#include "strongarm.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/gumstix.c
Expand Up @@ -36,7 +36,6 @@

#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "net/net.h"
#include "hw/block/flash.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/integratorcp.c
Expand Up @@ -21,6 +21,7 @@
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "hw/char/pl011.h"
#include "hw/hw.h"
#include "hw/irq.h"

#define TYPE_INTEGRATOR_CM "integrator_core"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/mainstone.c
Expand Up @@ -14,7 +14,6 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "net/net.h"
Expand Down
1 change: 1 addition & 0 deletions hw/arm/musicpal.c
Expand Up @@ -19,6 +19,7 @@
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/char/serial.h"
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "hw/block/flash.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/omap2.c
Expand Up @@ -25,7 +25,6 @@
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "hw/boards.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/arm/boot.h"
#include "hw/arm/omap.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/omap_sx1.c
Expand Up @@ -27,7 +27,6 @@
*/
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "ui/console.h"
#include "hw/arm/omap.h"
#include "hw/boards.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/palm.c
Expand Up @@ -19,7 +19,6 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "audio/audio.h"
#include "sysemu/sysemu.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/pxa2xx_pic.c
Expand Up @@ -11,7 +11,6 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/spitz.c
Expand Up @@ -12,7 +12,6 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "sysemu/sysemu.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/tosa.c
Expand Up @@ -13,7 +13,6 @@

#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "hw/arm/sharpsl.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/virt-acpi-build.c
Expand Up @@ -36,7 +36,6 @@
#include "hw/acpi/acpi.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/acpi/bios-linker-loader.h"
#include "hw/hw.h"
#include "hw/acpi/aml-build.h"
#include "hw/acpi/utils.h"
#include "hw/acpi/pci.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/z2.c
Expand Up @@ -12,7 +12,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "hw/i2c/i2c.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/ac97.c
Expand Up @@ -18,7 +18,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/pci/pci.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/adlib.c
Expand Up @@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/isa/isa.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/cs4231a.c
Expand Up @@ -23,7 +23,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/irq.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/es1370.c
Expand Up @@ -27,7 +27,6 @@
#define SILENT_ES1370

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/pci/pci.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/gus.c
Expand Up @@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/irq.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/hda-codec.c
Expand Up @@ -18,7 +18,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "intel-hda.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/intel-hda.c
Expand Up @@ -18,7 +18,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "hw/pci/msi.h"
#include "qemu/timer.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/marvell_88w8618.c
Expand Up @@ -13,7 +13,6 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/audio/wm8750.h"
#include "audio/audio.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/milkymist-ac97.c
Expand Up @@ -22,7 +22,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/pcspk.c
Expand Up @@ -23,7 +23,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/isa/isa.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
Expand Down
1 change: 0 additions & 1 deletion hw/audio/sb16.c
Expand Up @@ -23,7 +23,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/audio/soundhw.h"
#include "audio/audio.h"
#include "hw/irq.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/dataplane/xen-block.c
Expand Up @@ -21,7 +21,6 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/xen/xen_common.h"
#include "hw/block/xen_blkif.h"
#include "sysemu/block-backend.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/ecc.c
Expand Up @@ -12,7 +12,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "migration/vmstate.h"
#include "hw/block/flash.h"

Expand Down
1 change: 0 additions & 1 deletion hw/block/fdc.c
Expand Up @@ -28,7 +28,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/block/fdc.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/m25p80.c
Expand Up @@ -23,7 +23,6 @@

#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "sysemu/block-backend.h"
#include "hw/ssi/ssi.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/nvme.c
Expand Up @@ -28,7 +28,6 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/block/block.h"
#include "hw/hw.h"
#include "hw/pci/msix.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/pflash_cfi01.c
Expand Up @@ -37,7 +37,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/block/block.h"
#include "hw/block/flash.h"
#include "sysemu/block-backend.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/pflash_cfi02.c
Expand Up @@ -33,7 +33,6 @@
*/

#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/block/block.h"
#include "hw/block/flash.h"
#include "qapi/error.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/tc58128.c
@@ -1,6 +1,5 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/sh4/sh.h"
#include "hw/loader.h"
#include "sysemu/qtest.h"
Expand Down
1 change: 0 additions & 1 deletion hw/block/xen-block.c
Expand Up @@ -17,7 +17,6 @@
#include "qapi/visitor.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
#include "hw/hw.h"
#include "hw/xen/xen_common.h"
#include "hw/block/xen_blkif.h"
#include "hw/xen/xen-block.h"
Expand Down

0 comments on commit 650d103

Please sign in to comment.