Skip to content

Commit

Permalink
sparc64: Use kprobes_built_in() to avoid ifdefs in fault_64.c
Browse files Browse the repository at this point in the history
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Dec 11, 2009
1 parent 936cf25 commit 135d082
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions arch/sparc/mm/fault_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,19 @@
#include <asm/sections.h>
#include <asm/mmu_context.h>

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

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

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

0 comments on commit 135d082

Please sign in to comment.