* [Qemu-devel] [PATCH] linux-user: Fix pipe syscall return for SPARC
@ 2013-07-06 16:39 Peter Maydell
2013-07-18 10:17 ` Peter Maydell
0 siblings, 1 reply; 2+ messages in thread
From: Peter Maydell @ 2013-07-06 16:39 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Riku Voipio, patches
SPARC is one of the CPUs which has a funny syscall ABI for the
pipe syscall; add it to the set of special cases in do_pipe().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
bash is much more useful with this patch -- without it, it will
close() stdin instead of one end of its pipe to a child process,
so after the first time you run a program bash will exit...
It's this kind of "basic stuff doesn't work" that makes me
happier about being a bit cavalier with code cleanups,
enabling NPTL, etc for some of the minor target archs in
linux-user -- it's clear that some of them have simply never
been tested for anything more serious than "run some trivial
binary"...
linux-user/syscall.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index cdd0c28..aea9be4 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1030,6 +1030,9 @@ static abi_long do_pipe(void *cpu_env, abi_ulong pipedes,
#elif defined(TARGET_SH4)
((CPUSH4State*)cpu_env)->gregs[1] = host_pipe[1];
return host_pipe[0];
+#elif defined(TARGET_SPARC)
+ ((CPUSPARCState*)cpu_env)->regwptr[1] = host_pipe[1];
+ return host_pipe[0];
#endif
}
--
1.7.9.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] linux-user: Fix pipe syscall return for SPARC
2013-07-06 16:39 [Qemu-devel] [PATCH] linux-user: Fix pipe syscall return for SPARC Peter Maydell
@ 2013-07-18 10:17 ` Peter Maydell
0 siblings, 0 replies; 2+ messages in thread
From: Peter Maydell @ 2013-07-18 10:17 UTC (permalink / raw)
To: qemu-devel; +Cc: Blue Swirl, Riku Voipio, patches
Ping?
thanks
-- PMM
On 6 July 2013 17:39, Peter Maydell <peter.maydell@linaro.org> wrote:
> SPARC is one of the CPUs which has a funny syscall ABI for the
> pipe syscall; add it to the set of special cases in do_pipe().
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
> bash is much more useful with this patch -- without it, it will
> close() stdin instead of one end of its pipe to a child process,
> so after the first time you run a program bash will exit...
>
> It's this kind of "basic stuff doesn't work" that makes me
> happier about being a bit cavalier with code cleanups,
> enabling NPTL, etc for some of the minor target archs in
> linux-user -- it's clear that some of them have simply never
> been tested for anything more serious than "run some trivial
> binary"...
>
> linux-user/syscall.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index cdd0c28..aea9be4 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -1030,6 +1030,9 @@ static abi_long do_pipe(void *cpu_env, abi_ulong pipedes,
> #elif defined(TARGET_SH4)
> ((CPUSH4State*)cpu_env)->gregs[1] = host_pipe[1];
> return host_pipe[0];
> +#elif defined(TARGET_SPARC)
> + ((CPUSPARCState*)cpu_env)->regwptr[1] = host_pipe[1];
> + return host_pipe[0];
> #endif
> }
>
> --
> 1.7.9.5
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-07-18 10:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-06 16:39 [Qemu-devel] [PATCH] linux-user: Fix pipe syscall return for SPARC Peter Maydell
2013-07-18 10:17 ` Peter Maydell
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.