]> Git Repo - qemu.git/commitdiff
exec: make mmap_lock/mmap_unlock globally available
authorPaolo Bonzini <[email protected]>
Tue, 11 Aug 2015 08:57:52 +0000 (10:57 +0200)
committerPaolo Bonzini <[email protected]>
Wed, 9 Sep 2015 13:34:56 +0000 (15:34 +0200)
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 <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
bsd-user/qemu.h
include/exec/exec-all.h
linux-user/qemu.h
translate-all.c

index 21cc6023ee1da0a15baa761285ec2dbdcec1cf0d..735cb4042a589f244c559da9b889ee3e4829e731 100644 (file)
@@ -211,8 +211,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
                        abi_ulong new_addr);
 int target_msync(abi_ulong start, abi_ulong len, int flags);
 extern unsigned long last_brk;
-void mmap_lock(void);
-void mmap_unlock(void);
 void cpu_list_lock(void);
 void cpu_list_unlock(void);
 #if defined(CONFIG_USE_NPTL)
index 59544d4d893a13983afe5c6bd492c73ad3519be5..05a5d5c53bd12d05e76006862fc18b7275fcdfef 100644 (file)
@@ -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
index 8012cc2f5b866fde4ce62d8dea969cfe5e7a02b4..e8606b290c7dd1a72098a44107385a6ff46c3c48 100644 (file)
@@ -261,8 +261,6 @@ abi_long target_mremap(abi_ulong old_addr, abi_ulong old_size,
 int target_msync(abi_ulong start, abi_ulong len, int flags);
 extern unsigned long last_brk;
 extern abi_ulong mmap_next_start;
-void mmap_lock(void);
-void mmap_unlock(void);
 abi_ulong mmap_find_vma(abi_ulong, abi_ulong);
 void cpu_list_lock(void);
 void cpu_list_unlock(void);
index a12139ba0101857c06b14686f42310b6f4534069..e3c5c5e20acbc09beccb142f8108f5cb72e6cbac 100644 (file)
@@ -466,11 +466,6 @@ static inline PageDesc *page_find(tb_page_addr_t index)
     return page_find_alloc(index, 0);
 }
 
-#if !defined(CONFIG_USER_ONLY)
-#define mmap_lock() do { } while (0)
-#define mmap_unlock() do { } while (0)
-#endif
-
 #if defined(CONFIG_USER_ONLY)
 /* Currently it is not recommended to allocate big chunks of data in
    user mode. It will change when a dedicated libc will be used.  */
This page took 0.031225 seconds and 4 git commands to generate.