aboutsummaryrefslogtreecommitdiffstats
path: root/arch/xtensa/include/asm/thread_info.h
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2018-11-11 21:51:49 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2018-12-17 13:50:25 -0800
commitaf5395c214c15c18de3decf2229373a8c88c4fde (patch)
treed378a62b132af1c2532f745e22c99ac69c40bba2 /arch/xtensa/include/asm/thread_info.h
parentxtensa: implement tracehook functions and enable HAVE_ARCH_TRACEHOOK (diff)
downloadlinux-dev-af5395c214c15c18de3decf2229373a8c88c4fde.tar.xz
linux-dev-af5395c214c15c18de3decf2229373a8c88c4fde.zip
xtensa: implement syscall tracepoints
Add TIF_SYSCALL_TRACEPOINT flag definition; add _TIF_SYSCALL_TRACEPOINT to _TIF_WORK_MASK. Call trace_sys_enter from do_syscall_trace_enter and trace_sys_exit from do_syscall_trace_leave when TIF_SYSCALL_TRACEPOINT flag is set. Add declaration of sys_call_table to arch/xtensa/include/asm/syscall.h Add definition of NR_syscalls to arch/xtensa/include/asm/unistd.h Select HAVE_SYSCALL_TRACEPOINTS. This change allows tracing each syscall entry and exit through the ftrace mechanism. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/include/asm/thread_info.h')
-rw-r--r--arch/xtensa/include/asm/thread_info.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/xtensa/include/asm/thread_info.h b/arch/xtensa/include/asm/thread_info.h
index c823dddfebdf..f333f10a7650 100644
--- a/arch/xtensa/include/asm/thread_info.h
+++ b/arch/xtensa/include/asm/thread_info.h
@@ -106,6 +106,7 @@ static inline struct thread_info *current_thread_info(void)
#define TIF_SIGPENDING 1 /* signal pending */
#define TIF_NEED_RESCHED 2 /* rescheduling necessary */
#define TIF_SINGLESTEP 3 /* restore singlestep on return to user mode */
+#define TIF_SYSCALL_TRACEPOINT 4 /* syscall tracepoint instrumentation */
#define TIF_MEMDIE 5 /* is terminating due to OOM killer */
#define TIF_RESTORE_SIGMASK 6 /* restore signal mask in do_signal() */
#define TIF_NOTIFY_RESUME 7 /* callback before returning to user */
@@ -115,8 +116,10 @@ static inline struct thread_info *current_thread_info(void)
#define _TIF_SIGPENDING (1<<TIF_SIGPENDING)
#define _TIF_NEED_RESCHED (1<<TIF_NEED_RESCHED)
#define _TIF_SINGLESTEP (1<<TIF_SINGLESTEP)
+#define _TIF_SYSCALL_TRACEPOINT (1<<TIF_SYSCALL_TRACEPOINT)
-#define _TIF_WORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP)
+#define _TIF_WORK_MASK (_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | \
+ _TIF_SYSCALL_TRACEPOINT)
/*
* Thread-synchronous status.