Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=732377c5f5335e227171c76532613f45b4067f25
Commit:     732377c5f5335e227171c76532613f45b4067f25
Parent:     eebead5b8ff89340dc18ceec996157d0eb7d0287
Author:     Masato Noguchi <[EMAIL PROTECTED]>
AuthorDate: Fri Feb 8 15:50:41 2008 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Feb 8 19:52:35 2008 +1100

    [POWERPC] spufs: Update SPU_Status[CISHP] in backing runcntl write
    
    Currently, the kernel may fail to restart a SPE context which
    has stopped and been swapped out.
    
    This changes spu_backing_runcntl_write to emulate the real
    SPU_Status register exactly.  When the SPU Run Control register
    is written with SPU_RunCntl[Run] set to '1', the physical SPU
    automatically sets SPU_Status[R] and clears SPU_Status[CISHP].
    
    Signed-off-by: Masato Noguchi <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/backing_ops.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/backing_ops.c 
b/arch/powerpc/platforms/cell/spufs/backing_ops.c
index 50d98a1..64eb15b 100644
--- a/arch/powerpc/platforms/cell/spufs/backing_ops.c
+++ b/arch/powerpc/platforms/cell/spufs/backing_ops.c
@@ -288,6 +288,12 @@ static void spu_backing_runcntl_write(struct spu_context 
*ctx, u32 val)
        spin_lock(&ctx->csa.register_lock);
        ctx->csa.prob.spu_runcntl_RW = val;
        if (val & SPU_RUNCNTL_RUNNABLE) {
+               ctx->csa.prob.spu_status_R &=
+                       ~SPU_STATUS_STOPPED_BY_STOP &
+                       ~SPU_STATUS_STOPPED_BY_HALT &
+                       ~SPU_STATUS_SINGLE_STEP &
+                       ~SPU_STATUS_INVALID_INSTR &
+                       ~SPU_STATUS_INVALID_CH;
                ctx->csa.prob.spu_status_R |= SPU_STATUS_RUNNING;
        } else {
                ctx->csa.prob.spu_status_R &= ~SPU_STATUS_RUNNING;
-
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