aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/fault.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/mm/fault.c')
-rw-r--r--arch/powerpc/mm/fault.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/arch/powerpc/mm/fault.c b/arch/powerpc/mm/fault.c
index d989592b6fc8..8432c281de92 100644
--- a/arch/powerpc/mm/fault.c
+++ b/arch/powerpc/mm/fault.c
@@ -42,26 +42,6 @@
42#include <asm/debug.h> 42#include <asm/debug.h>
43#include <asm/kup.h> 43#include <asm/kup.h>
44 44
45static inline bool notify_page_fault(struct pt_regs *regs)
46{
47 bool ret = false;
48
49#ifdef CONFIG_KPROBES
50 /* kprobe_running() needs smp_processor_id() */
51 if (!user_mode(regs)) {
52 preempt_disable();
53 if (kprobe_running() && kprobe_fault_handler(regs, 11))
54 ret = true;
55 preempt_enable();
56 }
57#endif /* CONFIG_KPROBES */
58
59 if (unlikely(debugger_fault_handler(regs)))
60 ret = true;
61
62 return ret;
63}
64
65/* 45/*
66 * Check whether the instruction inst is a store using 46 * Check whether the instruction inst is a store using
67 * an update addressing form which will update r1. 47 * an update addressing form which will update r1.
@@ -461,8 +441,9 @@ static int __do_page_fault(struct pt_regs *regs, unsigned long address,
461 int is_write = page_fault_is_write(error_code); 441 int is_write = page_fault_is_write(error_code);
462 vm_fault_t fault, major = 0; 442 vm_fault_t fault, major = 0;
463 bool must_retry = false; 443 bool must_retry = false;
444 bool kprobe_fault = kprobe_page_fault(regs, 11);
464 445
465 if (notify_page_fault(regs)) 446 if (unlikely(debugger_fault_handler(regs) || kprobe_fault))
466 return 0; 447 return 0;
467 448
468 if (unlikely(page_fault_is_bad(error_code))) { 449 if (unlikely(page_fault_is_bad(error_code))) {