Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49776d30aea903fb2f9966c8e9b6f23ae5f7c937
Commit:     49776d30aea903fb2f9966c8e9b6f23ae5f7c937
Parent:     d1450317554d52e0e4a454806c4d05bb2a834f00
Author:     Kazunori Asayama <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 20 21:39:30 2007 +0200
Committer:  Arnd Bergmann <[EMAIL PROTECTED]>
CommitDate: Fri Jul 20 21:41:47 2007 +0200

    [CELL] spufs: Avoid unexpectedly restaring MFC during context save
    
    The current SPU context saving procedure in SPUFS unexpectedly
    restarts MFC when halting decrementer, because MFC_CNTL[Dh] is set
    without MFC_CNTL[Sm]. This bug causes, for example, saving broken DMA
    queues. Here is a patch to fix the problem.
    
    Signed-off-by: Kazunori Asayama <[EMAIL PROTECTED]>
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Arnd Bergmann <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/switch.c |    3 ++-
 include/asm-powerpc/spu.h                  |    1 +
 2 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/switch.c 
b/arch/powerpc/platforms/cell/spufs/switch.c
index 9c506ba..827aada 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -271,7 +271,8 @@ static inline void halt_mfc_decr(struct spu_state *csa, 
struct spu *spu)
         *     Write MFC_CNTL[Dh] set to a '1' to halt
         *     the decrementer.
         */
-       out_be64(&priv2->mfc_control_RW, MFC_CNTL_DECREMENTER_HALTED);
+       out_be64(&priv2->mfc_control_RW,
+                MFC_CNTL_DECREMENTER_HALTED | MFC_CNTL_SUSPEND_MASK);
        eieio();
 }
 
diff --git a/include/asm-powerpc/spu.h b/include/asm-powerpc/spu.h
index 42d88a6..a034f03 100644
--- a/include/asm-powerpc/spu.h
+++ b/include/asm-powerpc/spu.h
@@ -411,6 +411,7 @@ struct spu_priv2 {
 #define MFC_CNTL_RESUME_DMA_QUEUE              (0ull << 0)
 #define MFC_CNTL_SUSPEND_DMA_QUEUE             (1ull << 0)
 #define MFC_CNTL_SUSPEND_DMA_QUEUE_MASK                (1ull << 0)
+#define MFC_CNTL_SUSPEND_MASK                  (1ull << 4)
 #define MFC_CNTL_NORMAL_DMA_QUEUE_OPERATION    (0ull << 8)
 #define MFC_CNTL_SUSPEND_IN_PROGRESS           (1ull << 8)
 #define MFC_CNTL_SUSPEND_COMPLETE              (3ull << 8)
-
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