Patchwork [qom-cpu,v4,08/18] memory_mapping: Move MemoryMappingList typedef to qemu/typedefs.h

login
register
mail settings
Submitter Andreas Färber
Date June 9, 2013, 4:10 p.m.
Message ID <1370794247-28267-9-git-send-email-afaerber@suse.de>
Download mbox | patch
Permalink /patch/250053/
State New
Headers show

Comments

Andreas Färber - June 9, 2013, 4:10 p.m.
This will avoid issues with hwaddr and ram_addr_t when including
sysemu/memory_mapping.h for CONFIG_USER_ONLY.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/qemu/typedefs.h         | 2 ++
 include/sysemu/memory_mapping.h | 5 +++--
 2 files changed, 5 insertions(+), 2 deletions(-)

Patch

diff --git a/include/qemu/typedefs.h b/include/qemu/typedefs.h
index afe4ec7..698fc03 100644
--- a/include/qemu/typedefs.h
+++ b/include/qemu/typedefs.h
@@ -22,6 +22,8 @@  typedef struct AddressSpace AddressSpace;
 typedef struct MemoryRegion MemoryRegion;
 typedef struct MemoryRegionSection MemoryRegionSection;
 
+typedef struct MemoryMappingList MemoryMappingList;
+
 typedef struct NICInfo NICInfo;
 typedef struct HCIInfo HCIInfo;
 typedef struct AudioState AudioState;
diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 6f01524..1f71c32 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -15,6 +15,7 @@ 
 #define MEMORY_MAPPING_H
 
 #include "qemu/queue.h"
+#include "qemu/typedefs.h"
 
 /* The physical and virtual address in the memory mapping are contiguous. */
 typedef struct MemoryMapping {
@@ -24,11 +25,11 @@  typedef struct MemoryMapping {
     QTAILQ_ENTRY(MemoryMapping) next;
 } MemoryMapping;
 
-typedef struct MemoryMappingList {
+struct MemoryMappingList {
     unsigned int num;
     MemoryMapping *last_mapping;
     QTAILQ_HEAD(, MemoryMapping) head;
-} MemoryMappingList;
+};
 
 int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);