Commit 29d8ec7b authored by Edgar E. Iglesias's avatar Edgar E. Iglesias

exec: Make tb_invalidate_phys_addr input an AS

No functional change.
Reviewed-by: default avatarPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: default avatarEdgar E. Iglesias <edgar.iglesias@xilinx.com>
parent 8fa75749
...@@ -503,7 +503,8 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc) ...@@ -503,7 +503,8 @@ static void breakpoint_invalidate(CPUState *cpu, target_ulong pc)
{ {
hwaddr phys = cpu_get_phys_page_debug(cpu, pc); hwaddr phys = cpu_get_phys_page_debug(cpu, pc);
if (phys != -1) { if (phys != -1) {
tb_invalidate_phys_addr(phys | (pc & ~TARGET_PAGE_MASK)); tb_invalidate_phys_addr(&address_space_memory,
phys | (pc & ~TARGET_PAGE_MASK));
} }
} }
#endif #endif
......
...@@ -102,7 +102,7 @@ void tlb_flush(CPUArchState *env, int flush_global); ...@@ -102,7 +102,7 @@ void tlb_flush(CPUArchState *env, int flush_global);
void tlb_set_page(CPUArchState *env, target_ulong vaddr, void tlb_set_page(CPUArchState *env, target_ulong vaddr,
hwaddr paddr, int prot, hwaddr paddr, int prot,
int mmu_idx, target_ulong size); int mmu_idx, target_ulong size);
void tb_invalidate_phys_addr(hwaddr addr); void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr);
#else #else
static inline void tlb_flush_page(CPUArchState *env, target_ulong addr) static inline void tlb_flush_page(CPUArchState *env, target_ulong addr)
{ {
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "helper.h" #include "helper.h"
#include "qemu/host-utils.h" #include "qemu/host-utils.h"
#include "exec/softmmu_exec.h" #include "exec/softmmu_exec.h"
#include "exec/address-spaces.h"
static void do_unaligned_access(CPUXtensaState *env, static void do_unaligned_access(CPUXtensaState *env,
target_ulong addr, int is_write, int is_user, uintptr_t retaddr); target_ulong addr, int is_write, int is_user, uintptr_t retaddr);
...@@ -90,7 +91,7 @@ static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr) ...@@ -90,7 +91,7 @@ static void tb_invalidate_virtual_addr(CPUXtensaState *env, uint32_t vaddr)
int ret = xtensa_get_physical_addr(env, false, vaddr, 2, 0, int ret = xtensa_get_physical_addr(env, false, vaddr, 2, 0,
&paddr, &page_size, &access); &paddr, &page_size, &access);
if (ret == 0) { if (ret == 0) {
tb_invalidate_phys_addr(paddr); tb_invalidate_phys_addr(&address_space_memory, paddr);
} }
} }
......
...@@ -1357,13 +1357,13 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr) ...@@ -1357,13 +1357,13 @@ static TranslationBlock *tb_find_pc(uintptr_t tc_ptr)
} }
#if defined(TARGET_HAS_ICE) && !defined(CONFIG_USER_ONLY) #if defined(TARGET_HAS_ICE) && !defined(CONFIG_USER_ONLY)
void tb_invalidate_phys_addr(hwaddr addr) void tb_invalidate_phys_addr(AddressSpace *as, hwaddr addr)
{ {
ram_addr_t ram_addr; ram_addr_t ram_addr;
MemoryRegion *mr; MemoryRegion *mr;
hwaddr l = 1; hwaddr l = 1;
mr = address_space_translate(&address_space_memory, addr, &addr, &l, false); mr = address_space_translate(as, addr, &addr, &l, false);
if (!(memory_region_is_ram(mr) if (!(memory_region_is_ram(mr)
|| memory_region_is_romd(mr))) { || memory_region_is_romd(mr))) {
return; return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment