diff options
author | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2013-12-17 15:22:06 +1000 |
---|---|---|
committer | Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 2014-02-11 22:57:32 +1000 |
commit | 5ce5944dc0ffdc43c11b5cad11e526f699aabe4c (patch) | |
tree | 5969aafd8a4716d4bc43422711c38b8182a13bc5 /exec.c | |
parent | 2198a121434b806636318d62c89595c1955e825a (diff) |
exec: Make stw_*_phys input an AddressSpace
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Diffstat (limited to 'exec.c')
-rw-r--r-- | exec.c | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -1628,7 +1628,7 @@ static void watch_mem_write(void *opaque, hwaddr addr, stb_phys(addr, val); break; case 2: - stw_phys(addr, val); + stw_phys(&address_space_memory, addr, val); break; case 4: stl_phys(&address_space_memory, addr, val); @@ -2628,7 +2628,8 @@ void stb_phys(hwaddr addr, uint32_t val) } /* warning: addr must be aligned */ -static inline void stw_phys_internal(hwaddr addr, uint32_t val, +static inline void stw_phys_internal(AddressSpace *as, + hwaddr addr, uint32_t val, enum device_endian endian) { uint8_t *ptr; @@ -2636,8 +2637,7 @@ static inline void stw_phys_internal(hwaddr addr, uint32_t val, hwaddr l = 2; hwaddr addr1; - mr = address_space_translate(&address_space_memory, addr, &addr1, &l, - true); + mr = address_space_translate(as, addr, &addr1, &l, true); if (l < 2 || !memory_access_is_direct(mr, true)) { #if defined(TARGET_WORDS_BIGENDIAN) if (endian == DEVICE_LITTLE_ENDIAN) { @@ -2668,19 +2668,19 @@ static inline void stw_phys_internal(hwaddr addr, uint32_t val, } } -void stw_phys(hwaddr addr, uint32_t val) +void stw_phys(AddressSpace *as, hwaddr addr, uint32_t val) { - stw_phys_internal(addr, val, DEVICE_NATIVE_ENDIAN); + stw_phys_internal(as, addr, val, DEVICE_NATIVE_ENDIAN); } -void stw_le_phys(hwaddr addr, uint32_t val) +void stw_le_phys(AddressSpace *as, hwaddr addr, uint32_t val) { - stw_phys_internal(addr, val, DEVICE_LITTLE_ENDIAN); + stw_phys_internal(as, addr, val, DEVICE_LITTLE_ENDIAN); } -void stw_be_phys(hwaddr addr, uint32_t val) +void stw_be_phys(AddressSpace *as, hwaddr addr, uint32_t val) { - stw_phys_internal(addr, val, DEVICE_BIG_ENDIAN); + stw_phys_internal(as, addr, val, DEVICE_BIG_ENDIAN); } /* XXX: optimize */ |