Home
last modified time | relevance | path

Searched hist:"274 cef5e" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/arch/powerpc/platforms/cell/spufs/
H A Dfile.c274cef5e Tue Oct 24 11:01:42 CDT 2006 Arnd Bergmann <arnd@arndb.de> [POWERPC] spufs: fix another off-by-one bug in spufs_mbox_read

Currently, spufs_mbox_read transfers more bytes than requested on a
read. If you ask for four bytes, you get eight. This fixes it to
transfer the largest multiple of four bytes that is less than or equal
to the number you asked for.

Note: one nasty property of this file in spufs is that you can only
read multiples of four bytes in the first place, since there is no way
to atomically put back a few bytes into the hardware register. Thus,
reading less than four bytes returns -EINVAL. Asking for more than
four returns the largest possible multiple of four.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
274cef5e Tue Oct 24 11:01:42 CDT 2006 Arnd Bergmann <arnd@arndb.de> [POWERPC] spufs: fix another off-by-one bug in spufs_mbox_read

Currently, spufs_mbox_read transfers more bytes than requested on a
read. If you ask for four bytes, you get eight. This fixes it to
transfer the largest multiple of four bytes that is less than or equal
to the number you asked for.

Note: one nasty property of this file in spufs is that you can only
read multiples of four bytes in the first place, since there is no way
to atomically put back a few bytes into the hardware register. Thus,
reading less than four bytes returns -EINVAL. Asking for more than
four returns the largest possible multiple of four.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>