]> err.no Git - linux-2.6/blobdiff - arch/powerpc/platforms/cell/spufs/switch.c
Merge branch 'linux-2.6' into for-2.6.24
[linux-2.6] / arch / powerpc / platforms / cell / spufs / switch.c
index 27ffdae98e5af3cc5b6420aa926f11293e4d32f9..de7e5ee451d25b4da2eb7337ad6b02d96713d0e6 100644 (file)
@@ -1559,15 +1559,15 @@ static inline void restore_decr_wrapped(struct spu_state *csa, struct spu *spu)
         *     "wrapped" flag is set, OR in a '1' to
         *     CSA.SPU_Event_Status[Tm].
         */
-       if (csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) {
-               csa->spu_chnldata_RW[0] |= 0x20;
-       }
-       if ((csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) &&
-           (csa->spu_chnlcnt_RW[0] == 0 &&
-            ((csa->spu_chnldata_RW[2] & 0x20) == 0x0) &&
-            ((csa->spu_chnldata_RW[0] & 0x20) != 0x1))) {
+       if (!(csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED))
+               return;
+
+       if ((csa->spu_chnlcnt_RW[0] == 0) &&
+           (csa->spu_chnldata_RW[1] & 0x20) &&
+           !(csa->spu_chnldata_RW[0] & 0x20))
                csa->spu_chnlcnt_RW[0] = 1;
-       }
+
+       csa->spu_chnldata_RW[0] |= 0x20;
 }
 
 static inline void restore_ch_part1(struct spu_state *csa, struct spu *spu)
@@ -2146,19 +2146,6 @@ int spu_restore(struct spu_state *new, struct spu *spu)
 }
 EXPORT_SYMBOL_GPL(spu_restore);
 
-/**
- * spu_harvest - SPU harvest (reset) operation
- * @spu: pointer to SPU iomem structure.
- *
- * Perform SPU harvest (reset) operation.
- */
-void spu_harvest(struct spu *spu)
-{
-       acquire_spu_lock(spu);
-       harvest(NULL, spu);
-       release_spu_lock(spu);
-}
-
 static void init_prob(struct spu_state *csa)
 {
        csa->spu_chnlcnt_RW[9] = 1;