[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [RFC][PATCH 15/15] ioport: Move IOPortRead/WriteFunc typede
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [RFC][PATCH 15/15] ioport: Move IOPortRead/WriteFunc typedefs to memory.h |
Date: |
Mon, 6 May 2013 16:26:18 +0200 |
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 <address@hidden>
---
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 cad73f5..7843076 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"
typedef struct MemoryRegionOps MemoryRegionOps;
@@ -136,6 +135,9 @@ struct MemoryRegion {
MemoryRegionIoeventfd *ioeventfds;
};
+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
- Re: [Qemu-devel] [RFC][PATCH 11/15] memory: Allow unaligned address_space_rw, (continued)
[Qemu-devel] [RFC][PATCH 09/15] memory: Introduce address_space_lookup_region, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 07/15] Privatize register_ioport_read/write, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 01/15] adlib: replace register_ioport*, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 04/15] i82374: replace register_ioport*, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 15/15] ioport: Move IOPortRead/WriteFunc typedefs to memory.h,
Jan Kiszka <=
[Qemu-devel] [RFC][PATCH 13/15] ioport: Switch dispatching to memory core layer, Jan Kiszka, 2013/05/06
[Qemu-devel] [RFC][PATCH 05/15] prep: replace register_ioport*, Jan Kiszka, 2013/05/06
Re: [Qemu-devel] [RFC][PATCH 00/15] Refactor portio dispatching, Andreas Färber, 2013/05/06
[Qemu-devel] [RFC][PATCH 12/15] vmware-vga: Accept unaligned I/O accesses, Jan Kiszka, 2013/05/06