]> err.no Git - linux-2.6/commit
[POWERPC] spufs: make spu page faults not block scheduling
authorArnd Bergmann <arnd.bergmann@de.ibm.com>
Mon, 23 Apr 2007 19:08:15 +0000 (21:08 +0200)
committerArnd Bergmann <arnd@klappe.arndb.de>
Mon, 23 Apr 2007 19:18:55 +0000 (21:18 +0200)
commit57dace2391ba10135e38457904121e7ef34d0c83
tree1be720be47bd6f1d929e9242b8a89a8f2e5fe61d
parent62c05d583ec016c40011462d5f03b072bfbd3dc7
[POWERPC] spufs: make spu page faults not block scheduling

Until now, we have always entered the spu page fault handler
with a mutex for the spu context held. This has multiple
bad side-effects:
- it becomes impossible to suspend the context during
  page faults
- if an spu program attempts to access its own mmio
  areas through DMA, we get an immediate livelock when
  the nopage function tries to acquire the same mutex

This patch makes the page fault logic operate on a
struct spu_context instead of a struct spu, and moves it
from spu_base.c to a new file fault.c inside of spufs.

We now also need to copy the dar and dsisr contents
of the last fault into the saved context to have it
accessible in case we schedule out the context before
activating the page fault handler.

Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
arch/powerpc/platforms/cell/spu_base.c
arch/powerpc/platforms/cell/spufs/Makefile
arch/powerpc/platforms/cell/spufs/backing_ops.c
arch/powerpc/platforms/cell/spufs/fault.c [new file with mode: 0644]
arch/powerpc/platforms/cell/spufs/hw_ops.c
arch/powerpc/platforms/cell/spufs/run.c
arch/powerpc/platforms/cell/spufs/spufs.h
arch/powerpc/platforms/cell/spufs/switch.c
include/asm-powerpc/mmu.h
include/asm-powerpc/spu_csa.h