Include hw/qdev-properties.h less

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>
This commit is contained in:
Markus Armbruster 2019-08-12 07:23:51 +02:00
parent db72581598
commit a27bd6c779
497 changed files with 461 additions and 117 deletions

View file

@ -4,6 +4,7 @@
#include "qapi/qapi-types-misc.h"
#include "qom/object.h"
#include "hw/boards.h"
#include "hw/qdev-core.h"
/* These values are part of guest ABI, and can not be changed */
typedef enum {

View file

@ -2,7 +2,7 @@
#define ACPI_VMGENID_H
#include "hw/acpi/bios-linker-loader.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "qemu/uuid.h"
#define VMGENID_DEVICE "vmgenid"

View file

@ -26,6 +26,7 @@
#define HW_PCSPK_H
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#define TYPE_PC_SPEAKER "isa-pcspk"

View file

@ -6,7 +6,6 @@
#include "exec/memory.h"
#include "sysemu/blockdev.h"
#include "sysemu/accel.h"
#include "hw/qdev.h"
#include "qapi/qapi-types-machine.h"
#include "qemu/module.h"
#include "qom/object.h"

View file

@ -19,6 +19,7 @@
#ifndef CADENCE_UART_H
#define CADENCE_UART_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "chardev/char-fe.h"
#include "qemu/timer.h"

View file

@ -12,6 +12,7 @@
#ifndef CMSDK_APB_UART_H
#define CMSDK_APB_UART_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "chardev/char-fe.h"

View file

@ -1,7 +1,7 @@
#ifndef QEMU_HW_CHAR_LM32_JUART_H
#define QEMU_HW_CHAR_LM32_JUART_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define TYPE_LM32_JUART "lm32-juart"

View file

@ -15,6 +15,7 @@
#ifndef HW_PL011_H
#define HW_PL011_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "chardev/char-fe.h"

View file

@ -15,6 +15,7 @@
#ifndef XILINX_UARTLITE_H
#define XILINX_UARTLITE_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
static inline DeviceState *xilinx_uartlite_create(hwaddr addr,

View file

@ -20,7 +20,7 @@
#ifndef HW_CPU_CLUSTER_H
#define HW_CPU_CLUSTER_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
/*
* CPU Cluster type

View file

@ -9,7 +9,7 @@
#ifndef HW_CPU_CORE_H
#define HW_CPU_CORE_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define TYPE_CPU_CORE "cpu-core"

View file

@ -27,6 +27,7 @@
#include "net/net.h"
#include "hw/cris/etraxfs_dma.h"
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
/* Instantiate an ETRAXFS Ethernet MAC. */

View file

@ -28,7 +28,7 @@
#define HW_DISPLAY_MILKYMIST_TMU2_H
#include "exec/hwaddr.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#if defined(CONFIG_X11) && defined(CONFIG_OPENGL)
DeviceState *milkymist_tmu2_create(hwaddr base, qemu_irq irq);

View file

@ -1,7 +1,7 @@
#ifndef QEMU_I2C_H
#define QEMU_I2C_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
/* The QEMU I2C implementation only supports simple transfers that complete
immediately. It does not support slave devices that need to be able to

View file

@ -21,7 +21,7 @@
#ifndef INTEL_IOMMU_H
#define INTEL_IOMMU_H
#include "hw/qdev.h"
#include "sysemu/dma.h"
#include "hw/i386/x86-iommu.h"
#include "hw/i386/ioapic.h"

View file

@ -26,7 +26,7 @@
#ifndef ADB_H
#define ADB_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define MAX_ADB_DEVICES 16

View file

@ -11,7 +11,7 @@
#ifndef QEMU_IPACK_H
#define QEMU_IPACK_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
typedef struct IPackBus IPackBus;

View file

@ -26,7 +26,7 @@
#define HW_IPMI_H
#include "exec/memory.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define MAX_IPMI_MSG_SIZE 300

View file

@ -5,7 +5,7 @@
#include "exec/memory.h"
#include "exec/ioport.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define ISA_NUM_IRQS 16

View file

@ -13,9 +13,9 @@
#ifndef MEMORY_DEVICE_H
#define MEMORY_DEVICE_H
#include "hw/qdev-core.h"
#include "qapi/qapi-types-misc.h"
#include "qom/object.h"
#include "hw/qdev.h"
#define TYPE_MEMORY_DEVICE "memory-device"

View file

@ -18,7 +18,7 @@
#include "exec/memory.h"
#include "sysemu/hostmem.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "hw/boards.h"
#define TYPE_PC_DIMM "pc-dimm"

View file

@ -26,7 +26,7 @@
#define HW_MISC_AUXBUS_H
#include "exec/memory.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
typedef struct AUXBus AUXBus;
typedef struct AUXSlave AUXSlave;

View file

@ -8,6 +8,7 @@
#ifndef HW_MISC_UNIMP_H
#define HW_MISC_UNIMP_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#define TYPE_UNIMPLEMENTED_DEVICE "unimplemented-device"

View file

@ -12,7 +12,7 @@
#ifndef VMCOREINFO_H
#define VMCOREINFO_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "standard-headers/linux/qemu_fw_cfg.h"
#define VMCOREINFO_DEVICE "vmcoreinfo"

View file

@ -10,8 +10,8 @@
#ifndef HW_NET_NE2000_ISA_H
#define HW_NET_NE2000_ISA_H
#include "hw/qdev.h"
#include "hw/isa/isa.h"
#include "hw/qdev-properties.h"
#include "net/net.h"
#define TYPE_ISA_NE2000 "ne2k_isa"

View file

@ -1,7 +1,6 @@
#ifndef QEMU_PCI_H
#define QEMU_PCI_H
#include "hw/qdev.h"
#include "exec/memory.h"
#include "sysemu/dma.h"

View file

@ -3,7 +3,7 @@
/* PCMCIA/Cardbus */
#include "hw/qdev.h"
#include "hw/qdev-core.h"
typedef struct PCMCIASocket {
qemu_irq irq;

View file

@ -2,7 +2,6 @@
#define OPENPIC_H
#include "hw/sysbus.h"
#include "hw/qdev-core.h"
#include "qom/cpu.h"
#define MAX_CPU 32

View file

@ -9,8 +9,8 @@
#ifndef HW_SPAPR_CPU_CORE_H
#define HW_SPAPR_CPU_CORE_H
#include "hw/qdev.h"
#include "hw/cpu/core.h"
#include "hw/qdev-core.h"
#include "target/ppc/cpu-qom.h"
#include "target/ppc/cpu.h"

View file

@ -16,7 +16,7 @@
#include <libfdt.h>
#include "qom/object.h"
#include "sysemu/sysemu.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "qapi/error.h"
#define TYPE_SPAPR_DR_CONNECTOR "spapr-dr-connector"

View file

@ -29,7 +29,7 @@
#define XICS_H
#include "exec/memory.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define XICS_IPI 0x2
#define XICS_BUID 0x1

View file

@ -141,7 +141,6 @@
#define PPC_XIVE_H
#include "sysemu/kvm.h"
#include "hw/qdev-core.h"
#include "hw/sysbus.h"
#include "hw/ppc/xive_regs.h"

View file

@ -1,7 +0,0 @@
#ifndef QDEV_H
#define QDEV_H
#include "hw/qdev-core.h"
#include "hw/qdev-properties.h"
#endif

View file

@ -15,8 +15,8 @@
#ifndef HW_S390_SCLP_EVENT_FACILITY_H
#define HW_S390_SCLP_EVENT_FACILITY_H
#include "hw/qdev.h"
#include "qemu/thread.h"
#include "hw/qdev-core.h"
#include "hw/s390x/sclp.h"
/* SCLP event types */

View file

@ -15,7 +15,6 @@
#define HW_S390_SCLP_H
#include "hw/sysbus.h"
#include "hw/qdev.h"
#include "target/s390x/cpu-qom.h"
#define SCLP_CMD_CODE_MASK 0xffff00ff

View file

@ -12,7 +12,7 @@
#ifndef S390_STORAGE_ATTRIBUTES_H
#define S390_STORAGE_ATTRIBUTES_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "monitor/monitor.h"
#define TYPE_S390_STATTRIB "s390-storage_attributes"

View file

@ -12,7 +12,7 @@
#ifndef S390_STORAGE_KEYS_H
#define S390_STORAGE_KEYS_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "monitor/monitor.h"
#define TYPE_S390_SKEYS "s390-skeys"

View file

@ -11,7 +11,7 @@
#ifndef HW_S390_TOD_H
#define HW_S390_TOD_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "target/s390x/s390-tod.h"
typedef struct S390TOD {

View file

@ -1,9 +1,9 @@
#ifndef QEMU_HW_SCSI_H
#define QEMU_HW_SCSI_H
#include "hw/qdev.h"
#include "block/aio.h"
#include "hw/block/block.h"
#include "hw/qdev-core.h"
#include "sysemu/sysemu.h"
#include "scsi/utils.h"
#include "qemu/notify.h"

View file

@ -30,7 +30,7 @@
#ifndef HW_SD_H
#define HW_SD_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define OUT_OF_RANGE (1 << 31)
#define ADDRESS_ERROR (1 << 30)

View file

@ -25,7 +25,6 @@
#ifndef GRLIB_H
#define GRLIB_H
#include "hw/qdev.h"
#include "hw/sysbus.h"
/* Emulation of GrLib device is base on the GRLIB IP Core User's Manual:

View file

@ -11,7 +11,7 @@
#ifndef QEMU_SSI_H
#define QEMU_SSI_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
typedef struct SSISlave SSISlave;
typedef struct SSISlaveClass SSISlaveClass;

View file

@ -3,7 +3,7 @@
/* Devices attached directly to the main system bus. */
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "exec/memory.h"
#define QDEV_MAX_MMIO 32

View file

@ -12,6 +12,7 @@
#ifndef CMSDK_APB_TIMER_H
#define CMSDK_APB_TIMER_H
#include "hw/qdev-properties.h"
#include "hw/sysbus.h"
#include "hw/ptimer.h"

View file

@ -25,7 +25,7 @@
#ifndef HW_I8254_H
#define HW_I8254_H
#include "hw/qdev.h"
#include "hw/qdev-properties.h"
#include "hw/isa/isa.h"
#define PIT_FREQ 1193182

View file

@ -26,7 +26,7 @@
*/
#include "exec/memory.h"
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#include "qemu/iov.h"
#include "qemu/queue.h"

View file

@ -14,7 +14,6 @@
#ifndef VHOST_SCSI_COMMON_H
#define VHOST_SCSI_COMMON_H
#include "hw/qdev.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/vhost.h"
#include "hw/fw-path-provider.h"

View file

@ -14,7 +14,6 @@
#ifndef VHOST_SCSI_H
#define VHOST_SCSI_H
#include "hw/qdev.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-scsi-common.h"

View file

@ -16,7 +16,6 @@
#define VHOST_USER_BLK_H
#include "standard-headers/linux/virtio_blk.h"
#include "hw/qdev.h"
#include "hw/block/block.h"
#include "chardev/char-fe.h"
#include "hw/virtio/vhost.h"

View file

@ -17,7 +17,6 @@
#ifndef VHOST_USER_SCSI_H
#define VHOST_USER_SCSI_H
#include "hw/qdev.h"
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-user.h"

View file

@ -25,8 +25,8 @@
#ifndef VIRTIO_BUS_H
#define VIRTIO_BUS_H
#include "hw/qdev.h"
#include "sysemu/sysemu.h"
#include "hw/qdev-core.h"
#include "hw/virtio/virtio.h"
#define TYPE_VIRTIO_BUS "virtio-bus"

View file

@ -17,7 +17,6 @@
#define QEMU_VIRTIO_SERIAL_H
#include "standard-headers/linux/virtio_console.h"
#include "hw/qdev.h"
#include "hw/virtio/virtio.h"
struct virtio_serial_conf {

View file

@ -15,8 +15,8 @@
#define QEMU_VIRTIO_H
#include "exec/memory.h"
#include "hw/qdev-core.h"
#include "net/net.h"
#include "hw/qdev.h"
#include "sysemu/sysemu.h"
#include "migration/vmstate.h"
#include "qemu/event_notifier.h"

View file

@ -1,7 +1,7 @@
#ifndef WDT_DIAG288_H
#define WDT_DIAG288_H
#include "hw/qdev.h"
#include "hw/qdev-core.h"
#define TYPE_WDT_DIAG288 "diag288"
#define DIAG288(obj) \

View file

@ -1,8 +1,6 @@
#ifndef MONITOR_QDEV_H
#define MONITOR_QDEV_H
#include "hw/qdev-core.h"
/*** monitor commands ***/
void hmp_info_qtree(Monitor *mon, const QDict *qdict);

View file

@ -24,7 +24,6 @@
#define HW_ACCEL_H
#include "qom/object.h"
#include "hw/qdev-properties.h"
#include "exec/hwaddr.h"
typedef struct AccelState {