+ spufs-avoid-unexpectedly-restaring-mfc-during-context-save.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     spufs: avoid unexpectedly restaring MFC during context save
has been added to the -mm tree.  Its filename is
     spufs-avoid-unexpectedly-restaring-mfc-during-context-save.patch

*** Remember to use Documentation/SubmitChecklist when testing your code ***

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: spufs: avoid unexpectedly restaring MFC during context save
From: Kazunori Asayama <asayama@xxxxxxxxxxxxx>

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 <asayama@xxxxxxxxxxxxx>
Signed-off-by: Jeremy Kerr <jk@xxxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 arch/powerpc/platforms/cell/spufs/switch.c |    3 ++-
 include/asm-powerpc/spu.h                  |    1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff -puN arch/powerpc/platforms/cell/spufs/switch.c~spufs-avoid-unexpectedly-restaring-mfc-during-context-save arch/powerpc/platforms/cell/spufs/switch.c
--- a/arch/powerpc/platforms/cell/spufs/switch.c~spufs-avoid-unexpectedly-restaring-mfc-during-context-save
+++ a/arch/powerpc/platforms/cell/spufs/switch.c
@@ -271,7 +271,8 @@ static inline void halt_mfc_decr(struct 
 	 *     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 -puN include/asm-powerpc/spu.h~spufs-avoid-unexpectedly-restaring-mfc-during-context-save include/asm-powerpc/spu.h
--- a/include/asm-powerpc/spu.h~spufs-avoid-unexpectedly-restaring-mfc-during-context-save
+++ a/include/asm-powerpc/spu.h
@@ -418,6 +418,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)
_

Patches currently in -mm which might be from asayama@xxxxxxxxxxxxx are

origin.patch
spufs-avoid-unexpectedly-restaring-mfc-during-context-save.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux