[Cbe-oss-dev] [PATCH 5/6] spufs: fix dma restart

Arnd Bergmann arnd.bergmann at de.ibm.com
Wed Feb 13 15:49:29 EST 2008


On Thursday 07 February 2008, Luke Browning wrote:
> Ensure that dma is restarted after the signal handler is called.
> 
> Deactivate to ensure that the context is not loaded and that no spe
> registers are updated.  This eliminates any dependencies on the master
> runcntl registers.  Also, I am pretty sure the dma operation is restarted
> immediately in the old version of this code as the other dma restarts
> take place immediately, right?
> 
> I haven't tested this.  Anybody got a testcase?
> 

The spu_deactivate() here seems a little drastic and should not really
be necessary but rather seems to hide the problem behind a race between
the context getting scheduled back in and user space fixing up the
page.

In case of nonschedulable contexts, it actually looks unconditionally
broken!

I'm not entirely sure what you are trying to fix, as I thought that
the original patch was working, although I never fully understood
why a ctx->ops->restart_dma(ctx); after triggering the signal would
be the right thing to do...

	Arnd <><



More information about the cbe-oss-dev mailing list