aboutsummaryrefslogtreecommitdiffstats
path: root/arch/m68k/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/m68k/mm/fault.c')
-rw-r--r--arch/m68k/mm/fault.c26
1 files changed, 9 insertions, 17 deletions
diff --git a/arch/m68k/mm/fault.c b/arch/m68k/mm/fault.c
index eb1d61f68725..2bd7487440c4 100644
--- a/arch/m68k/mm/fault.c
+++ b/arch/m68k/mm/fault.c
@@ -25,9 +25,8 @@ int send_fault_sig(struct pt_regs *regs)
25 siginfo.si_signo = current->thread.signo; 25 siginfo.si_signo = current->thread.signo;
26 siginfo.si_code = current->thread.code; 26 siginfo.si_code = current->thread.code;
27 siginfo.si_addr = (void *)current->thread.faddr; 27 siginfo.si_addr = (void *)current->thread.faddr;
28#ifdef DEBUG 28 pr_debug("send_fault_sig: %p,%d,%d\n", siginfo.si_addr,
29 printk("send_fault_sig: %p,%d,%d\n", siginfo.si_addr, siginfo.si_signo, siginfo.si_code); 29 siginfo.si_signo, siginfo.si_code);
30#endif
31 30
32 if (user_mode(regs)) { 31 if (user_mode(regs)) {
33 force_sig_info(siginfo.si_signo, 32 force_sig_info(siginfo.si_signo,
@@ -45,10 +44,10 @@ int send_fault_sig(struct pt_regs *regs)
45 * terminate things with extreme prejudice. 44 * terminate things with extreme prejudice.
46 */ 45 */
47 if ((unsigned long)siginfo.si_addr < PAGE_SIZE) 46 if ((unsigned long)siginfo.si_addr < PAGE_SIZE)
48 printk(KERN_ALERT "Unable to handle kernel NULL pointer dereference"); 47 pr_alert("Unable to handle kernel NULL pointer dereference");
49 else 48 else
50 printk(KERN_ALERT "Unable to handle kernel access"); 49 pr_alert("Unable to handle kernel access");
51 printk(" at virtual address %p\n", siginfo.si_addr); 50 pr_cont(" at virtual address %p\n", siginfo.si_addr);
52 die_if_kernel("Oops", regs, 0 /*error_code*/); 51 die_if_kernel("Oops", regs, 0 /*error_code*/);
53 do_exit(SIGKILL); 52 do_exit(SIGKILL);
54 } 53 }
@@ -75,11 +74,8 @@ int do_page_fault(struct pt_regs *regs, unsigned long address,
75 int fault; 74 int fault;
76 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; 75 unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE;
77 76
78#ifdef DEBUG 77 pr_debug("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n",
79 printk ("do page fault:\nregs->sr=%#x, regs->pc=%#lx, address=%#lx, %ld, %p\n", 78 regs->sr, regs->pc, address, error_code, mm ? mm->pgd : NULL);
80 regs->sr, regs->pc, address, error_code,
81 current->mm->pgd);
82#endif
83 79
84 /* 80 /*
85 * If we're in an interrupt or have no user 81 * If we're in an interrupt or have no user
@@ -118,9 +114,7 @@ retry:
118 * we can handle it.. 114 * we can handle it..
119 */ 115 */
120good_area: 116good_area:
121#ifdef DEBUG 117 pr_debug("do_page_fault: good_area\n");
122 printk("do_page_fault: good_area\n");
123#endif
124 switch (error_code & 3) { 118 switch (error_code & 3) {
125 default: /* 3: write, present */ 119 default: /* 3: write, present */
126 /* fall through */ 120 /* fall through */
@@ -143,9 +137,7 @@ good_area:
143 */ 137 */
144 138
145 fault = handle_mm_fault(mm, vma, address, flags); 139 fault = handle_mm_fault(mm, vma, address, flags);
146#ifdef DEBUG 140 pr_debug("handle_mm_fault returns %d\n", fault);
147 printk("handle_mm_fault returns %d\n",fault);
148#endif
149 141
150 if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current)) 142 if ((fault & VM_FAULT_RETRY) && fatal_signal_pending(current))
151 return 0; 143 return 0;