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 /include/asm-powerpc | |
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 'include/asm-powerpc')
-rw-r--r-- | include/asm-powerpc/mmu.h | 1 | ||||
-rw-r--r-- | include/asm-powerpc/spu_csa.h | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/include/asm-powerpc/mmu.h b/include/asm-powerpc/mmu.h index 200055a4b82b..e22fd8811505 100644 --- a/include/asm-powerpc/mmu.h +++ b/include/asm-powerpc/mmu.h | |||
@@ -234,6 +234,7 @@ extern int __hash_page_64K(unsigned long ea, unsigned long access, | |||
234 | unsigned long vsid, pte_t *ptep, unsigned long trap, | 234 | unsigned long vsid, pte_t *ptep, unsigned long trap, |
235 | unsigned int local); | 235 | unsigned int local); |
236 | struct mm_struct; | 236 | struct mm_struct; |
237 | extern int hash_page(unsigned long ea, unsigned long access, unsigned long trap); | ||
237 | extern int hash_huge_page(struct mm_struct *mm, unsigned long access, | 238 | extern int hash_huge_page(struct mm_struct *mm, unsigned long access, |
238 | unsigned long ea, unsigned long vsid, int local, | 239 | unsigned long ea, unsigned long vsid, int local, |
239 | unsigned long trap); | 240 | unsigned long trap); |
diff --git a/include/asm-powerpc/spu_csa.h b/include/asm-powerpc/spu_csa.h index 8aad0619eb8e..02e56a6685a2 100644 --- a/include/asm-powerpc/spu_csa.h +++ b/include/asm-powerpc/spu_csa.h | |||
@@ -242,6 +242,7 @@ struct spu_state { | |||
242 | u64 spu_chnldata_RW[32]; | 242 | u64 spu_chnldata_RW[32]; |
243 | u32 spu_mailbox_data[4]; | 243 | u32 spu_mailbox_data[4]; |
244 | u32 pu_mailbox_data[1]; | 244 | u32 pu_mailbox_data[1]; |
245 | u64 dar, dsisr; | ||
245 | unsigned long suspend_time; | 246 | unsigned long suspend_time; |
246 | spinlock_t register_lock; | 247 | spinlock_t register_lock; |
247 | }; | 248 | }; |