aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/xtensa/mm/fault.c')
-rw-r--r--arch/xtensa/mm/fault.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/arch/xtensa/mm/fault.c b/arch/xtensa/mm/fault.c
index 3dc6f2f07bbe..16004067add3 100644
--- a/arch/xtensa/mm/fault.c
+++ b/arch/xtensa/mm/fault.c
@@ -41,6 +41,7 @@ void do_page_fault(struct pt_regs *regs)
41 siginfo_t info; 41 siginfo_t info;
42 42
43 int is_write, is_exec; 43 int is_write, is_exec;
44 int fault;
44 45
45 info.si_code = SEGV_MAPERR; 46 info.si_code = SEGV_MAPERR;
46 47
@@ -102,20 +103,18 @@ good_area:
102 * the fault. 103 * the fault.
103 */ 104 */
104survive: 105survive:
105 switch (handle_mm_fault(mm, vma, address, is_write)) { 106 fault = handle_mm_fault(mm, vma, address, is_write);
106 case VM_FAULT_MINOR: 107 if (unlikely(fault & VM_FAULT_ERROR)) {
107 current->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 current->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 current->maj_flt++;
116 else
117 current->min_flt++;
119 118
120 up_read(&mm->mmap_sem); 119 up_read(&mm->mmap_sem);
121 return; 120 return;