summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/context.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-01-04 20:31:24 +0100
committerPaul Mackerras <paulus@samba.org>2006-01-09 15:44:39 +1100
commit5ef8224aaa9220bfecb362f0802cf78aad47c02a (patch)
tree3288b9510d4ab36d627cf85f1b4160a6d8ff9823 /arch/powerpc/platforms/cell/spufs/context.c
parente80358ad8606382154d97165121602dfae213e4a (diff)
downloadop-kernel-dev-5ef8224aaa9220bfecb362f0802cf78aad47c02a.zip
op-kernel-dev-5ef8224aaa9220bfecb362f0802cf78aad47c02a.tar.gz
[PATCH] spufs: serialize sys_spu_run per spu
During an earlier cleanup, we lost the serialization of multiple spu_run calls performed on the same spu_context. In order to get this back, introduce a mutex in the spu_context that is held inside of spu_run. Noticed by Al Viro. Signed-off-by: Arnd Bergmann <arndb@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/context.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/context.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c
index 903c35d..c5cd55a 100644
--- a/arch/powerpc/platforms/cell/spufs/context.c
+++ b/arch/powerpc/platforms/cell/spufs/context.c
@@ -43,6 +43,7 @@ struct spu_context *alloc_spu_context(struct address_space *local_store)
spin_lock_init(&ctx->mmio_lock);
kref_init(&ctx->kref);
init_rwsem(&ctx->state_sema);
+ init_MUTEX(&ctx->run_sema);
init_waitqueue_head(&ctx->ibox_wq);
init_waitqueue_head(&ctx->wbox_wq);
init_waitqueue_head(&ctx->stop_wq);
OpenPOWER on IntegriCloud