[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v2 1/4] memory: make memory API parsable by gtkdoc-s
From: |
Anthony Liguori |
Subject: |
[Qemu-devel] [PATCH v2 1/4] memory: make memory API parsable by gtkdoc-scan (v2) |
Date: |
Wed, 14 Dec 2011 14:01:11 -0600 |
gtkdoc-scan cannot handle nested structs so remove those from the memory API.
Signed-off-by: Anthony Liguori <address@hidden>
---
v1 -> v2
- no need to use underscores anymore
---
memory.h | 73 ++++++++++++++++++++++++++++++++++---------------------------
1 files changed, 41 insertions(+), 32 deletions(-)
diff --git a/memory.h b/memory.h
index beae127..057aa34 100644
--- a/memory.h
+++ b/memory.h
@@ -30,6 +30,8 @@ typedef struct MemoryRegionOps MemoryRegionOps;
typedef struct MemoryRegion MemoryRegion;
typedef struct MemoryRegionPortio MemoryRegionPortio;
typedef struct MemoryRegionMmio MemoryRegionMmio;
+typedef struct MemoryRegionGuestConstraints MemoryRegionGuestConstraints;
+typedef struct MemoryRegionInternalConstraints MemoryRegionInternalConstraints;
/* Must match *_DIRTY_FLAGS in cpu-all.h. To be replaced with dynamic
* registration.
@@ -43,6 +45,42 @@ struct MemoryRegionMmio {
CPUWriteMemoryFunc *write[3];
};
+struct MemoryRegionGuestConstraints
+{
+ /* If nonzero, specify bounds on access sizes beyond which a machine
+ * check is thrown.
+ */
+ unsigned min_access_size;
+ unsigned max_access_size;
+ /* If true, unaligned accesses are supported. Otherwise unaligned
+ * accesses throw machine checks.
+ */
+ bool unaligned;
+ /*
+ * If present, and returns #false, the transaction is not accepted
+ * by the device (and results in machine dependent behaviour such
+ * as a machine check exception).
+ */
+ bool (*accepts)(void *opaque, target_phys_addr_t addr,
+ unsigned size, bool is_write);
+};
+
+struct MemoryRegionInternalConstraints
+{
+ /* If nonzero, specifies the minimum size implemented. Smaller sizes
+ * will be rounded upwards and a partial result will be returned.
+ */
+ unsigned min_access_size;
+ /* If nonzero, specifies the maximum size implemented. Larger sizes
+ * will be done as a series of accesses with smaller sizes.
+ */
+ unsigned max_access_size;
+ /* If true, unaligned accesses are supported. Otherwise all accesses
+ * are converted to (possibly multiple) naturally aligned accesses.
+ */
+ bool unaligned;
+};
+
/*
* Memory region callbacks
*/
@@ -61,39 +99,10 @@ struct MemoryRegionOps {
enum device_endian endianness;
/* Guest-visible constraints: */
- struct {
- /* If nonzero, specify bounds on access sizes beyond which a machine
- * check is thrown.
- */
- unsigned min_access_size;
- unsigned max_access_size;
- /* If true, unaligned accesses are supported. Otherwise unaligned
- * accesses throw machine checks.
- */
- bool unaligned;
- /*
- * If present, and returns #false, the transaction is not accepted
- * by the device (and results in machine dependent behaviour such
- * as a machine check exception).
- */
- bool (*accepts)(void *opaque, target_phys_addr_t addr,
- unsigned size, bool is_write);
- } valid;
+ MemoryRegionGuestConstraints valid;
+
/* Internal implementation constraints: */
- struct {
- /* If nonzero, specifies the minimum size implemented. Smaller sizes
- * will be rounded upwards and a partial result will be returned.
- */
- unsigned min_access_size;
- /* If nonzero, specifies the maximum size implemented. Larger sizes
- * will be done as a series of accesses with smaller sizes.
- */
- unsigned max_access_size;
- /* If true, unaligned accesses are supported. Otherwise all accesses
- * are converted to (possibly multiple) naturally aligned accesses.
- */
- bool unaligned;
- } impl;
+ MemoryRegionInternalConstraints impl;
/* If .read and .write are not present, old_portio may be used for
* backwards compatibility with old portio registration
--
1.7.4.1