[Cbe-oss-dev] [PATCH 5/6] spufs: fix dma restart
Luke Browning
lukebr at linux.vnet.ibm.com
Fri Feb 8 09:38:29 EST 2008
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?
Signed-off-by: Luke Browning <lukebrowning at us.ibm.com>
Index: spufs/arch/powerpc/platforms/cell/spufs/fault.c
===================================================================
--- spufs.orig/arch/powerpc/platforms/cell/spufs/fault.c 2008-02-07 20:17:57.000000000 -0200
+++ spufs/arch/powerpc/platforms/cell/spufs/fault.c 2008-02-07 20:23:27.000000000 -0200
@@ -56,6 +56,12 @@
info.si_signo = SIGSEGV;
info.si_addr = (void __user *)ea;
info.si_code = SEGV_ACCERR;
+ /*
+ * Deactivate so that the I/O operation takes place after
+ * the signal is delivered. The application may need to
+ * change the permissions on the page.
+ */
+ spu_deactivate(ctx);
ctx->ops->restart_dma(ctx);
break;
case SPE_EVENT_DMA_ALIGNMENT:
More information about the cbe-oss-dev
mailing list