aboutsummaryrefslogtreecommitdiffstats
path: root/arch/alpha/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/alpha/mm/fault.c')
-rw-r--r--arch/alpha/mm/fault.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/arch/alpha/mm/fault.c b/arch/alpha/mm/fault.c
index 0c4132dd3507..98838a05ba6d 100644
--- a/arch/alpha/mm/fault.c
+++ b/arch/alpha/mm/fault.c
@@ -89,8 +89,7 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
89 const struct exception_table_entry *fixup; 89 const struct exception_table_entry *fixup;
90 int fault, si_code = SEGV_MAPERR; 90 int fault, si_code = SEGV_MAPERR;
91 siginfo_t info; 91 siginfo_t info;
92 unsigned int flags = (FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE | 92 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
93 (cause > 0 ? FAULT_FLAG_WRITE : 0));
94 93
95 /* As of EV6, a load into $31/$f31 is a prefetch, and never faults 94 /* As of EV6, a load into $31/$f31 is a prefetch, and never faults
96 (or is suppressed by the PALcode). Support that for older CPUs 95 (or is suppressed by the PALcode). Support that for older CPUs
@@ -115,7 +114,8 @@ do_page_fault(unsigned long address, unsigned long mmcsr,
115 if (address >= TASK_SIZE) 114 if (address >= TASK_SIZE)
116 goto vmalloc_fault; 115 goto vmalloc_fault;
117#endif 116#endif
118 117 if (user_mode(regs))
118 flags |= FAULT_FLAG_USER;
119retry: 119retry:
120 down_read(&mm->mmap_sem); 120 down_read(&mm->mmap_sem);
121 vma = find_vma(mm, address); 121 vma = find_vma(mm, address);
@@ -142,6 +142,7 @@ retry:
142 } else { 142 } else {
143 if (!(vma->vm_flags & VM_WRITE)) 143 if (!(vma->vm_flags & VM_WRITE))
144 goto bad_area; 144 goto bad_area;
145 flags |= FAULT_FLAG_WRITE;
145 } 146 }
146 147
147 /* If for any reason at all we couldn't handle the fault, 148 /* If for any reason at all we couldn't handle the fault,