summaryrefslogtreecommitdiff
path: root/include/exec/exec-all.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-08-11 10:57:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-09-09 15:34:56 +0200
commit8fd19e6cfd5b6cdf028c6ac2ff4157ed831ea3a6 (patch)
treee8a94c171102729696fec8984437a40f7b6dd7b6 /include/exec/exec-all.h
parent756920876f60829fad0d15df4f3fa205077a8131 (diff)
downloadqemu-8fd19e6cfd5b6cdf028c6ac2ff4157ed831ea3a6.zip
exec: make mmap_lock/mmap_unlock globally available
There is some iffy lock hierarchy going on in translate-all.c. To fix it, we need to take the mmap_lock in cpu-exec.c. Make the functions globally available. Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/exec/exec-all.h')
-rw-r--r--include/exec/exec-all.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h
index 59544d4d89..05a5d5c53b 100644
--- a/include/exec/exec-all.h
+++ b/include/exec/exec-all.h
@@ -374,11 +374,17 @@ void tlb_fill(CPUState *cpu, target_ulong addr, int is_write, int mmu_idx,
#endif
#if defined(CONFIG_USER_ONLY)
+void mmap_lock(void);
+void mmap_unlock(void);
+
static inline tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr)
{
return addr;
}
#else
+static inline void mmap_lock(void) {}
+static inline void mmap_unlock(void) {}
+
/* cputlb.c */
tb_page_addr_t get_page_addr_code(CPUArchState *env1, target_ulong addr);
#endif