sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c

Signed-off-by: David S. Miller <davem@davemloft.net>

+1 -8
+1 -8
arch/sparc/mm/fault_64.c
··· 31 #include <asm/sections.h> 32 #include <asm/mmu_context.h> 33 34 - #ifdef CONFIG_KPROBES 35 static inline int notify_page_fault(struct pt_regs *regs) 36 { 37 int ret = 0; 38 39 /* kprobe_running() needs smp_processor_id() */ 40 - if (!user_mode(regs)) { 41 preempt_disable(); 42 if (kprobe_running() && kprobe_fault_handler(regs, 0)) 43 ret = 1; ··· 44 } 45 return ret; 46 } 47 - #else 48 - static inline int notify_page_fault(struct pt_regs *regs) 49 - { 50 - return 0; 51 - } 52 - #endif 53 54 static void __kprobes unhandled_fault(unsigned long address, 55 struct task_struct *tsk,
··· 31 #include <asm/sections.h> 32 #include <asm/mmu_context.h> 33 34 static inline int notify_page_fault(struct pt_regs *regs) 35 { 36 int ret = 0; 37 38 /* kprobe_running() needs smp_processor_id() */ 39 + if (kprobes_built_in() && !user_mode(regs)) { 40 preempt_disable(); 41 if (kprobe_running() && kprobe_fault_handler(regs, 0)) 42 ret = 1; ··· 45 } 46 return ret; 47 } 48 49 static void __kprobes unhandled_fault(unsigned long address, 50 struct task_struct *tsk,