diff options
Diffstat (limited to 'arch/xtensa/kernel')
-rw-r--r-- | arch/xtensa/kernel/ptrace.c | 8 | ||||
-rw-r--r-- | arch/xtensa/kernel/syscall.c | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/arch/xtensa/kernel/ptrace.c b/arch/xtensa/kernel/ptrace.c index 207aa272b48c..b964f0b2d886 100644 --- a/arch/xtensa/kernel/ptrace.c +++ b/arch/xtensa/kernel/ptrace.c @@ -27,6 +27,9 @@ #include <linux/tracehook.h> #include <linux/uaccess.h> +#define CREATE_TRACE_POINTS +#include <trace/events/syscalls.h> + #include <asm/coprocessor.h> #include <asm/elf.h> #include <asm/page.h> @@ -545,12 +548,17 @@ void do_syscall_trace_enter(struct pt_regs *regs) tracehook_report_syscall_entry(regs)) regs->syscall = NO_SYSCALL; + if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) + trace_sys_enter(regs, syscall_get_nr(current, regs)); } void do_syscall_trace_leave(struct pt_regs *regs) { int step; + if (test_thread_flag(TIF_SYSCALL_TRACEPOINT)) + trace_sys_exit(regs, regs_return_value(regs)); + step = test_thread_flag(TIF_SINGLESTEP); if (step || test_thread_flag(TIF_SYSCALL_TRACE)) diff --git a/arch/xtensa/kernel/syscall.c b/arch/xtensa/kernel/syscall.c index b8240e08f1f1..2c415fce6801 100644 --- a/arch/xtensa/kernel/syscall.c +++ b/arch/xtensa/kernel/syscall.c @@ -28,8 +28,6 @@ #include <linux/sched/mm.h> #include <linux/shm.h> -typedef void (*syscall_t)(void); - syscall_t sys_call_table[__NR_syscalls] /* FIXME __cacheline_aligned */= { [0 ... __NR_syscalls - 1] = (syscall_t)&sys_ni_syscall, |