diff options
author | Christoph Hellwig <hch@lst.de> | 2007-07-19 15:05:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 17:30:14 -0400 |
commit | 80422977478775fe03f25e57b67efe9f0a67e50c (patch) | |
tree | b692c7b0305702650a78f41cff0935799a9c5c45 | |
parent | efffbeee5bc4168059683714b300d307f5193d69 (diff) |
fix spufs build after ->fault changes
83c54070ee1a2d05c89793884bea1a03f2851ed4 broke spufs by incorrectly
updating the code, this patch gets it to compile again.
It's probably still broken due to the scheduler changes, but this
at least makes sure cell kernels can still be built.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | arch/powerpc/platforms/cell/spufs/fault.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/fault.c b/arch/powerpc/platforms/cell/spufs/fault.c index 07f88de0544d..f53a07437472 100644 --- a/arch/powerpc/platforms/cell/spufs/fault.c +++ b/arch/powerpc/platforms/cell/spufs/fault.c | |||
@@ -74,18 +74,18 @@ good_area: | |||
74 | goto bad_area; | 74 | goto bad_area; |
75 | } | 75 | } |
76 | ret = 0; | 76 | ret = 0; |
77 | fault = handle_mm_fault(mm, vma, ea, is_write); | 77 | *flt = handle_mm_fault(mm, vma, ea, is_write); |
78 | if (unlikely(fault & VM_FAULT_ERROR)) { | 78 | if (unlikely(*flt & VM_FAULT_ERROR)) { |
79 | if (fault & VM_FAULT_OOM) { | 79 | if (*flt & VM_FAULT_OOM) { |
80 | ret = -ENOMEM; | 80 | ret = -ENOMEM; |
81 | goto bad_area; | 81 | goto bad_area; |
82 | } else if (fault & VM_FAULT_SIGBUS) { | 82 | } else if (*flt & VM_FAULT_SIGBUS) { |
83 | ret = -EFAULT; | 83 | ret = -EFAULT; |
84 | goto bad_area; | 84 | goto bad_area; |
85 | } | 85 | } |
86 | BUG(); | 86 | BUG(); |
87 | } | 87 | } |
88 | if (fault & VM_FAULT_MAJOR) | 88 | if (*flt & VM_FAULT_MAJOR) |
89 | current->maj_flt++; | 89 | current->maj_flt++; |
90 | else | 90 | else |
91 | current->min_flt++; | 91 | current->min_flt++; |
@@ -210,15 +210,15 @@ int spufs_handle_class1(struct spu_context *ctx) | |||
210 | * In case of unhandled error report the problem to user space. | 210 | * In case of unhandled error report the problem to user space. |
211 | */ | 211 | */ |
212 | if (!ret) { | 212 | if (!ret) { |
213 | if (flt == VM_FAULT_MINOR) | 213 | if (flt & VM_FAULT_MAJOR) |
214 | ctx->stats.min_flt++; | ||
215 | else | ||
216 | ctx->stats.maj_flt++; | 214 | ctx->stats.maj_flt++; |
215 | else | ||
216 | ctx->stats.min_flt++; | ||
217 | if (ctx->state == SPU_STATE_RUNNABLE) { | 217 | if (ctx->state == SPU_STATE_RUNNABLE) { |
218 | if (flt == VM_FAULT_MINOR) | 218 | if (flt & VM_FAULT_MAJOR) |
219 | ctx->spu->stats.min_flt++; | ||
220 | else | ||
221 | ctx->spu->stats.maj_flt++; | 219 | ctx->spu->stats.maj_flt++; |
220 | else | ||
221 | ctx->spu->stats.min_flt++; | ||
222 | } | 222 | } |
223 | 223 | ||
224 | if (ctx->spu) | 224 | if (ctx->spu) |