提交 c527ee8f 编写于 作者: P Paul Brook

Avoid tlb_set_page in userspace emulation

tlb_set_page isn't meaningful for userspace emulation, so remove it.
Signed-off-by: NPaul Brook <paul@codesourcery.com>
上级 c04b2b78
...@@ -86,6 +86,7 @@ void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t ...@@ -86,6 +86,7 @@ void tb_invalidate_phys_page_range(target_phys_addr_t start, target_phys_addr_t
void tb_invalidate_page_range(target_ulong start, target_ulong end); void tb_invalidate_page_range(target_ulong start, target_ulong end);
void tlb_flush_page(CPUState *env, target_ulong addr); void tlb_flush_page(CPUState *env, target_ulong addr);
void tlb_flush(CPUState *env, int flush_global); void tlb_flush(CPUState *env, int flush_global);
#if !defined(CONFIG_USER_ONLY)
int tlb_set_page_exec(CPUState *env, target_ulong vaddr, int tlb_set_page_exec(CPUState *env, target_ulong vaddr,
target_phys_addr_t paddr, int prot, target_phys_addr_t paddr, int prot,
int mmu_idx, int is_softmmu); int mmu_idx, int is_softmmu);
...@@ -97,6 +98,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr, ...@@ -97,6 +98,7 @@ static inline int tlb_set_page(CPUState *env1, target_ulong vaddr,
prot |= PAGE_EXEC; prot |= PAGE_EXEC;
return tlb_set_page_exec(env1, vaddr, paddr, prot, mmu_idx, is_softmmu); return tlb_set_page_exec(env1, vaddr, paddr, prot, mmu_idx, is_softmmu);
} }
#endif
#define CODE_GEN_ALIGN 16 /* must be >= of the size of a icache line */ #define CODE_GEN_ALIGN 16 /* must be >= of the size of a icache line */
......
...@@ -1333,6 +1333,18 @@ static void breakpoint_invalidate(CPUState *env, target_ulong pc) ...@@ -1333,6 +1333,18 @@ static void breakpoint_invalidate(CPUState *env, target_ulong pc)
#endif #endif
#endif /* TARGET_HAS_ICE */ #endif /* TARGET_HAS_ICE */
#if defined(CONFIG_USER_ONLY)
void cpu_watchpoint_remove_all(CPUState *env, int mask)
{
}
int cpu_watchpoint_insert(CPUState *env, target_ulong addr, target_ulong len,
int flags, CPUWatchpoint **watchpoint)
{
return -ENOSYS;
}
#else
/* Add a watchpoint. */ /* Add a watchpoint. */
int cpu_watchpoint_insert(CPUState *env, target_ulong addr, target_ulong len, int cpu_watchpoint_insert(CPUState *env, target_ulong addr, target_ulong len,
int flags, CPUWatchpoint **watchpoint) int flags, CPUWatchpoint **watchpoint)
...@@ -1402,6 +1414,7 @@ void cpu_watchpoint_remove_all(CPUState *env, int mask) ...@@ -1402,6 +1414,7 @@ void cpu_watchpoint_remove_all(CPUState *env, int mask)
cpu_watchpoint_remove_by_ref(env, wp); cpu_watchpoint_remove_by_ref(env, wp);
} }
} }
#endif
/* Add a breakpoint. */ /* Add a breakpoint. */
int cpu_breakpoint_insert(CPUState *env, target_ulong pc, int flags, int cpu_breakpoint_insert(CPUState *env, target_ulong pc, int flags,
...@@ -2165,13 +2178,6 @@ void tlb_flush_page(CPUState *env, target_ulong addr) ...@@ -2165,13 +2178,6 @@ void tlb_flush_page(CPUState *env, target_ulong addr)
{ {
} }
int tlb_set_page_exec(CPUState *env, target_ulong vaddr,
target_phys_addr_t paddr, int prot,
int mmu_idx, int is_softmmu)
{
return 0;
}
/* /*
* Walks guest process memory "regions" one by one * Walks guest process memory "regions" one by one
* and calls callback function 'fn' for each region. * and calls callback function 'fn' for each region.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册