[Cbe-oss-dev] [PATCH 1:5] spusched: fix the save of the mfc-control-register in context switch code

Jeremy Kerr jk at ozlabs.org
Mon Apr 28 13:59:35 EST 2008


Hi Luke,

I have this patch in my tree from your earlier send, minus this recent 
addition:

> @@ -1734,15 +1734,17 @@ static inline void restore_mfc_cntl(stru
>  	 */
>  	out_be64(&priv2->mfc_control_RW, csa->priv2.mfc_control_RW);
>  	eieio();
> +
>  	/*
> -	 * FIXME: this is to restart a DMA that we were processing
> -	 *        before the save. better remember the fault information
> -	 *        in the csa instead.
> +	 * The queue is put back into the same state that was evident
> +	 * prior to the context switch.  The suspend flag is added to
> +	 * the saved state in the csa, if the operational state was
> +	 * suspending or suspended.  In this case, the code that suspended
> +	 * the mfc is responsible for continuing it.  Note that SPE faults
> +	 * do not change the operational state of the spu.  In fact,
> +	 * the mfc restart command has no affect if the operational
> +	 * state of the mfc is not 'normal'.
>  	 */
> -	if ((csa->priv2.mfc_control_RW & MFC_CNTL_SUSPEND_DMA_QUEUE_MASK))
> { -		out_be64(&priv2->mfc_control_RW, MFC_CNTL_RESTART_DMA_COMMAND);
> -		eieio();
> -	}
>  }

 - I'll roll this into patch 5:5, as this is where we add the "context 
should resume own suspended DMAs" functionality. I think this makes the 
change more obvious.

Is this OK with you?

Cheers,


Jeremy



More information about the cbe-oss-dev mailing list