aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/include/asm/ptrace_64.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sparc/include/asm/ptrace_64.h')
-rw-r--r--arch/sparc/include/asm/ptrace_64.h39
1 files changed, 19 insertions, 20 deletions
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h
index ec6d45c84cd0..06e4914c13f4 100644
--- a/arch/sparc/include/asm/ptrace_64.h
+++ b/arch/sparc/include/asm/ptrace_64.h
@@ -37,21 +37,6 @@ struct pt_regs {
37 unsigned int magic; 37 unsigned int magic;
38}; 38};
39 39
40static inline int pt_regs_trap_type(struct pt_regs *regs)
41{
42 return regs->magic & 0x1ff;
43}
44
45static inline bool pt_regs_is_syscall(struct pt_regs *regs)
46{
47 return (regs->tstate & TSTATE_SYSCALL);
48}
49
50static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
51{
52 return (regs->tstate &= ~TSTATE_SYSCALL);
53}
54
55struct pt_regs32 { 40struct pt_regs32 {
56 unsigned int psr; 41 unsigned int psr;
57 unsigned int pc; 42 unsigned int pc;
@@ -128,15 +113,30 @@ struct sparc_trapf {
128 113
129#ifdef __KERNEL__ 114#ifdef __KERNEL__
130 115
116static inline int pt_regs_trap_type(struct pt_regs *regs)
117{
118 return regs->magic & 0x1ff;
119}
120
121static inline bool pt_regs_is_syscall(struct pt_regs *regs)
122{
123 return (regs->tstate & TSTATE_SYSCALL);
124}
125
126static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
127{
128 return (regs->tstate &= ~TSTATE_SYSCALL);
129}
130
131struct global_reg_snapshot { 131struct global_reg_snapshot {
132 unsigned long tstate; 132 unsigned long tstate;
133 unsigned long tpc; 133 unsigned long tpc;
134 unsigned long tnpc; 134 unsigned long tnpc;
135 unsigned long o7; 135 unsigned long o7;
136 unsigned long i7; 136 unsigned long i7;
137 unsigned long rpc;
137 struct thread_info *thread; 138 struct thread_info *thread;
138 unsigned long pad1; 139 unsigned long pad1;
139 unsigned long pad2;
140}; 140};
141 141
142#define __ARCH_WANT_COMPAT_SYS_PTRACE 142#define __ARCH_WANT_COMPAT_SYS_PTRACE
@@ -154,7 +154,6 @@ extern unsigned long profile_pc(struct pt_regs *);
154#define profile_pc(regs) instruction_pointer(regs) 154#define profile_pc(regs) instruction_pointer(regs)
155#endif 155#endif
156extern void show_regs(struct pt_regs *); 156extern void show_regs(struct pt_regs *);
157extern void __show_regs(struct pt_regs *);
158#endif 157#endif
159 158
160#else /* __ASSEMBLY__ */ 159#else /* __ASSEMBLY__ */
@@ -315,9 +314,9 @@ extern void __show_regs(struct pt_regs *);
315#define GR_SNAP_TNPC 0x10 314#define GR_SNAP_TNPC 0x10
316#define GR_SNAP_O7 0x18 315#define GR_SNAP_O7 0x18
317#define GR_SNAP_I7 0x20 316#define GR_SNAP_I7 0x20
318#define GR_SNAP_THREAD 0x28 317#define GR_SNAP_RPC 0x28
319#define GR_SNAP_PAD1 0x30 318#define GR_SNAP_THREAD 0x30
320#define GR_SNAP_PAD2 0x38 319#define GR_SNAP_PAD1 0x38
321 320
322#endif /* __KERNEL__ */ 321#endif /* __KERNEL__ */
323 322