Move the function types required for MemoryRegionPortio to memory.h. This allows to let ioport.h depend on memory.h, which is more consistent instead than the other way around.
Signed-off-by: Jan Kiszka <jan.kis...@siemens.com> --- include/exec/ioport.h | 8 +------- include/exec/memory.h | 4 +++- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/include/exec/ioport.h b/include/exec/ioport.h index ba3ebb8..c7da6d4 100644 --- a/include/exec/ioport.h +++ b/include/exec/ioport.h @@ -25,6 +25,7 @@ #define IOPORT_H #include "qemu-common.h" +#include "exec/memory.h" typedef uint32_t pio_addr_t; #define FMT_pioaddr PRIx32 @@ -32,10 +33,6 @@ typedef uint32_t pio_addr_t; #define MAX_IOPORTS (64 * 1024) #define IOPORTS_MASK (MAX_IOPORTS - 1) -/* These should really be in isa.h, but are here to make pc.h happy. */ -typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); -typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); - void cpu_outb(pio_addr_t addr, uint8_t val); void cpu_outw(pio_addr_t addr, uint16_t val); void cpu_outl(pio_addr_t addr, uint32_t val); @@ -43,9 +40,6 @@ uint8_t cpu_inb(pio_addr_t addr); uint16_t cpu_inw(pio_addr_t addr); uint32_t cpu_inl(pio_addr_t addr); -struct MemoryRegion; -struct MemoryRegionPortio; - typedef struct PortioList { const struct MemoryRegionPortio *ports; struct MemoryRegion *address_space; diff --git a/include/exec/memory.h b/include/exec/memory.h index 8c1373e..e73c7d0 100644 --- a/include/exec/memory.h +++ b/include/exec/memory.h @@ -22,7 +22,6 @@ #include "exec/cpu-common.h" #include "exec/hwaddr.h" #include "qemu/queue.h" -#include "exec/ioport.h" #include "qemu/int128.h" #include "qemu/notify.h" @@ -164,6 +163,9 @@ struct MemoryRegion { NotifierList iommu_notify; }; +typedef void (IOPortWriteFunc)(void *opaque, uint32_t address, uint32_t data); +typedef uint32_t (IOPortReadFunc)(void *opaque, uint32_t address); + struct MemoryRegionPortio { uint32_t offset; uint32_t len; -- 1.7.3.4