diff options
author | Arnd Bergmann <arnd.bergmann@de.ibm.com> | 2007-04-23 15:08:15 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@klappe.arndb.de> | 2007-04-23 15:18:55 -0400 |
commit | 57dace2391ba10135e38457904121e7ef34d0c83 (patch) | |
tree | 1be720be47bd6f1d929e9242b8a89a8f2e5fe61d /arch/powerpc/platforms/cell/spufs/spufs.h | |
parent | 62c05d583ec016c40011462d5f03b072bfbd3dc7 (diff) |
[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>
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/spufs.h')
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/spufs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/spufs.h b/arch/powerpc/platforms/cell/spufs/spufs.h index cae2ad435b0..9993c9b3cff 100644 --- a/arch/powerpc/platforms/cell/spufs/spufs.h +++ b/arch/powerpc/platforms/cell/spufs/spufs.h | |||
@@ -141,6 +141,7 @@ struct spu_context_ops { | |||
141 | struct spu_dma_info * info); | 141 | struct spu_dma_info * info); |
142 | void (*proxydma_info_read) (struct spu_context * ctx, | 142 | void (*proxydma_info_read) (struct spu_context * ctx, |
143 | struct spu_proxydma_info * info); | 143 | struct spu_proxydma_info * info); |
144 | void (*restart_dma)(struct spu_context *ctx); | ||
144 | }; | 145 | }; |
145 | 146 | ||
146 | extern struct spu_context_ops spu_hw_ops; | 147 | extern struct spu_context_ops spu_hw_ops; |
@@ -172,6 +173,9 @@ int put_spu_gang(struct spu_gang *gang); | |||
172 | void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx); | 173 | void spu_gang_remove_ctx(struct spu_gang *gang, struct spu_context *ctx); |
173 | void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx); | 174 | void spu_gang_add_ctx(struct spu_gang *gang, struct spu_context *ctx); |
174 | 175 | ||
176 | /* fault handling */ | ||
177 | int spufs_handle_class1(struct spu_context *ctx); | ||
178 | |||
175 | /* context management */ | 179 | /* context management */ |
176 | static inline void spu_acquire(struct spu_context *ctx) | 180 | static inline void spu_acquire(struct spu_context *ctx) |
177 | { | 181 | { |