aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ppc/mm/fault.c')
-rw-r--r--arch/ppc/mm/fault.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/ppc/mm/fault.c b/arch/ppc/mm/fault.c
index 465f451f3bc3..b98244e277fb 100644
--- a/arch/ppc/mm/fault.c
+++ b/arch/ppc/mm/fault.c
@@ -96,6 +96,7 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
96 struct mm_struct *mm = current->mm; 96 struct mm_struct *mm = current->mm;
97 siginfo_t info; 97 siginfo_t info;
98 int code = SEGV_MAPERR; 98 int code = SEGV_MAPERR;
99 int fault;
99#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE) 100#if defined(CONFIG_4xx) || defined (CONFIG_BOOKE)
100 int is_write = error_code & ESR_DST; 101 int is_write = error_code & ESR_DST;
101#else 102#else
@@ -249,20 +250,18 @@ good_area:
249 * the fault. 250 * the fault.
250 */ 251 */
251 survive: 252 survive:
252 switch (handle_mm_fault(mm, vma, address, is_write)) { 253 fault = handle_mm_fault(mm, vma, address, is_write);
253 case VM_FAULT_MINOR: 254 if (unlikely(fault & VM_FAULT_ERROR)) {
254 current->min_flt++; 255 if (fault & VM_FAULT_OOM)
255 break; 256 goto out_of_memory;
256 case VM_FAULT_MAJOR: 257 else if (fault & VM_FAULT_SIGBUS)
257 current->maj_flt++; 258 goto do_sigbus;
258 break;
259 case VM_FAULT_SIGBUS:
260 goto do_sigbus;
261 case VM_FAULT_OOM:
262 goto out_of_memory;
263 default:
264 BUG(); 259 BUG();
265 } 260 }
261 if (fault & VM_FAULT_MAJOR)
262 current->maj_flt++;
263 else
264 current->min_flt++;
266 265
267 up_read(&mm->mmap_sem); 266 up_read(&mm->mmap_sem);
268 /* 267 /*