diff options
author | David S. Miller <davem@davemloft.net> | 2009-12-10 21:02:19 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-10 21:02:19 -0500 |
commit | 135d082171766922c6a9e2c741a326e518268428 (patch) | |
tree | 26a96b4971e7d3e0a9d743516c6c8e506caca2aa /arch/sparc | |
parent | 936cf251787be41833afe2a1e44fbd5fb2adbdb6 (diff) |
sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/mm/fault_64.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/arch/sparc/mm/fault_64.c b/arch/sparc/mm/fault_64.c index 43b0da96a4fb..0aa50b200af8 100644 --- a/arch/sparc/mm/fault_64.c +++ b/arch/sparc/mm/fault_64.c | |||
@@ -31,13 +31,12 @@ | |||
31 | #include <asm/sections.h> | 31 | #include <asm/sections.h> |
32 | #include <asm/mmu_context.h> | 32 | #include <asm/mmu_context.h> |
33 | 33 | ||
34 | #ifdef CONFIG_KPROBES | ||
35 | static inline int notify_page_fault(struct pt_regs *regs) | 34 | static inline int notify_page_fault(struct pt_regs *regs) |
36 | { | 35 | { |
37 | int ret = 0; | 36 | int ret = 0; |
38 | 37 | ||
39 | /* kprobe_running() needs smp_processor_id() */ | 38 | /* kprobe_running() needs smp_processor_id() */ |
40 | if (!user_mode(regs)) { | 39 | if (kprobes_built_in() && !user_mode(regs)) { |
41 | preempt_disable(); | 40 | preempt_disable(); |
42 | if (kprobe_running() && kprobe_fault_handler(regs, 0)) | 41 | if (kprobe_running() && kprobe_fault_handler(regs, 0)) |
43 | ret = 1; | 42 | ret = 1; |
@@ -45,12 +44,6 @@ static inline int notify_page_fault(struct pt_regs *regs) | |||
45 | } | 44 | } |
46 | return ret; | 45 | return ret; |
47 | } | 46 | } |
48 | #else | ||
49 | static inline int notify_page_fault(struct pt_regs *regs) | ||
50 | { | ||
51 | return 0; | ||
52 | } | ||
53 | #endif | ||
54 | 47 | ||
55 | static void __kprobes unhandled_fault(unsigned long address, | 48 | static void __kprobes unhandled_fault(unsigned long address, |
56 | struct task_struct *tsk, | 49 | struct task_struct *tsk, |