2 * Tracing hooks, SPARC64 CPU support
4 * Copyright (C) 2006, 2007 Red Hat, Inc. All rights reserved.
6 * This copyrighted material is made available to anyone wishing to use,
7 * modify, copy, or redistribute it subject to the terms and conditions
8 * of the GNU General Public License v.2.
10 * Red Hat Author: Roland McGrath.
13 #ifndef _ASM_TRACEHOOK_H
14 #define _ASM_TRACEHOOK_H 1
17 #include <linux/sched.h>
18 #include <asm/ptrace.h>
21 * See linux/tracehook.h for the descriptions of what these need to do.
25 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
27 set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
30 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
32 clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
35 static inline void tracehook_abort_syscall(struct pt_regs *regs)
37 regs->u_regs[UREG_G1] = -1L;
40 extern const struct utrace_regset_view utrace_sparc64_native_view;
41 static inline const struct utrace_regset_view *
42 utrace_native_view(struct task_struct *tsk)
45 extern const struct utrace_regset_view utrace_sparc32_view;
46 if (test_tsk_thread_flag(tsk, TIF_32BIT))
47 return &utrace_sparc32_view;
49 return &utrace_sparc64_native_view;