diff options
Diffstat (limited to 'arch/sh64/mm/fault.c')
-rw-r--r-- | arch/sh64/mm/fault.c | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/arch/sh64/mm/fault.c b/arch/sh64/mm/fault.c index 3cd93ba5d826..0d069d82141f 100644 --- a/arch/sh64/mm/fault.c +++ b/arch/sh64/mm/fault.c | |||
@@ -127,6 +127,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long writeaccess, | |||
127 | struct vm_area_struct * vma; | 127 | struct vm_area_struct * vma; |
128 | const struct exception_table_entry *fixup; | 128 | const struct exception_table_entry *fixup; |
129 | pte_t *pte; | 129 | pte_t *pte; |
130 | int fault; | ||
130 | 131 | ||
131 | #if defined(CONFIG_SH64_PROC_TLB) | 132 | #if defined(CONFIG_SH64_PROC_TLB) |
132 | ++calls_to_do_slow_page_fault; | 133 | ++calls_to_do_slow_page_fault; |
@@ -221,18 +222,19 @@ good_area: | |||
221 | * the fault. | 222 | * the fault. |
222 | */ | 223 | */ |
223 | survive: | 224 | survive: |
224 | switch (handle_mm_fault(mm, vma, address, writeaccess)) { | 225 | fault = handle_mm_fault(mm, vma, address, writeaccess); |
225 | case VM_FAULT_MINOR: | 226 | if (unlikely(fault & VM_FAULT_ERROR)) { |
226 | tsk->min_flt++; | 227 | if (fault & VM_FAULT_OOM) |
227 | break; | 228 | goto out_of_memory; |
228 | case VM_FAULT_MAJOR: | 229 | else if (fault & VM_FAULT_SIGBUS) |
229 | tsk->maj_flt++; | 230 | goto do_sigbus; |
230 | break; | 231 | BUG(); |
231 | case VM_FAULT_SIGBUS: | ||
232 | goto do_sigbus; | ||
233 | default: | ||
234 | goto out_of_memory; | ||
235 | } | 232 | } |
233 | if (fault & VM_FAULT_MAJOR) | ||
234 | tsk->maj_flt++; | ||
235 | else | ||
236 | tsk->min_flt++; | ||
237 | |||
236 | /* If we get here, the page fault has been handled. Do the TLB refill | 238 | /* If we get here, the page fault has been handled. Do the TLB refill |
237 | now from the newly-setup PTE, to avoid having to fault again right | 239 | now from the newly-setup PTE, to avoid having to fault again right |
238 | away on the same instruction. */ | 240 | away on the same instruction. */ |