Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=390c53430498c9973e015432806edd53b2efe6c6
Commit:     390c53430498c9973e015432806edd53b2efe6c6
Parent:     e097b513285e616215b23af234d127298bb8d89a
Author:     Arnd Bergmann <[EMAIL PROTECTED]>
AuthorDate: Mon Apr 23 21:08:10 2007 +0200
Committer:  Arnd Bergmann <[EMAIL PROTECTED]>
CommitDate: Mon Apr 23 21:18:54 2007 +0200

    [POWERPC] spufs: add memory barriers after set_bit
    
    set_bit does not guarantee ordering on powerpc, so using it
    for communication between threads requires explicit
    mb() calls.
    
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/sched.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/sched.c 
b/arch/powerpc/platforms/cell/spufs/sched.c
index 405a055..1582d76 100644
--- a/arch/powerpc/platforms/cell/spufs/sched.c
+++ b/arch/powerpc/platforms/cell/spufs/sched.c
@@ -76,6 +76,7 @@ void spu_start_tick(struct spu_context *ctx)
                 * Make sure the exiting bit is cleared.
                 */
                clear_bit(SPU_SCHED_EXITING, &ctx->sched_flags);
+               mb();
                queue_delayed_work(spu_sched_wq, &ctx->sched_work, 
SPU_TIMESLICE);
        }
 }
@@ -88,6 +89,7 @@ void spu_stop_tick(struct spu_context *ctx)
                 * makes sure it does not rearm itself anymore.
                 */
                set_bit(SPU_SCHED_EXITING, &ctx->sched_flags);
+               mb();
                cancel_delayed_work(&ctx->sched_work);
        }
 }
@@ -239,6 +241,7 @@ static void spu_add_to_rq(struct spu_context *ctx)
        spin_lock(&spu_prio->runq_lock);
        list_add_tail(&ctx->rq, &spu_prio->runq[ctx->prio]);
        set_bit(ctx->prio, spu_prio->bitmap);
+       mb();
        spin_unlock(&spu_prio->runq_lock);
 }
 
-
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