diff options
author | Tony Lu <zlu@tilera.com> | 2013-08-09 15:08:57 -0400 |
---|---|---|
committer | Chris Metcalf <cmetcalf@tilera.com> | 2013-08-30 11:55:53 -0400 |
commit | 3fa17c395bb0c358745fbe0c8aa039d6cdac1735 (patch) | |
tree | c12f999476581bf31929c4d6a7697efe7062d904 /arch/tile/mm/fault.c | |
parent | a61fd5e3662d576998d72f80376f23b6ef083d6e (diff) |
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.c | 12 |
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 @@ | |||
34 | #include <linux/hugetlb.h> | 34 | #include <linux/hugetlb.h> |
35 | #include <linux/syscalls.h> | 35 | #include <linux/syscalls.h> |
36 | #include <linux/uaccess.h> | 36 | #include <linux/uaccess.h> |
37 | #include <linux/kdebug.h> | ||
37 | 38 | ||
38 | #include <asm/pgalloc.h> | 39 | #include <asm/pgalloc.h> |
39 | #include <asm/sections.h> | 40 | #include <asm/sections.h> |
@@ -721,6 +722,17 @@ void do_page_fault(struct pt_regs *regs, int fault_num, | |||
721 | { | 722 | { |
722 | int is_page_fault; | 723 | int is_page_fault; |
723 | 724 | ||
725 | #ifdef CONFIG_KPROBES | ||
726 | /* | ||
727 | * This is to notify the fault handler of the kprobes. The | ||
728 | * exception code is redundant as it is also carried in REGS, | ||
729 | * but we pass it anyhow. | ||
730 | */ | ||
731 | if (notify_die(DIE_PAGE_FAULT, "page fault", regs, -1, | ||
732 | regs->faultnum, SIGSEGV) == NOTIFY_STOP) | ||
733 | return; | ||
734 | #endif | ||
735 | |||
724 | #ifdef __tilegx__ | 736 | #ifdef __tilegx__ |
725 | /* | 737 | /* |
726 | * We don't need early do_page_fault_ics() support, since unlike | 738 | * We don't need early do_page_fault_ics() support, since unlike |