14 #include <linux/ptrace.h>
15 #include <linux/sched.h>
17 #include <linux/module.h>
19 #include <asm/uaccess.h>
20 #include <asm/traps.h>
22 #define PRINT_USER_FAULTS
27 #define bit22set(x) (x & 0x00000200)
28 #define bits23_25set(x) (x & 0x000001c0)
29 #define isGraphicsFlushRead(x) ((x & 0xfc003fdf) == 0x04001a80)
53 parisc_acctyp(
unsigned long code,
unsigned int inst)
55 if (code == 6 || code == 16)
58 switch (inst & 0xf0000000) {
117 #undef isGraphicsFlushRead
127 while (
tree != vm_avl_empty) {
176 unsigned long acc_type;
185 goto check_expansion;
193 acc_type = parisc_acctyp(code,regs->
iir);
195 if ((vma->
vm_flags & acc_type) != acc_type)
204 fault =
handle_mm_fault(mm, vma, address, (acc_type & VM_WRITE) ? FAULT_FLAG_WRITE : 0);
205 if (
unlikely(fault & VM_FAULT_ERROR)) {
211 if (fault & VM_FAULT_OOM)
213 else if (fault & VM_FAULT_SIGBUS)
217 if (fault & VM_FAULT_MAJOR)
238 #ifdef PRINT_USER_FAULTS
240 printk(
KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n",
241 task_pid_nr(tsk), tsk->
comm, code, address);
252 si.si_addr = (
void __user *) address;