summaryrefslogtreecommitdiffstats
path: root/arch/tile/mm/fault.c
diff options
context:
space:
mode:
authorTony Lu <zlu@tilera.com>2013-08-09 21:08:57 +0200
committerChris Metcalf <cmetcalf@tilera.com>2013-08-30 17:55:53 +0200
commit3fa17c395bb0c358745fbe0c8aa039d6cdac1735 (patch)
treec12f999476581bf31929c4d6a7697efe7062d904 /arch/tile/mm/fault.c
parenttile: support ftrace on tilegx (diff)
downloadlinux-3fa17c395bb0c358745fbe0c8aa039d6cdac1735.tar.xz
linux-3fa17c395bb0c358745fbe0c8aa039d6cdac1735.zip
tile: support kprobes on tilegx
This change includes support for Kprobes, Jprobes and Return Probes. Reviewed-by: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> Signed-off-by: Tony Lu <zlu@tilera.com> Signed-off-by: Chris Metcalf <cmetcalf@tilera.com>
Diffstat (limited to 'arch/tile/mm/fault.c')
-rw-r--r--arch/tile/mm/fault.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/tile/mm/fault.c b/arch/tile/mm/fault.c
index 502664ae1e6e..64eec3f9584f 100644
--- a/arch/tile/mm/fault.c
+++ b/arch/tile/mm/fault.c
@@ -34,6 +34,7 @@
#include <linux/hugetlb.h>
#include <linux/syscalls.h>
#include <linux/uaccess.h>
+#include <linux/kdebug.h>
#include <asm/pgalloc.h>
#include <asm/sections.h>
@@ -721,6 +722,17 @@ void do_page_fault(struct pt_regs *regs, int fault_num,
{
int is_page_fault;
+#ifdef CONFIG_KPROBES
+ /*
+ * This is to notify the fault handler of the kprobes. The
+ * exception code is redundant as it is also carried in REGS,
+ * but we pass it anyhow.
+ */
+ if (notify_die(DIE_PAGE_FAULT, "page fault", regs, -1,
+ regs->faultnum, SIGSEGV) == NOTIFY_STOP)
+ return;
+#endif
+
#ifdef __tilegx__
/*
* We don't need early do_page_fault_ics() support, since unlike