Skip to content

Commit

Permalink
Clean up inclusion of sysemu/sysemu.h
Browse files Browse the repository at this point in the history
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 <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190812052359.30071-27-armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
  • Loading branch information
Markus Armbruster committed Aug 16, 2019
1 parent b58c5c2 commit d5938f2
Show file tree
Hide file tree
Showing 126 changed files with 7 additions and 121 deletions.
1 change: 0 additions & 1 deletion accel/tcg/tcg-all.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

#include "qemu/osdep.h"
#include "sysemu/accel.h"
#include "sysemu/sysemu.h"
#include "sysemu/tcg.h"
#include "qom/object.h"
#include "cpu.h"
Expand Down
1 change: 0 additions & 1 deletion block/nfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
#include "qemu/option.h"
#include "qemu/uri.h"
#include "qemu/cutils.h"
#include "sysemu/sysemu.h"
#include "qapi/qapi-visit-block-core.h"
#include "qapi/qmp/qdict.h"
#include "qapi/qmp/qstring.h"
Expand Down
1 change: 0 additions & 1 deletion blockdev-nbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "hw/block/block.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-block.h"
#include "sysemu/sysemu.h"
#include "block/nbd.h"
#include "io/channel-socket.h"
#include "io/net-listener.h"
Expand Down
1 change: 0 additions & 1 deletion dump/win_dump.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "monitor/monitor.h"
#include "sysemu/kvm.h"
#include "sysemu/dump.h"
#include "sysemu/sysemu.h"
#include "sysemu/memory_mapping.h"
#include "sysemu/cpus.h"
#include "qapi/error.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/pcihp.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "hw/pci/pci.h"
#include "hw/pci/pci_bridge.h"
#include "hw/acpi/acpi.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "hw/pci/pci_bus.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/acpi/vmgenid.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"

void vmgenid_build_acpi(VmGenIdState *vms, GArray *table_data, GArray *guid,
BIOSLinker *linker)
Expand Down
1 change: 0 additions & 1 deletion hw/alpha/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include "qemu/osdep.h"
#include "alpha_sys.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
#include "trace.h"


Expand Down
1 change: 0 additions & 1 deletion hw/alpha/typhoon.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "cpu.h"
#include "hw/boards.h"
#include "hw/irq.h"
#include "sysemu/sysemu.h"
#include "alpha_sys.h"
#include "exec/address-spaces.h"

Expand Down
1 change: 0 additions & 1 deletion hw/arm/nrf51_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "hw/sysbus.h"
#include "hw/misc/unimp.h"
#include "exec/address-spaces.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "cpu.h"

Expand Down
1 change: 0 additions & 1 deletion hw/arm/smmu-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
*/

#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "trace.h"
#include "exec/target_page.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/smmuv3.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

#include "qemu/osdep.h"
#include "hw/irq.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/qdev-core.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/sysbus-fdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "qemu/error-report.h"
#include "sysemu/device_tree.h"
#include "hw/platform-bus.h"
#include "sysemu/sysemu.h"
#include "hw/vfio/vfio-platform.h"
#include "hw/vfio/vfio-calxeda-xgmac.h"
#include "hw/vfio/vfio-amd-xgbe.h"
Expand Down
1 change: 0 additions & 1 deletion hw/arm/z2.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "hw/ssi/ssi.h"
#include "migration/vmstate.h"
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "hw/block/flash.h"
#include "ui/console.h"
#include "hw/audio/wm8750.h"
Expand Down
1 change: 0 additions & 1 deletion hw/char/exynos4210_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "migration/vmstate.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "chardev/char-fe.h"
#include "chardev/char-serial.h"

Expand Down
1 change: 0 additions & 1 deletion hw/char/imx_serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "qemu/module.h"

Expand Down
1 change: 1 addition & 0 deletions hw/char/serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "trace.h"

Expand Down
1 change: 0 additions & 1 deletion hw/core/loader-fit.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "qemu/cutils.h"
#include "qemu/error-report.h"
#include "sysemu/device_tree.h"
#include "sysemu/sysemu.h"

#include <libfdt.h>
#include <zlib.h>
Expand Down
1 change: 0 additions & 1 deletion hw/core/platform-bus.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"


/*
Expand Down
1 change: 0 additions & 1 deletion hw/core/qdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
this API directly. */

#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qapi/qapi-events-qdev.h"
#include "qapi/qmp/qerror.h"
Expand Down
1 change: 0 additions & 1 deletion hw/display/ramfb-standalone.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "hw/isa/isa.h"
#include "hw/display/ramfb.h"
#include "ui/console.h"
#include "sysemu/sysemu.h"

#define RAMFB(obj) OBJECT_CHECK(RAMFBStandaloneState, (obj), TYPE_RAMFB_DEVICE)

Expand Down
1 change: 0 additions & 1 deletion hw/display/ramfb.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "hw/display/ramfb.h"
#include "ui/console.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"

struct QEMU_PACKED RAMFBCfg {
uint64_t addr;
Expand Down
1 change: 0 additions & 1 deletion hw/dma/xlnx-zynq-devcfg.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "hw/irq.h"
#include "migration/vmstate.h"
#include "qemu/bitops.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include "qemu/log.h"
#include "qemu/module.h"
Expand Down
1 change: 0 additions & 1 deletion hw/hppa/dino.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "qapi/error.h"
#include "cpu.h"
#include "hw/irq.h"
#include "sysemu/sysemu.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/hppa/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "qemu/osdep.h"
#include "hppa_sys.h"
#include "qemu/log.h"
#include "sysemu/sysemu.h"
#include "trace.h"


Expand Down
1 change: 0 additions & 1 deletion hw/i2c/smbus_ich9.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"

#include "hw/i386/ich9.h"

Expand Down
1 change: 0 additions & 1 deletion hw/ide/cmd646.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "hw/isa/isa.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"

Expand Down
1 change: 0 additions & 1 deletion hw/ide/ioport.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
#include "hw/isa/isa.h"
#include "qemu/error-report.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/blockdev.h"
#include "sysemu/dma.h"
#include "hw/block/block.h"
Expand Down
1 change: 0 additions & 1 deletion hw/ide/piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/block-backend.h"
#include "sysemu/sysemu.h"
#include "sysemu/blockdev.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"
Expand Down
1 change: 0 additions & 1 deletion hw/ide/via.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"

Expand Down
1 change: 0 additions & 1 deletion hw/input/adb-kbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "qemu/module.h"
#include "ui/input.h"
#include "hw/input/adb-keys.h"
#include "sysemu/sysemu.h"
#include "adb-internal.h"
#include "trace.h"

Expand Down
1 change: 0 additions & 1 deletion hw/intc/allwinner-a10-pic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion hw/intc/mips_gic.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion hw/intc/xics_pnv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion hw/ipmi/ipmi_bmc_extern.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
#include "qapi/error.h"
#include "qemu/timer.h"
#include "chardev/char-fe.h"
#include "sysemu/sysemu.h"
#include "hw/ipmi/ipmi.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
Expand Down
1 change: 0 additions & 1 deletion hw/isa/vt82c686.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include "hw/acpi/acpi.h"
#include "hw/i2c/pm_smbus.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "exec/address-spaces.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/armsse-cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include "qemu/module.h"
#include "trace.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "hw/registerfields.h"
#include "hw/misc/armsse-cpuid.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/armsse-mhu.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "qemu/module.h"
#include "trace.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/registerfields.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/imx6_src.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "qemu/osdep.h"
#include "hw/misc/imx6_src.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "qemu/bitops.h"
#include "qemu/log.h"
#include "qemu/main-loop.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/imx7_gpr.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "hw/misc/imx7_gpr.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"

#include "trace.h"

Expand Down
1 change: 0 additions & 1 deletion hw/misc/iotkit-sysinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include "qemu/module.h"
#include "trace.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "hw/registerfields.h"
#include "hw/misc/iotkit-sysinfo.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/mips_cmgcr.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "qemu/module.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "hw/misc/mips_cmgcr.h"
#include "hw/misc/mips_cpc.h"
#include "hw/qdev-properties.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/mos6522.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "qemu/cutils.h"
#include "qemu/log.h"
#include "qemu/module.h"
Expand Down
1 change: 0 additions & 1 deletion hw/misc/sga.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "hw/isa/isa.h"
#include "hw/loader.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"

#define SGABIOS_FILENAME "sgabios.bin"

Expand Down
1 change: 0 additions & 1 deletion hw/misc/zynq-xadc.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "hw/misc/zynq-xadc.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "qemu/module.h"

Expand Down
1 change: 0 additions & 1 deletion hw/net/fsl_etsec/etsec.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
*/

#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "hw/irq.h"
#include "hw/ptimer.h"
Expand Down
1 change: 0 additions & 1 deletion hw/net/lan9118.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/net/lan9118.h"
#include "sysemu/sysemu.h"
#include "hw/ptimer.h"
#include "hw/qdev-properties.h"
#include "qemu/log.h"
Expand Down
1 change: 0 additions & 1 deletion hw/net/ne2000.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
#include "hw/irq.h"
#include "migration/vmstate.h"
#include "ne2000.h"
#include "sysemu/sysemu.h"
#include "trace.h"

/* debug NE2000 card */
Expand Down
1 change: 0 additions & 1 deletion hw/net/opencores_eth.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#include "net/net.h"
#include "qemu/module.h"
#include "net/eth.h"
#include "sysemu/sysemu.h"
#include "trace.h"

/* RECSMALL is not used because it breaks tap networking in linux:
Expand Down
1 change: 0 additions & 1 deletion hw/net/pcnet.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
#include "net/net.h"
#include "net/eth.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "trace.h"

#include "pcnet.h"
Expand Down
1 change: 0 additions & 1 deletion hw/nios2/generic_nommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

#include "hw/sysbus.h"
#include "hw/char/serial.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "exec/memory.h"
#include "exec/address-spaces.h"
Expand Down
Loading

0 comments on commit d5938f2

Please sign in to comment.