[POWERPC] spufs: make mailbox functions handle multiple elements
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Oct 2006 15:26:17 +0000 (17:26 +0200)
committerPaul Mackerras <paulus@samba.org>
Wed, 4 Oct 2006 23:21:01 +0000 (09:21 +1000)
commitcdcc89bb1c6e886a55fe00e2de3b9c65d41674c2
tree25084c939be997aa911d37f5f2dc92a0f1edf77d
parentac91cb8dae061ced64e475d0d70fac4a95298819
[POWERPC] spufs: make mailbox functions handle multiple elements

Since libspe2 will provide a function that can read/write
multiple mailbox elements at once, the kernel should handle
that efficiently.

read/write on the three mailbox files can now access the
spe context multiple times to operate on any number of
mailbox data elements.

If the spu application keeps writing to its outbound
mailbox, the read call will pick up all the data in a
single system call.

Unfortunately, if the user passes an invalid pointer,
we may lose a mailbox element on read, since we can't
put it back. This probably impossible to solve, if the
user also accesses the mailbox through direct register
access.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/platforms/cell/spufs/file.c