aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips')
-rw-r--r--arch/mips/mm/fault.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/mips/mm/fault.c b/arch/mips/mm/fault.c
index 7ebea331edb8..521771b373de 100644
--- a/arch/mips/mm/fault.c
+++ b/arch/mips/mm/fault.c
@@ -39,6 +39,7 @@ asmlinkage void do_page_fault(struct pt_regs *regs, unsigned long write,
39 struct mm_struct *mm = tsk->mm; 39 struct mm_struct *mm = tsk->mm;
40 const int field = sizeof(unsigned long) * 2; 40 const int field = sizeof(unsigned long) * 2;
41 siginfo_t info; 41 siginfo_t info;
42 int fault;
42 43
43#if 0 44#if 0
44 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(), 45 printk("Cpu%d[%s:%d:%0*lx:%ld:%0*lx]\n", raw_smp_processor_id(),
@@ -102,20 +103,18 @@ survive:
102 * make sure we exit gracefully rather than endlessly redo 103 * make sure we exit gracefully rather than endlessly redo
103 * the fault. 104 * the fault.
104 */ 105 */
105 switch (handle_mm_fault(mm, vma, address, write)) { 106 fault = handle_mm_fault(mm, vma, address, write);
106 case VM_FAULT_MINOR: 107 if (unlikely(fault & VM_FAULT_ERROR)) {
107 tsk->min_flt++; 108 if (fault & VM_FAULT_OOM)
108 break; 109 goto out_of_memory;
109 case VM_FAULT_MAJOR: 110 else if (fault & VM_FAULT_SIGBUS)
110 tsk->maj_flt++; 111 goto do_sigbus;
111 break;
112 case VM_FAULT_SIGBUS:
113 goto do_sigbus;
114 case VM_FAULT_OOM:
115 goto out_of_memory;
116 default:
117 BUG(); 112 BUG();
118 } 113 }
114 if (fault & VM_FAULT_MAJOR)
115 tsk->maj_flt++;
116 else
117 tsk->min_flt++;
119 118
120 up_read(&mm->mmap_sem); 119 up_read(&mm->mmap_sem);
121 return; 120 return;