From a74f7e0410da9da7942cf4f08bbdb0e4fc76f972 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Wed, 16 Sep 2009 14:30:34 +0900 Subject: sh: Wire up HAVE_SYSCALL_TRACEPOINTS. This is necessary to get ftrace syscall tracing working again.. a fairly trivial and mechanical change. The one benefit is that this can also be enabled on sh64, despite not having its own ftrace port. Signed-off-by: Paul Mundt --- arch/sh/kernel/ptrace_32.c | 15 ++++++--------- arch/sh/kernel/ptrace_64.c | 9 +++++++++ 2 files changed, 15 insertions(+), 9 deletions(-) (limited to 'arch/sh/kernel') diff --git a/arch/sh/kernel/ptrace_32.c b/arch/sh/kernel/ptrace_32.c index f4f58e438a2..9be35f34809 100644 --- a/arch/sh/kernel/ptrace_32.c +++ b/arch/sh/kernel/ptrace_32.c @@ -34,7 +34,8 @@ #include #include -#include +#define CREATE_TRACE_POINTS +#include /* * This routine will get a word off of the process kernel stack. @@ -461,10 +462,8 @@ asmlinkage long do_syscall_trace_enter(struct pt_regs *regs) */ ret = -1L; -#ifdef CONFIG_FTRACE_SYSCALLS - if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) - ftrace_syscall_enter(regs); -#endif + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_enter(regs, regs->regs[0]); if (unlikely(current->audit_context)) audit_syscall_entry(audit_arch(), regs->regs[3], @@ -482,10 +481,8 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) audit_syscall_exit(AUDITSC_RESULT(regs->regs[0]), regs->regs[0]); -#ifdef CONFIG_FTRACE_SYSCALLS - if (unlikely(test_thread_flag(TIF_SYSCALL_FTRACE))) - ftrace_syscall_exit(regs); -#endif + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_exit(regs, regs->regs[0]); step = test_thread_flag(TIF_SINGLESTEP); if (step || test_thread_flag(TIF_SYSCALL_TRACE)) diff --git a/arch/sh/kernel/ptrace_64.c b/arch/sh/kernel/ptrace_64.c index 695097438f0..952da83903d 100644 --- a/arch/sh/kernel/ptrace_64.c +++ b/arch/sh/kernel/ptrace_64.c @@ -40,6 +40,9 @@ #include #include +#define CREATE_TRACE_POINTS +#include + /* This mask defines the bits of the SR which the user is not allowed to change, which are everything except S, Q, M, PR, SZ, FR. */ #define SR_MASK (0xffff8cfd) @@ -438,6 +441,9 @@ asmlinkage long long do_syscall_trace_enter(struct pt_regs *regs) */ ret = -1LL; + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_enter(regs, regs->regs[9]); + if (unlikely(current->audit_context)) audit_syscall_entry(audit_arch(), regs->regs[1], regs->regs[2], regs->regs[3], @@ -452,6 +458,9 @@ asmlinkage void do_syscall_trace_leave(struct pt_regs *regs) audit_syscall_exit(AUDITSC_RESULT(regs->regs[9]), regs->regs[9]); + if (unlikely(test_thread_flag(TIF_SYSCALL_TRACEPOINT))) + trace_sys_exit(regs, regs->regs[9]); + if (test_thread_flag(TIF_SYSCALL_TRACE)) tracehook_report_syscall_exit(regs, 0); } -- cgit v1.2.3-70-g09d2