]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[POWERPC] spufs: streamline locking for isolated spu setup
authorChristoph Hellwig <hch@lst.de>
Mon, 23 Apr 2007 19:08:12 +0000 (21:08 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Mon, 23 Apr 2007 19:18:54 +0000 (21:18 +0200)
commit7ec18ab923a2e377ecb05c74a2d38f457f79950f
treeb722d8063bfc4b1b44ba67083649efab0c2e5a64
parenta475c2f43520cb095452201da57395000cfeb94c
[POWERPC] spufs: streamline locking for isolated spu setup

For quite a while now spu state is protected by a simple mutex instead
of the old rw_semaphore, and this means we can simplify the locking
around spu_setup_isolated a lot.

Instead of doing an spu_release before entering spu_setup_isolated and
then calling the complicated spu_acquire_exclusive we can now simply
enter the function locked an in guaranteed runnable state, so that the
only bit of spu_acquire_exclusive that's left is the call to
spu_unmap_mappings.

Similarly there's no more need to unlock and reacquire the state_mutex
when spu_setup_isolated is done, but we can always return with the
lock held and only drop it in spu_run_init in the failure case.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spufs/context.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/spufs.h