Commit 80422977 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

fix spufs build after ->fault changes

83c54070 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: default avatarChristoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: default avatarGeoff Levand <geoffrey.levand@am.sony.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent efffbeee
...@@ -74,18 +74,18 @@ good_area: ...@@ -74,18 +74,18 @@ good_area:
goto bad_area; goto bad_area;
} }
ret = 0; ret = 0;
fault = handle_mm_fault(mm, vma, ea, is_write); *flt = handle_mm_fault(mm, vma, ea, is_write);
if (unlikely(fault & VM_FAULT_ERROR)) { if (unlikely(*flt & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM) { if (*flt & VM_FAULT_OOM) {
ret = -ENOMEM; ret = -ENOMEM;
goto bad_area; goto bad_area;
} else if (fault & VM_FAULT_SIGBUS) { } else if (*flt & VM_FAULT_SIGBUS) {
ret = -EFAULT; ret = -EFAULT;
goto bad_area; goto bad_area;
} }
BUG(); BUG();
} }
if (fault & VM_FAULT_MAJOR) if (*flt & VM_FAULT_MAJOR)
current->maj_flt++; current->maj_flt++;
else else
current->min_flt++; current->min_flt++;
...@@ -210,15 +210,15 @@ int spufs_handle_class1(struct spu_context *ctx) ...@@ -210,15 +210,15 @@ int spufs_handle_class1(struct spu_context *ctx)
* In case of unhandled error report the problem to user space. * In case of unhandled error report the problem to user space.
*/ */
if (!ret) { if (!ret) {
if (flt == VM_FAULT_MINOR) if (flt & VM_FAULT_MAJOR)
ctx->stats.min_flt++;
else
ctx->stats.maj_flt++; ctx->stats.maj_flt++;
else
ctx->stats.min_flt++;
if (ctx->state == SPU_STATE_RUNNABLE) { if (ctx->state == SPU_STATE_RUNNABLE) {
if (flt == VM_FAULT_MINOR) if (flt & VM_FAULT_MAJOR)
ctx->spu->stats.min_flt++;
else
ctx->spu->stats.maj_flt++; ctx->spu->stats.maj_flt++;
else
ctx->spu->stats.min_flt++;
} }
if (ctx->spu) if (ctx->spu)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment