Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=62ee68e3bcb0d056aae5b36dea0388ca25572cdf
Commit:     62ee68e3bcb0d056aae5b36dea0388ca25572cdf
Parent:     aac2e68481681a362ab6f44fc515034e2a4c7f2c
Author:     Arnd Bergmann <[EMAIL PROTECTED]>
AuthorDate: Tue Aug 21 10:06:22 2007 +0800
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Thu Aug 30 16:27:18 2007 +1000

    [POWERPC] spufs: Fix update of mailbox status register during backed wbox 
write
    
    When a process writes into the inbound spu mailbox (wbox) while the
    context is saved, we accidentally break the contents of the mb_stat_R
    register by clearing other entries of the mailbox status register. This
    can cause the user side to hang.
    
    This change fixes the problem by only altering the appropriate bits
    of the mailbox status register during a backing-store write.
    
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/backing_ops.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c 
b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index 07a0e81..ec01214 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -162,7 +162,8 @@ static int spu_backing_wbox_write(struct spu_context *ctx, 
u32 data)
                BUG_ON(avail != (4 - slot));
                ctx->csa.spu_mailbox_data[slot] = data;
                ctx->csa.spu_chnlcnt_RW[29] = ++slot;
-               ctx->csa.prob.mb_stat_R = (((4 - slot) & 0xff) << 8);
+               ctx->csa.prob.mb_stat_R &= ~(0x00ff00);
+               ctx->csa.prob.mb_stat_R |= (((4 - slot) & 0xff) << 8);
                gen_spu_event(ctx, MFC_SPU_MAILBOX_WRITTEN_EVENT);
                ret = 4;
        } else {
-
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