[Cbe-oss-dev] [PATCH 3:9] spufs: Remove class_0_dsisr from spu exception handling

Luke Browning lukebr at linux.vnet.ibm.com
Wed Jun 4 23:36:41 EST 2008


On Wed, 2008-06-04 at 14:58 +0800, Jeremy Kerr wrote:
> Luke,
> 
> > This patch cleans up the interrupt handler and erroneous
> > tests in spu_stopped.  It also removes the fields from the
> > csa since it is not needed to process class 0 events.
> 
> Looks good, a couple of things though:
> 
> > @@ -373,9 +371,6 @@ spu_irq_class_1(int irq, void *data)
> >  	if (stat & CLASS1_LS_COMPARE_SUSPEND_ON_PUT_INTR)
> >  		;
> >
> > -	spu->class_1_dsisr = 0;
> > -	spu->class_1_dar = 0;
> > -
> >  	return stat ? IRQ_HANDLED : IRQ_NONE;
> >  }
> 
> Are you sure you want to do this? It'll bring the class_1 handler 
> out-of-line with the rest of the irq handlers here.

This is done in the code that performs the callout, where it is clearer.
The code above was redundant.  See 
__spu_trap_data_map().

> 
> >
> > -		/* ensure that the exception status has hit memory before a
> > -		 * thread waiting on the context's stop queue is woken */
> > +		/*
> > +		 * Ensure that the exception status has hit memory before a
> > +		 * thread waiting on the context's stop queue is woken
> > +		 */
> >  		smp_wmb();
> 
> This probably isn't required, or at least is a separate patch.

You are right.  It just re-formats the comment so that it has the same
style as the other comment in the routine.  What would u like to do?  U
can delete it if u want.  Or I will re-submit.  Let me know.

Luke




More information about the cbe-oss-dev mailing list