[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 13/13] ioport: Move IOPortRead/WriteFunc typedefs
From: |
Jan Kiszka |
Subject: |
[Qemu-devel] [PATCH v2 13/13] ioport: Move IOPortRead/WriteFunc typedefs to memory.h |
Date: |
Fri, 21 Jun 2013 18:41:45 +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 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
- [Qemu-devel] [PATCH v2 05/13] prep: replace register_ioport*, (continued)
- [Qemu-devel] [PATCH v2 05/13] prep: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 06/13] vt82c686: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 02/13] applesmc: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 11/13] ioport: Switch dispatching to memory core layer, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 03/13] wdt_ib700: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 04/13] i82374: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 12/13] ioport: Remove unused old dispatching services, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 08/13] isa: implement isa_is_ioport_assigned via memory_region_find, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 01/13] adlib: replace register_ioport*, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 07/13] Privatize register_ioport_read/write, Jan Kiszka, 2013/06/21
- [Qemu-devel] [PATCH v2 13/13] ioport: Move IOPortRead/WriteFunc typedefs to memory.h,
Jan Kiszka <=
- Re: [Qemu-devel] [PATCH v2 00/13] Refactor portio dispatching, Paolo Bonzini, 2013/06/21