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

Luke Browning lukebr at linux.vnet.ibm.com
Fri Feb 15 23:39:26 EST 2008


On Fri, 2008-02-15 at 12:29 +0100, Arnd Bergmann wrote:

> 1. The mfc accesses an unmapped page
> 2. An interrupt is signalled to the ppu
> 3. The SPU thread breaks out of spufs_wait, while the spu keeps running
> 4. The page fault handler makes the signal pending and restarts the DMA
> 6a. The SPU attempts the access a second time, causing another interrupt
> 6b. The PPU returns to user space
> 7. The user fixes up the page mapping
> 8. We enter spufs_run again and immediately break out of spufs_wait

9. the exception is handled this time as the signal handler has run.

> 10. The DMA gets restarted and this time is successful.

11. The PPU re-enters spufs_wait.

There are only two system calls made.  The exception is generated twice.
The first time it causes a signal. The second time it is handled
transparently within spufs_spu_run. The key is that the exception
handling and signal handling are synchronous with respect to each other,
since they occur in the same thread. 

Luke





More information about the cbe-oss-dev mailing list