2 * Tracing hooks, s390/s390x 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
16 #include <linux/sched.h>
17 #include <asm/ptrace.h>
20 * See linux/tracehook.h for the descriptions of what these need to do.
23 #define ARCH_HAS_SINGLE_STEP (1)
25 /* These three are defined in arch/s390/kernel/ptrace.c. */
26 void tracehook_enable_single_step(struct task_struct *tsk);
27 void tracehook_disable_single_step(struct task_struct *tsk);
28 int tracehook_single_step_enabled(struct task_struct *tsk);
31 static inline void tracehook_enable_syscall_trace(struct task_struct *tsk)
33 set_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
36 static inline void tracehook_disable_syscall_trace(struct task_struct *tsk)
38 clear_tsk_thread_flag(tsk, TIF_SYSCALL_TRACE);
41 static inline void tracehook_abort_syscall(struct pt_regs *regs)
47 extern const struct utrace_regset_view utrace_s390_native_view;
48 static inline const struct utrace_regset_view *
49 utrace_native_view(struct task_struct *tsk)
52 extern const struct utrace_regset_view utrace_s390_compat_view;
54 if (test_tsk_thread_flag(tsk, TIF_31BIT))
55 return &utrace_s390_compat_view;
57 return &utrace_s390_native_view;