Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e45d48a34d4d1862d28d22c2533b8c6bb83b8c1f
Commit:     e45d48a34d4d1862d28d22c2533b8c6bb83b8c1f
Parent:     c8a1e9393a86f862ab9c8bc0db9b8a1822226f84
Author:     Christoph Hellwig <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 21:08:17 2007 +0200
Committer:  Arnd Bergmann <[EMAIL PROTECTED]>
CommitDate: Mon Apr 23 21:18:56 2007 +0200

    [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 <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/context.c |    2 +-
 arch/powerpc/platforms/cell/spufs/run.c     |    4 ++--
 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 ce17a28..a87d9ca 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)
        spin_lock_init(&ctx->mapping_lock);
        kref_init(&ctx->kref);
        mutex_init(&ctx->state_mutex);
-       init_MUTEX(&ctx->run_sema);
+       mutex_init(&ctx->run_mutex);
        init_waitqueue_head(&ctx->ibox_wq);
        init_waitqueue_head(&ctx->wbox_wq);
        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 1a8195b..7cf5b29 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,
        int ret;
        u32 status;
 
-       if (down_interruptible(&ctx->run_sema))
+       if (mutex_lock_interruptible(&ctx->run_mutex))
                return -ERESTARTSYS;
 
        ctx->ops->master_start(ctx);
@@ -345,6 +345,6 @@ out2:
 
 out:
        *event = ctx->event_return;
-       up(&ctx->run_sema);
+       mutex_unlock(&ctx->run_mutex);
        return ret;
 }
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h 
b/arch/powerpc/platforms/cell/spufs/spufs.h
index 9993c9b..dd5fc64 100644
--- a/arch/powerpc/platforms/cell/spufs/spufs.h
+++ b/arch/powerpc/platforms/cell/spufs/spufs.h
@@ -60,7 +60,7 @@ struct spu_context {
 
        enum { SPU_STATE_RUNNABLE, SPU_STATE_SAVED } state;
        struct mutex state_mutex;
-       struct semaphore run_sema;
+       struct mutex run_mutex;
 
        struct mm_struct *owner;
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to