summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2013-07-25 15:56:06 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2013-07-25 15:56:06 -0500
commit874ec3c5b3821bb964f9f37b2f930f2a9ce51652 (patch)
tree6ae8ca87e159fa7ebf3ea2db64e9bacae59e9c0c /include
parentd2f5ea9704af781d4cf14e4be08bb4e37a180260 (diff)
parenta033381758841837edaf307e20edf019c5900609 (diff)
downloadhqemu-874ec3c5b3821bb964f9f37b2f930f2a9ce51652.zip
hqemu-874ec3c5b3821bb964f9f37b2f930f2a9ce51652.tar.gz
Merge remote-tracking branch 'riku/linux-user-for-upstream' into staging
* riku/linux-user-for-upstream: (21 commits) linux-user: Handle compressed ISA encodings when processing MIPS exceptions linux-user: Unlock mmap_lock when resuming guest from page_unprotect linux-user: Reset copied CPUs in cpu_copy() always linux-user: Fix epoll on ARM hosts linux-user: fix segmentation fault passing with h2g(x) != x linux-user: Fix pipe syscall return for SPARC linux-user: Fix target_stat and target_stat64 for OpenRISC linux-user: Avoid conditional cpu_reset() configure: Make NPTL non-optional linux-user: Enable NPTL for x86-64 linux-user: Add i386 TLS setter linux-user: Clean up handling of clone() argument order linux-user: Add missing 'break' in i386 get_thread_area syscall linux-user: Enable NPTL for m68k linux-user: Enable NPTL for SPARC targets linux-user: Enable NPTL for OpenRISC linux-user: Move includes of target-specific headers to end of qemu.h configure: Enable threading for unicore32-linux-user configure: Enable threading on all ppc and mips linux-user targets configure: Don't say target_nptl="no" if there is no linux-user target ... Conflicts: linux-user/main.c Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/exec/cpu-all.h8
-rw-r--r--include/exec/gdbstub.h2
2 files changed, 7 insertions, 3 deletions
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index f2800ec..a407b50 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -210,11 +210,15 @@ extern unsigned long reserved_va;
})
#endif
-#define h2g(x) ({ \
+#define h2g_nocheck(x) ({ \
unsigned long __ret = (unsigned long)(x) - GUEST_BASE; \
+ (abi_ulong)__ret; \
+})
+
+#define h2g(x) ({ \
/* Check if given address fits target address space */ \
assert(h2g_valid(x)); \
- (abi_ulong)__ret; \
+ h2g_nocheck(x); \
})
#define saddr(x) g2h(x)
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h
index 1bd00ae..7ea1ad7 100644
--- a/include/exec/gdbstub.h
+++ b/include/exec/gdbstub.h
@@ -32,7 +32,7 @@ void gdb_register_coprocessor(CPUState *cpu,
static inline int cpu_index(CPUState *cpu)
{
-#if defined(CONFIG_USER_ONLY) && defined(CONFIG_USE_NPTL)
+#if defined(CONFIG_USER_ONLY)
return cpu->host_tid;
#else
return cpu->cpu_index + 1;
OpenPOWER on IntegriCloud