]> pilppa.org Git - linux-2.6-omap-h63xx.git/commit
[PATCH] spufs: allow SPU code to do syscalls
authorArnd Bergmann <abergman@de.ibm.com>
Wed, 22 Mar 2006 23:00:09 +0000 (00:00 +0100)
committerPaul Mackerras <paulus@samba.org>
Mon, 27 Mar 2006 03:48:24 +0000 (14:48 +1100)
commit2dd14934c9138c562d93c501e88c6d6f061eb8ba
tree2eda4f517dd319989908a80bfbe06ce629932f77
parenta7f31841a40776605c834053ad1eb82d539bd79f
[PATCH] spufs: allow SPU code to do syscalls

An SPU does not have a way to implement system calls
itself, but it can create intercepts to the kernel.

This patch uses the method defined by the JSRE interface
for C99 host library calls from an SPU to implement
Linux system calls. It uses the reserved SPU stop code
0x2104 for this, using the structure layout and syscall
numbers for ppc64-linux.

I'm still undecided wether it is better to have a list
of allowed syscalls or a list of forbidden syscalls,
since we can't allow an SPU to call all syscalls that
are defined for ppc64-linux.

This patch implements the easier choice of them, with a
blacklist that only prevents an SPU from calling anything
that interacts with its own execution, e.g fork, execve,
clone, vfork, exit, spu_run and spu_create and everything
that deals with signals.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/Makefile
arch/powerpc/platforms/cell/spu_callbacks.c [new file with mode: 0644]
arch/powerpc/platforms/cell/spufs/run.c
include/asm-powerpc/spu.h