Include qemu-common.h exactly where needed

No header includes qemu-common.h after this commit, as prescribed by
qemu-common.h's file comment.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190523143508.25387-5-armbru@redhat.com>
[Rebased with conflicts resolved automatically, except for
include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
net/tap-bsd.c fixed up]
This commit is contained in:
Markus Armbruster 2019-05-23 16:35:08 +02:00
parent 0b8fa32f55
commit a8d2532645
485 changed files with 103 additions and 397 deletions

View file

@ -21,7 +21,6 @@
#ifndef QAUTHZ_BASE_H
#define QAUTHZ_BASE_H
#include "qemu-common.h"
#include "qapi/error.h"
#include "qom/object.h"

View file

@ -14,7 +14,6 @@
#ifndef QEMU_AIO_H
#define QEMU_AIO_H
#include "qemu-common.h"
#include "qemu/queue.h"
#include "qemu/event_notifier.h"
#include "qemu/thread.h"

View file

@ -1,7 +1,6 @@
#ifndef BLOCK_DIRTY_BITMAP_H
#define BLOCK_DIRTY_BITMAP_H
#include "qemu-common.h"
#include "qapi/qapi-types-block-core.h"
#include "qemu/hbitmap.h"

View file

@ -12,7 +12,6 @@
#ifndef BLOCK_WRITE_THRESHOLD_H
#define BLOCK_WRITE_THRESHOLD_H
#include "qemu-common.h"
/*
* bdrv_write_threshold_set:

View file

@ -24,7 +24,6 @@
#ifndef CHAR_IO_H
#define CHAR_IO_H
#include "qemu-common.h"
#include "io/channel.h"
#include "chardev/char.h"

View file

@ -21,7 +21,6 @@
#ifndef QCRYPTO_RANDOM_H
#define QCRYPTO_RANDOM_H
#include "qemu-common.h"
/**
* qcrypto_random_bytes:

View file

@ -26,7 +26,6 @@
#ifndef QCRYPTO_XTS_H
#define QCRYPTO_XTS_H
#include "qemu-common.h"
#define XTS_BLOCK_SIZE 16

View file

@ -1,7 +1,6 @@
#ifndef QEMU_DISAS_H
#define QEMU_DISAS_H
#include "qemu-common.h"
#ifdef NEED_CPU_H
#include "cpu.h"

View file

@ -19,7 +19,6 @@
#ifndef CPU_ALL_H
#define CPU_ALL_H
#include "qemu-common.h"
#include "exec/cpu-common.h"
#include "exec/memory.h"
#include "qemu/thread.h"

View file

@ -20,7 +20,6 @@
#ifndef EXEC_ALL_H
#define EXEC_ALL_H
#include "qemu-common.h"
#include "exec/tb-context.h"
#include "sysemu/cpus.h"

View file

@ -9,7 +9,6 @@
#ifndef HW_ACPI_TCO_H
#define HW_ACPI_TCO_H
#include "qemu-common.h"
/* As per ICH9 spec, the internal timer has an error of ~0.6s on every tick */
#define TCO_TICK_NSEC 600000000LL

View file

@ -1,6 +1,5 @@
#ifndef ALLWINNER_H_
#include "qemu-common.h"
#include "qemu/error-report.h"
#include "hw/char/serial.h"
#include "hw/arm/boot.h"

View file

@ -11,7 +11,6 @@
#ifndef BCM2835_PERIPHERALS_H
#define BCM2835_PERIPHERALS_H
#include "qemu-common.h"
#include "hw/sysbus.h"
#include "hw/char/pl011.h"
#include "hw/char/bcm2835_aux.h"

View file

@ -25,7 +25,6 @@
#ifndef EXYNOS4210_H
#define EXYNOS4210_H
#include "qemu-common.h"
#include "exec/memory.h"
#include "target/arm/cpu-qom.h"

View file

@ -30,7 +30,6 @@
#ifndef QEMU_ARM_VIRT_H
#define QEMU_ARM_VIRT_H
#include "qemu-common.h"
#include "exec/hwaddr.h"
#include "qemu/notify.h"
#include "hw/boards.h"

View file

@ -17,7 +17,6 @@
#ifndef XLNX_ZYNQMP_H
#include "qemu-common.h"
#include "hw/arm/boot.h"
#include "hw/intc/arm_gic.h"
#include "hw/net/cadence_gem.h"

View file

@ -1,7 +1,6 @@
#ifndef HW_FDC_H
#define HW_FDC_H
#include "qemu-common.h"
#include "qapi/qapi-types-block.h"
/* fdc.c */

View file

@ -6,7 +6,6 @@
#ifndef BCM2835_DMA_H
#define BCM2835_DMA_H
#include "qemu-common.h"
#include "hw/sysbus.h"
typedef struct {

View file

@ -18,7 +18,6 @@
#ifndef FW_PATH_PROVIDER_H
#define FW_PATH_PROVIDER_H
#include "qemu-common.h"
#include "qom/object.h"
#define TYPE_FW_PATH_PROVIDER "fw-path-provider"

View file

@ -27,7 +27,6 @@
#ifndef PPC4XX_I2C_H
#define PPC4XX_I2C_H
#include "qemu-common.h"
#include "hw/sysbus.h"
#include "hw/i2c/i2c.h"

View file

@ -1,7 +1,6 @@
#ifndef APIC_H
#define APIC_H
#include "qemu-common.h"
/* apic.c */
void apic_deliver_irq(uint8_t dest, uint8_t dest_mode, uint8_t delivery_mode,

View file

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

View file

@ -1,7 +1,6 @@
#ifndef APM_H
#define APM_H
#include "qemu-common.h"
#include "hw/hw.h"
#include "exec/memory.h"

View file

@ -10,7 +10,6 @@
#ifndef HW_ISA_SUPERIO_H
#define HW_ISA_SUPERIO_H
#include "qemu-common.h"
#include "sysemu/sysemu.h"
#include "hw/isa/isa.h"

View file

@ -1,7 +1,6 @@
#ifndef QEMU_HW_LM32_PIC_H
#define QEMU_HW_LM32_PIC_H
#include "qemu-common.h"
uint32_t lm32_pic_get_ip(DeviceState *d);
uint32_t lm32_pic_get_im(DeviceState *d);

View file

@ -22,7 +22,6 @@
#ifndef NMI_H
#define NMI_H
#include "qemu-common.h"
#include "qom/object.h"
#define TYPE_NMI "nmi"

View file

@ -50,7 +50,6 @@
* 0xf0000 - 0xfffff System BIOS Area Memory Segments
*/
#include "qemu-common.h"
#include "exec/memory.h"
#define SMRAM_C_BASE 0xa0000

View file

@ -21,7 +21,6 @@
#ifndef QEMU_MSI_H
#define QEMU_MSI_H
#include "qemu-common.h"
#include "hw/pci/pci.h"
struct MSIMessage {

View file

@ -1,7 +1,6 @@
#ifndef QEMU_MSIX_H
#define QEMU_MSIX_H
#include "qemu-common.h"
#include "hw/pci/pci.h"
#define MSIX_CAP_LENGTH 12

View file

@ -1,7 +1,6 @@
#ifndef SHPC_H
#define SHPC_H
#include "qemu-common.h"
#include "exec/memory.h"
#include "hw/hotplug.h"
#include "hw/pci/pci.h"

View file

@ -1,7 +1,6 @@
#ifndef PCI_SLOTID_CAP_H
#define PCI_SLOTID_CAP_H
#include "qemu-common.h"
int slotid_cap_init(PCIDevice *dev, int nslots,
uint8_t chassis,

View file

@ -1,7 +1,6 @@
#ifndef OPENPIC_H
#define OPENPIC_H
#include "qemu-common.h"
#include "hw/sysbus.h"
#include "hw/qdev-core.h"
#include "qom/cpu.h"

View file

@ -8,7 +8,6 @@
#ifndef PTIMER_H
#define PTIMER_H
#include "qemu-common.h"
#include "qemu/timer.h"
#include "migration/vmstate.h"

View file

@ -25,7 +25,6 @@
#ifndef SDHCI_H
#define SDHCI_H
#include "qemu-common.h"
#include "hw/pci/pci.h"
#include "hw/sysbus.h"
#include "hw/sd/sd.h"

View file

@ -1,7 +1,6 @@
#ifndef SH_INTC_H
#define SH_INTC_H
#include "qemu-common.h"
#include "hw/irq.h"
typedef unsigned char intc_enum;

View file

@ -25,7 +25,6 @@
#ifndef SUN4M_IOMMU_H
#define SUN4M_IOMMU_H
#include "qemu-common.h"
#include "hw/sysbus.h"
#define IOMMU_NREGS (4 * 4096 / 4)

View file

@ -27,7 +27,6 @@
#ifndef SUN4U_IOMMU_H
#define SUN4U_IOMMU_H
#include "qemu-common.h"
#include "hw/sysbus.h"
#define IOMMU_NREGS 3

View file

@ -1,7 +1,6 @@
#ifndef STREAM_H
#define STREAM_H
#include "qemu-common.h"
#include "qom/object.h"
/* stream slave. Used until qdev provides a generic way. */

View file

@ -1,7 +1,6 @@
#ifndef HW_M48T59_H
#define HW_M48T59_H
#include "qemu-common.h"
#include "qom/object.h"
#define TYPE_NVRAM "nvram"

View file

@ -21,7 +21,6 @@
#ifndef HW_VFIO_VFIO_COMMON_H
#define HW_VFIO_VFIO_COMMON_H
#include "qemu-common.h"
#include "exec/memory.h"
#include "qemu/queue.h"
#include "qemu/notify.h"

View file

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

View file

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

View file

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

View file

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

View file

@ -8,7 +8,6 @@
* /usr/include/xen, so it can be included unconditionally.
*/
#include "qemu-common.h"
#include "exec/cpu-common.h"
#include "hw/irq.h"

View file

@ -21,7 +21,6 @@
#ifndef QIO_CHANNEL_H
#define QIO_CHANNEL_H
#include "qemu-common.h"
#include "qom/object.h"
#include "qemu/coroutine.h"
#include "block/aio.h"

View file

@ -21,7 +21,6 @@
#ifndef QIO_DNS_RESOLVER_H
#define QIO_DNS_RESOLVER_H
#include "qemu-common.h"
#include "qapi/qapi-types-sockets.h"
#include "qom/object.h"
#include "io/task.h"

View file

@ -21,7 +21,6 @@
#ifndef QIO_TASK_H
#define QIO_TASK_H
#include "qemu-common.h"
#include "qom/object.h"
typedef struct QIOTask QIOTask;

View file

@ -13,7 +13,6 @@
#ifndef QEMU_COLO_H
#define QEMU_COLO_H
#include "qemu-common.h"
#include "qapi/qapi-types-migration.h"
enum colo_event {

View file

@ -13,7 +13,6 @@
#ifndef QEMU_FAILOVER_H
#define QEMU_FAILOVER_H
#include "qemu-common.h"
#include "qapi/qapi-types-migration.h"
void failover_init_state(void);

View file

@ -1,7 +1,6 @@
#ifndef MONITOR_H
#define MONITOR_H
#include "qemu-common.h"
#include "block/block.h"
#include "qapi/qapi-types-misc.h"
#include "qemu/readline.h"

View file

@ -9,7 +9,6 @@
#ifndef QEMU_NET_ANNOUNCE_H
#define QEMU_NET_ANNOUNCE_H
#include "qemu-common.h"
#include "qapi/qapi-types-net.h"
#include "qemu/timer.h"

View file

@ -11,7 +11,6 @@
#include "qapi/qapi-types-net.h"
#include "qom/object.h"
#include "qemu-common.h"
#include "net/queue.h"
#define TYPE_NETFILTER "netfilter"

View file

@ -24,7 +24,6 @@
#ifndef QEMU_NET_QUEUE_H
#define QEMU_NET_QUEUE_H
#include "qemu-common.h"
typedef struct NetPacket NetPacket;
typedef struct NetQueue NetQueue;

View file

@ -26,7 +26,6 @@
#ifndef QEMU_NET_TAP_H
#define QEMU_NET_TAP_H
#include "qemu-common.h"
#include "standard-headers/linux/virtio_net.h"
int tap_enable(NetClientState *nc);

View file

@ -1,6 +1,4 @@
/* Common header file that is included by all of QEMU.
*
/*
* This file is supposed to be included only by .c files. No header file should
* depend on qemu-common.h, as this would easily lead to circular header
* dependencies.

View file

@ -18,7 +18,6 @@
#ifndef QEMU_IO_H
#define QEMU_IO_H
#include "qemu-common.h"
#define CMD_FLAG_GLOBAL ((int)0x80000000) /* don't iterate "args" */

View file

@ -21,7 +21,6 @@
#ifndef QEMU_BASE64_H
#define QEMU_BASE64_H
#include "qemu-common.h"
/**

View file

@ -21,7 +21,6 @@
#ifndef QEMU_BUFFER_H
#define QEMU_BUFFER_H
#include "qemu-common.h"
typedef struct Buffer Buffer;

View file

@ -28,7 +28,6 @@
#ifndef QEMU_CRC32C_H
#define QEMU_CRC32C_H
#include "qemu-common.h"
uint32_t crc32c(uint32_t crc, const uint8_t *data, unsigned int length);

View file

@ -13,7 +13,6 @@
#ifndef QEMU_EVENT_NOTIFIER_H
#define QEMU_EVENT_NOTIFIER_H
#include "qemu-common.h"
#ifdef _WIN32
#include <windows.h>

View file

@ -21,7 +21,6 @@
#ifndef QEMU_FILEMONITOR_H
#define QEMU_FILEMONITOR_H
#include "qemu-common.h"
typedef struct QFileMonitor QFileMonitor;

View file

@ -1,7 +1,6 @@
#ifndef QEMU_MMAP_ALLOC_H
#define QEMU_MMAP_ALLOC_H
#include "qemu-common.h"
size_t qemu_fd_getpagesize(int fd);

View file

@ -7,7 +7,6 @@
#ifndef QEMU_QDIST_H
#define QEMU_QDIST_H
#include "qemu-common.h"
#include "qemu/bitops.h"
/*

View file

@ -25,7 +25,6 @@
#ifndef THROTTLE_H
#define THROTTLE_H
#include "qemu-common.h"
#include "qapi/qapi-types-block-core.h"
#include "qemu/timer.h"

View file

@ -1,7 +1,6 @@
#ifndef QEMU_TIMER_H
#define QEMU_TIMER_H
#include "qemu-common.h"
#include "qemu/bitops.h"
#include "qemu/notify.h"
#include "qemu/host-utils.h"

View file

@ -16,7 +16,6 @@
#ifndef QEMU_UUID_H
#define QEMU_UUID_H
#include "qemu-common.h"
/* Version 4 UUID (pseudo random numbers), RFC4122 4.4. */

View file

@ -24,7 +24,6 @@
#ifndef CRYPTODEV_VHOST_H
#define CRYPTODEV_VHOST_H
#include "qemu-common.h"
#include "hw/virtio/vhost.h"
#include "hw/virtio/vhost-backend.h"
#include "chardev/char.h"

View file

@ -24,7 +24,6 @@
#define CRYPTODEV_H
#include "qom/object.h"
#include "qemu-common.h"
/**
* CryptoDevBackend:

View file

@ -22,7 +22,6 @@
#ifndef QEMU_HAX_H
#define QEMU_HAX_H
#include "qemu-common.h"
int hax_sync_vcpus(void);
int hax_init_vcpu(CPUState *cpu);

View file

@ -13,7 +13,6 @@
#ifndef HVF_H
#define HVF_H
#include "qemu-common.h"
#include "qemu/bitops.h"
#include "exec/memory.h"
#include "sysemu/accel.h"

View file

@ -14,7 +14,6 @@
#ifndef QTEST_H
#define QTEST_H
#include "qemu-common.h"
extern bool qtest_allowed;

View file

@ -14,7 +14,6 @@
#define QEMU_RNG_H
#include "qom/object.h"
#include "qemu-common.h"
#define TYPE_RNG_BACKEND "rng-backend"
#define RNG_BACKEND(obj) \

View file

@ -14,7 +14,6 @@
#define TPM_BACKEND_H
#include "qom/object.h"
#include "qemu-common.h"
#include "qemu/option.h"
#include "sysemu/tpm.h"
#include "qapi/error.h"

View file

@ -13,7 +13,6 @@
#ifndef QEMU_WHPX_H
#define QEMU_WHPX_H
#include "qemu-common.h"
int whpx_init_vcpu(CPUState *cpu);
int whpx_vcpu_exec(CPUState *cpu);