[Cbe-oss-dev] [PATCH 2/9] spufs: remove needless context save/restore code

Masato Noguchi Masato.Noguchi at jp.sony.com
Fri Jul 13 17:36:42 EST 2007


removed needless context save/restore code.

Save Step 12: save_mfc_decr()
  save suspend_time to CSA (It will be done by step 14.)
  save ch 7 (decrementer value will be saved in LSCSA by spe-side step 10)

Restore Step 59: restore_ch_part1()
  restore ch 1 (it will be done by spe-side step 15.)

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

 arch/powerpc/platforms/cell/spufs/switch.c |   13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

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
@@ -253,11 +253,6 @@ static inline void save_mfc_decr(struct 
 	 */
 	if (in_be64(&priv2->mfc_control_RW) & MFC_CNTL_DECREMENTER_RUNNING) {
 		csa->priv2.mfc_control_RW |= MFC_CNTL_DECREMENTER_RUNNING;
-		csa->suspend_time = get_cycles();
-		out_be64(&priv2->spu_chnlcntptr_RW, 7ULL);
-		eieio();
-		csa->spu_chnldata_RW[7] = in_be64(&priv2->spu_chnldata_RW);
-		eieio();
 	} else {
 		csa->priv2.mfc_control_RW &= ~MFC_CNTL_DECREMENTER_RUNNING;
 	}
@@ -1554,13 +1549,7 @@ static inline void restore_ch_part1(stru
 	int i;
 
 	/* Restore, Step 59:
-	 */
-
-	/* Restore CH 1 without count */
-	out_be64(&priv2->spu_chnlcntptr_RW, 1);
-	out_be64(&priv2->spu_chnldata_RW, csa->spu_chnldata_RW[1]);
-
-	/* Restore the following CH: [0,3,4,24,25,27] */
+	 *     Restore the following CH: [0,3,4,24,25,27] */
 	for (i = 0; i < 6; i++) {
 		idx = ch_indices[i];
 		out_be64(&priv2->spu_chnlcntptr_RW, idx);




More information about the cbe-oss-dev mailing list