18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */
28c2ecf20Sopenharmony_ci/*
38c2ecf20Sopenharmony_ci *  Copyright (C) 2004, 2006, 2009, 2010 Texas Instruments Incorporated
48c2ecf20Sopenharmony_ci *  Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
58c2ecf20Sopenharmony_ci *
68c2ecf20Sopenharmony_ci *  Updated for 2.6.34: Mark Salter <msalter@redhat.com>
78c2ecf20Sopenharmony_ci */
88c2ecf20Sopenharmony_ci#ifndef _ASM_C6X_PTRACE_H
98c2ecf20Sopenharmony_ci#define _ASM_C6X_PTRACE_H
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci#include <uapi/asm/ptrace.h>
128c2ecf20Sopenharmony_ci
138c2ecf20Sopenharmony_ci#ifndef __ASSEMBLY__
148c2ecf20Sopenharmony_ci#ifdef _BIG_ENDIAN
158c2ecf20Sopenharmony_ci#else
168c2ecf20Sopenharmony_ci#endif
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci#include <linux/linkage.h>
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci#define user_mode(regs)	((((regs)->tsr) & 0x40) != 0)
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ci#define instruction_pointer(regs) ((regs)->pc)
238c2ecf20Sopenharmony_ci#define profile_pc(regs) instruction_pointer(regs)
248c2ecf20Sopenharmony_ci#define user_stack_pointer(regs) ((regs)->sp)
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ciextern void show_regs(struct pt_regs *);
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ciextern asmlinkage unsigned long syscall_trace_entry(struct pt_regs *regs);
298c2ecf20Sopenharmony_ciextern asmlinkage void syscall_trace_exit(struct pt_regs *regs);
308c2ecf20Sopenharmony_ci
318c2ecf20Sopenharmony_ci#endif /* __ASSEMBLY__ */
328c2ecf20Sopenharmony_ci#endif /* _ASM_C6X_PTRACE_H */
33