From 3fa17c395bb0c358745fbe0c8aa039d6cdac1735 Mon Sep 17 00:00:00 2001 From: Tony Lu Date: Fri, 9 Aug 2013 15:08:57 -0400 Subject: tile: support kprobes on tilegx This change includes support for Kprobes, Jprobes and Return Probes. Reviewed-by: Masami Hiramatsu Signed-off-by: Tony Lu Signed-off-by: Chris Metcalf --- arch/tile/mm/fault.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/tile/mm/fault.c') 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 #include #include +#include #include #include @@ -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 -- cgit