diff options
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/context.c | 2 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/run.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/context.c b/arch/powerpc/platforms/cell/spufs/context.c index ce17a28471..a87d9ca3db 100644 --- a/arch/powerpc/platforms/cell/spufs/context.c +++ b/arch/powerpc/platforms/cell/spufs/context.c | |||
@@ -44,7 +44,7 @@ struct spu_context *alloc_spu_context(struct spu_gang *gang) | |||
44 | spin_lock_init(&ctx->mapping_lock); | 44 | spin_lock_init(&ctx->mapping_lock); |
45 | kref_init(&ctx->kref); | 45 | kref_init(&ctx->kref); |
46 | mutex_init(&ctx->state_mutex); | 46 | mutex_init(&ctx->state_mutex); |
47 | init_MUTEX(&ctx->run_sema); | 47 | mutex_init(&ctx->run_mutex); |
48 | init_waitqueue_head(&ctx->ibox_wq); | 48 | init_waitqueue_head(&ctx->ibox_wq); |
49 | init_waitqueue_head(&ctx->wbox_wq); | 49 | init_waitqueue_head(&ctx->wbox_wq); |
50 | init_waitqueue_head(&ctx->stop_wq); | 50 | init_waitqueue_head(&ctx->stop_wq); |
diff --git a/arch/powerpc/platforms/cell/spufs/run.c b/arch/powerpc/platforms/cell/spufs/run.c index 1a8195bf75..7cf5b298fa 100644 --- a/arch/powerpc/platforms/cell/spufs/run.c +++ b/arch/powerpc/platforms/cell/spufs/run.c | |||
@@ -288,7 +288,7 @@ long spufs_run_spu(struct file *file, struct spu_context *ctx, | |||
288 | int ret; | 288 | int ret; |
289 | u32 status; | 289 | u32 status; |
290 | 290 | ||
291 | if (down_interruptible(&ctx->run_sema)) | 291 | if (mutex_lock_interruptible(&ctx->run_mutex)) |
292 | return -ERESTARTSYS; | 292 | return -ERESTARTSYS; |
293 | 293 | ||
294 | ctx->ops->master_start(ctx); | 294 | ctx->ops->master_start(ctx); |
@@ -345,6 +345,6 @@ out2: | |||
345 | 345 | ||
346 | out: | 346 | out: |
347 | *event = ctx->event_return; | 347 | *event = ctx->event_return; |
348 | up(&ctx->run_sema); | 348 | mutex_unlock(&ctx->run_mutex); |
349 | return ret; | 349 | return ret; |
350 | } | 350 | } |
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index 9993c9b3cf..dd5fc6494e 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -60,7 +60,7 @@ struct spu_context { | |||
60 | 60 | ||
61 | enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state; | 61 | enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state; |
62 | struct mutex state_mutex; | 62 | struct mutex state_mutex; |
63 | struct semaphore run_sema; | 63 | struct mutex run_mutex; |
64 | 64 | ||
65 | struct mm_struct *owner; | 65 | struct mm_struct *owner; |
66 | 66 | ||