summaryrefslogtreecommitdiffstats
path: root/arch/sh/mm
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2008-09-21 12:06:43 +0900
committerPaul Mundt <lethal@linux-sh.org>2008-09-21 12:06:43 +0900
commit887f1ae3bc1701604a7b5ef145e1021072675444 (patch)
tree79d2e9e0a0fa0dfe838ba06554d1960c82f8789a /arch/sh/mm
parent4c59e2942e92d2d776bcd038604a5c3c1d56d3ac (diff)
sh: Look up the trap vector for the page fault notifier.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/mm')
-rw-r--r--arch/sh/mm/fault_32.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/arch/sh/mm/fault_32.c b/arch/sh/mm/fault_32.c
index 659811c179e..ef01f45daa8 100644
--- a/arch/sh/mm/fault_32.c
+++ b/arch/sh/mm/fault_32.c
@@ -21,26 +21,21 @@
#include <asm/tlbflush.h>
#include <asm/kgdb.h>
-#ifdef CONFIG_KPROBES
static inline int notify_page_fault(struct pt_regs *regs, int trap)
{
int ret = 0;
+#ifdef CONFIG_KPROBES
if (!user_mode(regs)) {
preempt_disable();
if (kprobe_running() && kprobe_fault_handler(regs, trap))
ret = 1;
preempt_enable();
}
+#endif
return ret;
}
-#else
-static inline int notify_page_fault(struct pt_regs *regs, int trap)
-{
- return 0;
-}
-#endif
/*
* This routine handles page faults. It determines the address,
@@ -58,7 +53,7 @@ asmlinkage void __kprobes do_page_fault(struct pt_regs *regs,
int fault;
siginfo_t info;
- if (notify_page_fault(regs, writeaccess))
+ if (notify_page_fault(regs, lookup_exception_vector()))
return;
#ifdef CONFIG_SH_KGDB
@@ -293,7 +288,7 @@ asmlinkage int __kprobes __do_page_fault(struct pt_regs *regs,
pte_t *pte;
pte_t entry;
- if (notify_page_fault(regs, writeaccess))
+ if (notify_page_fault(regs, lookup_exception_vector()))
return 0;
#ifdef CONFIG_SH_KGDB