Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=05a059f3296c07a7455290dd8188b23ecb380fc7
Commit:     05a059f3296c07a7455290dd8188b23ecb380fc7
Parent:     4ec3c3d08d4de744b7a1d885529d1e040ec747a4
Author:     Jeremy Kerr <[EMAIL PROTECTED]>
AuthorDate: Wed Sep 19 14:38:12 2007 +1000
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Wed Sep 19 15:12:17 2007 +1000

    [POWERPC] spufs: Fix restore_decr_wrapped() to match CBE Handbook
    
    Based on an original patch from Masato Noguchi
    <[EMAIL PROTECTED]>.
    
    We're currently not restoring the SPE decrementer as specified by the
    CBE handbook. This change fixes our implementation to match, and makes
    the function read more like the docs.
    
    Signed-off-by: Jeremy Kerr <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/cell/spufs/switch.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/platforms/cell/spufs/switch.c 
b/arch/powerpc/platforms/cell/spufs/switch.c
index 2506619..de7e5ee 100644
--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -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)
-
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