summaryrefslogtreecommitdiffstats
path: root/softmmu_template.h
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2015-04-26 16:49:23 +0100
committerPeter Maydell <peter.maydell@linaro.org>2015-04-26 16:49:23 +0100
commit3b6434953934e6d4a776ed426d8c6d6badee176f (patch)
tree0c2afed915cf5687dd0be64cc9042475c34cfc9e /softmmu_template.h
parentcc05c43ad942165ecc6ffd39e41991bee43af044 (diff)
downloadhqemu-3b6434953934e6d4a776ed426d8c6d6badee176f.zip
hqemu-3b6434953934e6d4a776ed426d8c6d6badee176f.tar.gz
memory: Replace io_mem_read/write with memory_region_dispatch_read/write
Rather than retaining io_mem_read/write as simple wrappers around the memory_region_dispatch_read/write functions, make the latter public and change all the callers to use them, since we need to touch all the callsites anyway to add MemTxAttrs and MemTxResult support. Delete io_mem_read and io_mem_write entirely. (All the callers currently pass MEMTXATTRS_UNSPECIFIED and convert the return value back to bool or ignore it.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Diffstat (limited to 'softmmu_template.h')
-rw-r--r--softmmu_template.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/softmmu_template.h b/softmmu_template.h
index 0e3dd35..9c1d53e 100644
--- a/softmmu_template.h
+++ b/softmmu_template.h
@@ -158,7 +158,8 @@ static inline DATA_TYPE glue(io_read, SUFFIX)(CPUArchState *env,
}
cpu->mem_io_vaddr = addr;
- io_mem_read(mr, physaddr, &val, 1 << SHIFT);
+ memory_region_dispatch_read(mr, physaddr, &val, 1 << SHIFT,
+ MEMTXATTRS_UNSPECIFIED);
return val;
}
#endif
@@ -378,7 +379,8 @@ static inline void glue(io_write, SUFFIX)(CPUArchState *env,
cpu->mem_io_vaddr = addr;
cpu->mem_io_pc = retaddr;
- io_mem_write(mr, physaddr, val, 1 << SHIFT);
+ memory_region_dispatch_write(mr, physaddr, val, 1 << SHIFT,
+ MEMTXATTRS_UNSPECIFIED);
}
void helper_le_st_name(CPUArchState *env, target_ulong addr, DATA_TYPE val,
OpenPOWER on IntegriCloud