blob: 7cbae382cf3736dd0f8774ab12fce45866d20f60 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Aurelien Jacquiot52679b22011-10-04 11:13:21 -04002/*
3 * Copyright (C) 2004, 2006, 2009, 2010 Texas Instruments Incorporated
4 * Author: Aurelien Jacquiot (aurelien.jacquiot@jaluna.com)
5 *
6 * Updated for 2.6.34: Mark Salter <msalter@redhat.com>
Aurelien Jacquiot52679b22011-10-04 11:13:21 -04007 */
8#ifndef _ASM_C6X_PTRACE_H
9#define _ASM_C6X_PTRACE_H
10
David Howellsfbdd63d2012-10-09 09:46:40 +010011#include <uapi/asm/ptrace.h>
Mark Salterfce24472012-04-23 10:02:08 -040012
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040013#ifndef __ASSEMBLY__
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040014#ifdef _BIG_ENDIAN
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040015#else
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040016#endif
17
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040018#include <linux/linkage.h>
19
20#define user_mode(regs) ((((regs)->tsr) & 0x40) != 0)
21
22#define instruction_pointer(regs) ((regs)->pc)
23#define profile_pc(regs) instruction_pointer(regs)
24#define user_stack_pointer(regs) ((regs)->sp)
25
26extern void show_regs(struct pt_regs *);
27
28extern asmlinkage unsigned long syscall_trace_entry(struct pt_regs *regs);
29extern asmlinkage void syscall_trace_exit(struct pt_regs *regs);
30
Aurelien Jacquiot52679b22011-10-04 11:13:21 -040031#endif /* __ASSEMBLY__ */
32#endif /* _ASM_C6X_PTRACE_H */