Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 135d0821 authored by David S. Miller's avatar David S. Miller
Browse files

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

parent 936cf251
Loading
Loading
Loading
Loading
+1 −8
Original line number Original line Diff line number Diff line
@@ -31,13 +31,12 @@
#include <asm/sections.h>
#include <asm/sections.h>
#include <asm/mmu_context.h>
#include <asm/mmu_context.h>


#ifdef CONFIG_KPROBES
static inline int notify_page_fault(struct pt_regs *regs)
static inline int notify_page_fault(struct pt_regs *regs)
{
{
	int ret = 0;
	int ret = 0;


	/* kprobe_running() needs smp_processor_id() */
	/* kprobe_running() needs smp_processor_id() */
	if (!user_mode(regs)) {
	if (kprobes_built_in() && !user_mode(regs)) {
		preempt_disable();
		preempt_disable();
		if (kprobe_running() && kprobe_fault_handler(regs, 0))
		if (kprobe_running() && kprobe_fault_handler(regs, 0))
			ret = 1;
			ret = 1;
@@ -45,12 +44,6 @@ static inline int notify_page_fault(struct pt_regs *regs)
	}
	}
	return ret;
	return ret;
}
}
#else
static inline int notify_page_fault(struct pt_regs *regs)
{
	return 0;
}
#endif


static void __kprobes unhandled_fault(unsigned long address,
static void __kprobes unhandled_fault(unsigned long address,
				      struct task_struct *tsk,
				      struct task_struct *tsk,