diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/sh/mm/fault.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/arch/sh/mm/fault.c b/arch/sh/mm/fault.c index 62d028921036..c878faa4ae46 100644 --- a/arch/sh/mm/fault.c +++ b/arch/sh/mm/fault.c | |||
@@ -15,43 +15,11 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/hardirq.h> | 16 | #include <linux/hardirq.h> |
17 | #include <linux/kprobes.h> | 17 | #include <linux/kprobes.h> |
18 | #include <linux/kdebug.h> | ||
19 | #include <asm/system.h> | 18 | #include <asm/system.h> |
20 | #include <asm/mmu_context.h> | 19 | #include <asm/mmu_context.h> |
21 | #include <asm/tlbflush.h> | 20 | #include <asm/tlbflush.h> |
22 | #include <asm/kgdb.h> | 21 | #include <asm/kgdb.h> |
23 | 22 | ||
24 | #ifdef CONFIG_KPROBES | ||
25 | ATOMIC_NOTIFIER_HEAD(notify_page_fault_chain); | ||
26 | |||
27 | /* Hook to register for page fault notifications */ | ||
28 | int register_page_fault_notifier(struct notifier_block *nb) | ||
29 | { | ||
30 | return atomic_notifier_chain_register(¬ify_page_fault_chain, nb); | ||
31 | } | ||
32 | |||
33 | int unregister_page_fault_notifier(struct notifier_block *nb) | ||
34 | { | ||
35 | return atomic_notifier_chain_unregister(¬ify_page_fault_chain, nb); | ||
36 | } | ||
37 | |||
38 | static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, | ||
39 | int trap, int sig) | ||
40 | { | ||
41 | struct die_args args = { | ||
42 | .regs = regs, | ||
43 | .trapnr = trap, | ||
44 | }; | ||
45 | return atomic_notifier_call_chain(¬ify_page_fault_chain, val, &args); | ||
46 | } | ||
47 | #else | ||
48 | static inline int notify_page_fault(enum die_val val, struct pt_regs *regs, | ||
49 | int trap, int sig) | ||
50 | { | ||
51 | return NOTIFY_DONE; | ||
52 | } | ||
53 | #endif | ||
54 | |||
55 | /* | 23 | /* |
56 | * This routine handles page faults. It determines the address, | 24 | * This routine handles page faults. It determines the address, |
57 | * and the problem, and then passes it off to one of the appropriate | 25 | * and the problem, and then passes it off to one of the appropriate |
@@ -69,11 +37,6 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs, | |||
69 | siginfo_t info; | 37 | siginfo_t info; |
70 | 38 | ||
71 | trace_hardirqs_on(); | 39 | trace_hardirqs_on(); |
72 | |||
73 | if (notify_page_fault(DIE_PAGE_FAULT, regs, | ||
74 | writeaccess, SIGSEGV) == NOTIFY_STOP) | ||
75 | return; | ||
76 | |||
77 | local_irq_enable(); | 40 | local_irq_enable(); |
78 | 41 | ||
79 | #ifdef CONFIG_SH_KGDB | 42 | #ifdef CONFIG_SH_KGDB |