Include hw/hw.h exactly where needed

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>
This commit is contained in:
Markus Armbruster 2019-08-12 07:23:48 +02:00
parent e7febd9597
commit 650d103d3e
401 changed files with 27 additions and 374 deletions

View File

@ -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"

View File

@ -23,7 +23,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "audio.h"
#include "migration/vmstate.h"
#include "monitor/monitor.h"

View File

@ -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"

View File

@ -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"

1
cpus.c
View File

@ -56,6 +56,7 @@
#include "hw/nmi.h"
#include "sysemu/replay.h"
#include "hw/boards.h"
#include "hw/hw.h"
#ifdef CONFIG_LINUX

View File

@ -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"

1
exec.c
View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -22,7 +22,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -12,7 +12,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "migration/vmstate.h"
#include "hw/block/flash.h"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "chardev/char-fe.h"
#include "hw/isa/isa.h"

View File

@ -27,7 +27,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "chardev/char-fe.h"

View File

@ -23,7 +23,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "qemu/module.h"

View File

@ -23,7 +23,6 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -7,7 +7,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "qemu/module.h"

View File

@ -22,7 +22,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -19,7 +19,6 @@
*/
#include "qemu/osdep.h"
#include "chardev/char.h"
#include "hw/hw.h"
#include "hw/arm/omap.h"
#include "hw/char/serial.h"
#include "exec/address-spaces.h"

View File

@ -26,7 +26,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "chardev/char-parallel.h"
#include "chardev/char-fe.h"
#include "hw/irq.h"

View File

@ -26,7 +26,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sh4/sh.h"
#include "chardev/char-fe.h"

View File

@ -24,7 +24,6 @@
#include <termios.h>
#include "qapi/error.h"
#include "hw/hw.h"
#include "chardev/char-fe.h"
#include "hw/xen/xen-legacy-backend.h"

View File

@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "qemu/module.h"

View File

@ -10,7 +10,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#include "qemu/module.h"
#include "hw/empty_slot.h"

View File

@ -13,7 +13,6 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"

View File

@ -7,7 +7,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "qemu/timer.h"
#include "hw/ptimer.h"
#include "migration/vmstate.h"

View File

@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/loader.h"
#include "elf.h"
#include "boot.h"

View File

@ -24,7 +24,6 @@
#include "qemu/module.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "ui/console.h"
#include "hw/display/i2c-ddc.h"
#include "trace.h"

View File

@ -26,6 +26,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "hw/display/bcm2835_fb.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "framebuffer.h"
#include "ui/pixel_ops.h"

View File

@ -8,7 +8,6 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "hw/display/bochs-vbe.h"

View File

@ -38,7 +38,6 @@
#include "sysemu/reset.h"
#include "qapi/error.h"
#include "trace.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "ui/pixel_ops.h"

View File

@ -26,7 +26,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "hw/loader.h"
#include "hw/isa/isa.h"
#include "cirrus_vga_internal.h"

View File

@ -23,6 +23,7 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "ui/console.h"
#include "framebuffer.h"

View File

@ -25,7 +25,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

View File

@ -18,7 +18,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "ui/console.h"
#include "hw/arm/omap.h"

View File

@ -2,7 +2,6 @@
#define HW_QXL_H
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "vga_int.h"
#include "qemu/thread.h"

View File

@ -29,7 +29,6 @@
#include "qemu/log.h"
#include "qemu/module.h"
#include "cpu.h"
#include "hw/hw.h"
#include "hw/char/serial.h"
#include "ui/console.h"
#include "hw/sysbus.h"

View File

@ -14,7 +14,6 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/host-utils.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/display/tc6393xb.h"
#include "exec/memory.h"

View File

@ -25,7 +25,6 @@
#include "qemu/osdep.h"
#include "qemu/bitops.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "migration/vmstate.h"
#include "hw/display/vga.h"
#include "vga_int.h"

View File

@ -25,7 +25,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/isa/isa.h"
#include "vga_int.h"
#include "ui/pixel_ops.h"

View File

@ -25,7 +25,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "vga_int.h"

View File

@ -26,7 +26,6 @@
#include "qemu/units.h"
#include "sysemu/reset.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/display/vga.h"
#include "hw/pci/pci.h"
#include "vga_int.h"

View File

@ -1,5 +1,4 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "hw/virtio/virtio-gpu.h"
#include "qapi/error.h"

View File

@ -26,7 +26,6 @@
#include "qemu/module.h"
#include "qemu/units.h"
#include "qapi/error.h"
#include "hw/hw.h"
#include "hw/loader.h"
#include "trace.h"
#include "ui/vnc.h"

View File

@ -27,7 +27,6 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "ui/input.h"
#include "ui/console.h"
#include "hw/xen/xen-legacy-backend.h"

View File

@ -23,7 +23,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/isa/isa.h"
#include "migration/vmstate.h"
#include "hw/dma/i8257.h"

View File

@ -14,6 +14,7 @@
#include "qemu/log.h"
#include "qemu/module.h"
#include "hw/dma/pl080.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "qapi/error.h"

View File

@ -10,7 +10,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#undef DEBUG_PUV3

View File

@ -24,7 +24,6 @@
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/mips/mips.h"
#include "hw/sysbus.h"

View File

@ -26,7 +26,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/sparc/sparc32_dma.h"
#include "hw/sparc/sun4m_iommu.h"

View File

@ -26,6 +26,7 @@
#include "hw/sysbus.h"
#include "qapi/error.h"
#include "qemu/timer.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/ptimer.h"
#include "qemu/log.h"

View File

@ -8,6 +8,7 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "hw/irq.h"
#include "migration/vmstate.h"

View File

@ -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"

View File

@ -10,7 +10,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/sysbus.h"
#undef DEBUG_PUV3

View File

@ -17,7 +17,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/arm/sharpsl.h"
#include "hw/sysbus.h"

View File

@ -15,7 +15,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 "hw/pci/pci.h"

View File

@ -6,7 +6,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"

View File

@ -11,7 +11,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/i2c/bitbang_i2c.h"
#include "hw/sysbus.h"

View File

@ -20,7 +20,6 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "hw/hw.h"
#include "hw/i2c/i2c.h"
#include "hw/irq.h"
#include "hw/arm/omap.h"

View File

@ -19,7 +19,6 @@
*/
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "hw/boards.h"
#include "hw/i2c/pm_smbus.h"
#include "hw/i2c/smbus_master.h"

Some files were not shown because too many files have changed in this diff Show More