]> git.proxmox.com Git - qemu.git/commit
linux-user: Clean up handling of clone() argument order
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 16 Jul 2013 17:44:57 +0000 (18:44 +0100)
committerRiku Voipio <riku.voipio@linaro.org>
Mon, 22 Jul 2013 18:54:36 +0000 (21:54 +0300)
commit4ce6243dc6216e35b5b691078ffa856463bfa8db
tree766e18e8257a50fa1aead446fe6178be9b9c4f56
parentd312bbe1051fa563b557de625ca57a466772abe5
linux-user: Clean up handling of clone() argument order

Linux manages to have three separate orderings of the arguments to
the clone() syscall on different architectures. In the kernel these
are selected via CONFIG_CLONE_BACKWARDS and CONFIG_CLONE_BACKWARDS2.
Clean up our implementation of this to use similar #define names
rather than a TARGET_* ifdef ladder.

This includes behaviour changes fixing bugs on cris, x86-64, m68k,
openrisc and unicore32.  cris had explicit but wrong handling; the
others were just incorrectly using QEMU's default, which happened
to be the equivalent of CONFIG_CLONE_BACKWARDS. (unicore32 appears
to be broken in the mainline kernel in that it tries to use arg3 for
both parent_tidptr and newtls simultaneously -- we don't attempt
to emulate this bug...)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Riku Voipio <riku.voipio@linaro.org>
linux-user/arm/syscall.h
linux-user/cris/syscall.h
linux-user/i386/syscall.h
linux-user/microblaze/syscall.h
linux-user/mips/syscall.h
linux-user/mips64/syscall.h
linux-user/ppc/syscall.h
linux-user/s390x/syscall.h
linux-user/sparc/syscall.h
linux-user/sparc64/syscall.h
linux-user/syscall.c