diff options
author | Christoph Hellwig <hch@lst.de> | 2007-04-23 15:08:17 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-04-23 15:18:56 -0400 |
commit | e45d48a34d4d1862d28d22c2533b8c6bb83b8c1f (patch) | |
tree | 55f4ded08f94739beaac92a998aaef2b6c88eb9c /arch | |
parent | c8a1e9393a86f862ab9c8bc0db9b8a1822226f84 (diff) |
[POWERPC] spufs: turn run_sema into run_mutex
There is no reason for run_sema to be a struct semaphore. Changing
it to a mutex and rename it accordingly.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Diffstat (limited to 'arch')
-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 ce17a2847184..a87d9ca3dba2 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 1a8195bf75d5..7cf5b298fa13 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 9993c9b3cffc..dd5fc6494ecf 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 | ||