From 2a252ee57037c887d316d5a87b03823c051608b9 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Thu, 19 Jul 2007 12:05:58 -0700 Subject: [PATCH] --- yaml --- r: 61855 b: refs/heads/master c: 80422977478775fe03f25e57b67efe9f0a67e50c h: refs/heads/master i: 61853: 42e173c36cbbee7d5d64afb6d2a4e75c16fee48b 61851: 272fb8a819e7f93b09d9baa7b7f3d2a5e667f23c 61847: 0676594050524ca1ed463b7a2d36b4572aeeefc5 61839: 86fd1ce74c1b25a1cfe9a3cf619fc4908d5f9d1d 61823: 168bb8c6a49be5ab7798423b0f5e56232fb0e29f v: v3 --- [refs] | 2 +- .../arch/powerpc/platforms/cell/spufs/fault.c | 22 +++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/[refs] b/[refs] index 8be9ad0f19e6..ad7bfa8497f6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: efffbeee5bc4168059683714b300d307f5193d69 +refs/heads/master: 80422977478775fe03f25e57b67efe9f0a67e50c diff --git a/trunk/arch/powerpc/platforms/cell/spufs/fault.c b/trunk/arch/powerpc/platforms/cell/spufs/fault.c index 07f88de0544d..f53a07437472 100644 --- a/trunk/arch/powerpc/platforms/cell/spufs/fault.c +++ b/trunk/arch/powerpc/platforms/cell/spufs/fault.c @@ -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++; @@ -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)