hw/pci/pci.h: Don't include qemu-common.h

qemu-common.h should only be included by .c files.  Its file comment
explains why: "No header file should depend on qemu-common.h, as this
would easily lead to circular header dependencies."

hw/pci/pci.h includes qemu-common.h, but its users only need pcibus_t
and PCIHostDeviceAddress from it.  Move them to hw/pci/pci.h and drop
the ill-advised include.  Include hw/pci/pci.h where the moved stuff
is now missing.  Except we can't in target-i386/kvm_i386.h, because
that would break the i386-linux-user compile.  Add
PCIHostDeviceAddress to qemu/typedefs.h instead.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
Markus Armbruster 2016-03-09 13:44:19 +01:00 committed by Paolo Bonzini
parent 0137fdc094
commit a7c4d9c7ca
4 changed files with 11 additions and 11 deletions

View file

@ -1,8 +1,6 @@
#ifndef QEMU_PCI_H
#define QEMU_PCI_H
#include "qemu-common.h"
#include "hw/qdev.h"
#include "exec/memory.h"
#include "sysemu/dma.h"
@ -97,6 +95,15 @@
#define FMT_PCIBUS PRIx64
typedef uint64_t pcibus_t;
struct PCIHostDeviceAddress {
unsigned int domain;
unsigned int bus;
unsigned int slot;
unsigned int function;
};
typedef void PCIConfigWriteFunc(PCIDevice *pci_dev,
uint32_t address, uint32_t data, int len);
typedef uint32_t PCIConfigReadFunc(PCIDevice *pci_dev,