• Arnd Bergmann's avatar
    [POWERPC] spufs: make mailbox functions handle multiple elements · cdcc89bb
    Arnd Bergmann authored
    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: default avatarArnd Bergmann <arnd.bergmann@de.ibm.com>
    Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
    cdcc89bb
file.c 33.4 KB