Skip to content

Commit

Permalink
fix spufs build after ->fault changes
Browse files Browse the repository at this point in the history
83c5407 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 <[email protected]>
Cc: Arnd Bergmann <[email protected]>
Acked-by: Geoff Levand <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Nick Piggin <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Linus Torvalds committed Jul 19, 2007
1 parent efffbee commit 8042297
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions arch/powerpc/platforms/cell/spufs/fault.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,18 @@ static int spu_handle_mm_fault(struct mm_struct *mm, unsigned long ea,
goto bad_area;
}
ret = 0;
fault = handle_mm_fault(mm, vma, ea, is_write);
if (unlikely(fault & VM_FAULT_ERROR)) {
if (fault & VM_FAULT_OOM) {
*flt = handle_mm_fault(mm, vma, ea, is_write);
if (unlikely(*flt & VM_FAULT_ERROR)) {
if (*flt & VM_FAULT_OOM) {
ret = -ENOMEM;
goto bad_area;
} else if (fault & VM_FAULT_SIGBUS) {
} else if (*flt & VM_FAULT_SIGBUS) {
ret = -EFAULT;
goto bad_area;
}
BUG();
}
if (fault & VM_FAULT_MAJOR)
if (*flt & VM_FAULT_MAJOR)
current->maj_flt++;
else
current->min_flt++;
Expand Down Expand Up @@ -210,15 +210,15 @@ int spufs_handle_class1(struct spu_context *ctx)
* In case of unhandled error report the problem to user space.
*/
if (!ret) {
if (flt == VM_FAULT_MINOR)
ctx->stats.min_flt++;
else
if (flt & VM_FAULT_MAJOR)
ctx->stats.maj_flt++;
else
ctx->stats.min_flt++;
if (ctx->state == SPU_STATE_RUNNABLE) {
if (flt == VM_FAULT_MINOR)
ctx->spu->stats.min_flt++;
else
if (flt & VM_FAULT_MAJOR)
ctx->spu->stats.maj_flt++;
else
ctx->spu->stats.min_flt++;
}

if (ctx->spu)
Expand Down

0 comments on commit 8042297

Please sign in to comment.