Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes...
[sfrench/cifs-2.6.git] / arch / sh / kernel / ptrace_64.c
index 695097438f0207e72de50bd370d8e36d3d7c391c..873ebdc4f98efcaed37132f524f78d35fb7c9d3a 100644 (file)
@@ -40,6 +40,9 @@
 #include <asm/syscalls.h>
 #include <asm/fpu.h>
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/syscalls.h>
+
 /* 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)
@@ -79,7 +82,7 @@ get_fpu_long(struct task_struct *task, unsigned long addr)
 
        if (last_task_used_math == task) {
                enable_fpu();
-               save_fpu(task, regs);
+               save_fpu(task);
                disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
@@ -115,7 +118,7 @@ put_fpu_long(struct task_struct *task, unsigned long addr, unsigned long data)
                set_stopped_child_used_math(task);
        } else if (last_task_used_math == task) {
                enable_fpu();
-               save_fpu(task, regs);
+               save_fpu(task);
                disable_fpu();
                last_task_used_math = 0;
                regs->sr |= SR_FD;
@@ -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);
 }