[Cbe-oss-dev] [PATCH 5/9] spufs: fix restore_decr_wrapped()

Noguchi, Masato Masato.Noguchi at jp.sony.com
Thu Aug 9 14:01:45 EST 2007


Hi,

This patch seems to be missing.
Is there any problem with it?

http://patchwork.ozlabs.org/cbe-oss-dev/patch?person=781&id=12254


Andre, FYI,
even if this patch applied, it seems that reading channel 0 (SPU_RdEventStat,
Read-blocking) sometimes lost decrementer event.
I suspect there is a bug in a code to save and restore spu waiting on a
blocked channel regardless of channel number.


> -----Original Message-----
> From: Masato Noguchi [mailto:Masato.Noguchi at jp.sony.com]
> Sent: Friday, July 13, 2007 4:42 PM
> To: cbe-oss-dev at ozlabs.org
> Subject: [PATCH 5/9] spufs: fix restore_decr_wrapped()
> 
> 
> fixed restore_decr_wrapped() to match CBE Handbook.
> 
> Signed-off-by: Masato Noguchi <Masato.Noguchi at jp.sony.com>
> ---
> 
>  arch/powerpc/platforms/cell/spufs/switch.c |   10 +++++-----
>  1 file changed, 5 insertions(+), 5 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
> @@ -1539,15 +1539,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))) {
> +	     ((csa->spu_chnldata_RW[1] & 0x20) != 0x0) &&
> +	     ((csa->spu_chnldata_RW[0] & 0x20) == 0x0))) {
>  		csa->spu_chnlcnt_RW[0] = 1;
>  	}
> +	if (csa->lscsa->decr_status.slot[0] & SPU_DECR_STATUS_WRAPPED) {
> +		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