From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KGtHq-00052X-D9 for qemu-devel@nongnu.org; Thu, 10 Jul 2008 06:22:06 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KGtHm-0004yw-0V for qemu-devel@nongnu.org; Thu, 10 Jul 2008 06:22:05 -0400 Received: from [199.232.76.173] (port=36944 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KGtHl-0004yf-Mf for qemu-devel@nongnu.org; Thu, 10 Jul 2008 06:22:01 -0400 Received: from ms01.sssup.it ([193.205.80.99]:58155 helo=sssup.it) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KGtHi-0006DH-8J for qemu-devel@nongnu.org; Thu, 10 Jul 2008 06:21:59 -0400 Message-ID: <4875E2DB.4040205@gandalf.sssup.it> Date: Thu, 10 Jul 2008 12:22:19 +0200 From: michael MIME-Version: 1.0 Subject: Re: [Qemu-devel] SH4 TARGET_NR_clone References: <4875D472.5020807@gandalf.sssup.it> <20080710094853.GA4303@networkno.de> In-Reply-To: <20080710094853.GA4303@networkno.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Hi, Thiemo Seufer wrote: > michael wrote: > >> Hi, >> >> This patch fix the call of Clone in SH4 system >> > > What exactly does it fix? The kernel side of sys_clone seems to be no > different to other architectures. > > > Thiemo > > > Is not related to the kernel but how glibc pass the argument to you. Depends on the ARCH_FORK. I just notice that the tid is not in the same position. Michael >> This patch implements the correct TARGET_NR_clone for SH4 >> cpu. >> >> Signed-off-by: Michael Trimarchi >> >> Index: linux-user/syscall.c >> =================================================================== >> --- linux-user/syscall.c (revision 4865) >> +++ linux-user/syscall.c (working copy) >> @@ -53,6 +53,7 @@ >> //#include >> #include >> #include >> +#include >> >> #define termios host_termios >> #define winsize host_winsize >> @@ -4657,7 +4658,11 @@ >> ret = get_errno(fsync(arg1)); >> break; >> case TARGET_NR_clone: >> +#if !defined(TARGET_SH4) >> ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg4, arg5)); >> +#else >> + ret = get_errno(do_fork(cpu_env, arg1, arg2, arg3, arg5, arg4)); >> +#endif >> break; >> #ifdef __NR_exit_group >> /* new thread calls */ >> > > > >