[Cbe-oss-dev] [PATCH] spufs: fix restore_decr_wrapped()
Noguchi, Masato
Masato.Noguchi at jp.sony.com
Mon Aug 20 20:58:45 EST 2007
> -----Original Message-----
> From: Jeremy Kerr [mailto:jk at ozlabs.org]
> Subject: [PATCH] spufs: fix restore_decr_wrapped()
>
(snip...)
>
> Masato-san - are you happy with this updated version of your patch? I
> think the code reads more like the documentation (and it passes the
> checkpatch.pl script :D )
That's pretty cool.
Thank you.
> ---
>
> arch/powerpc/platforms/cell/spufs/switch.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> Index: linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/switch.c
> ===================================================================
> --- linux-2.6-spufs.orig/arch/powerpc/platforms/cell/spufs/switch.c
> +++ linux-2.6-spufs/arch/powerpc/platforms/cell/spufs/switch.c
> @@ -1559,15 +1559,15 @@ static inline void restore_decr_wrapped(
> * "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)
More information about the cbe-oss-dev
mailing list