[Cbe-oss-dev] [PATCH 6/9] spufs: add missing eieio

Masato Noguchi Masato.Noguchi at jp.sony.com
Fri Jul 13 17:43:51 EST 2007


Added missing eieio around accessing spu channel mmio registers.

Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
---

 arch/powerpc/platforms/cell/spufs/switch.c |    4 ++++
 1 file changed, 4 insertions(+)

Index: linux-2.6/arch/powerpc/platforms/cell/spufs/switch.c
===================================================================
--- linux-2.6.orig/arch/powerpc/platforms/cell/spufs/switch.c
+++ linux-2.6/arch/powerpc/platforms/cell/spufs/switch.c
@@ -606,7 +606,9 @@ static inline void save_ch_part1(struct 
 
 	/* Save CH 1, without channel count */
 	out_be64(&priv2->spu_chnlcntptr_RW, 1);
+	eieio();
 	csa->spu_chnldata_RW[1] = in_be64(&priv2->spu_chnldata_RW);
+	eieio();
 
 	/* Save the following CH: [0,3,4,24,25,27] */
 	for (i = 0; i < 6; i++) {
@@ -1082,7 +1084,9 @@ static inline void reset_ch_part1(struct
 
 	/* Reset CH 1 */
 	out_be64(&priv2->spu_chnlcntptr_RW, 1);
+	eieio();
 	out_be64(&priv2->spu_chnldata_RW, 0UL);
+	eieio();
 
 	/* Reset the following CH: [0,3,4,24,25,27] */
 	for (i = 0; i < 6; i++) {




More information about the cbe-oss-dev mailing list