diff options
Diffstat (limited to 'arch/sparc/include/asm/ptrace_32.h')
-rw-r--r-- | arch/sparc/include/asm/ptrace_32.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/arch/sparc/include/asm/ptrace_32.h b/arch/sparc/include/asm/ptrace_32.h index d43c88b86834..d409c4f21a5c 100644 --- a/arch/sparc/include/asm/ptrace_32.h +++ b/arch/sparc/include/asm/ptrace_32.h | |||
@@ -40,16 +40,6 @@ struct pt_regs { | |||
40 | #define UREG_FP UREG_I6 | 40 | #define UREG_FP UREG_I6 |
41 | #define UREG_RETPC UREG_I7 | 41 | #define UREG_RETPC UREG_I7 |
42 | 42 | ||
43 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
44 | { | ||
45 | return (regs->psr & PSR_SYSCALL); | ||
46 | } | ||
47 | |||
48 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
49 | { | ||
50 | return (regs->psr &= ~PSR_SYSCALL); | ||
51 | } | ||
52 | |||
53 | /* A register window */ | 43 | /* A register window */ |
54 | struct reg_window { | 44 | struct reg_window { |
55 | unsigned long locals[8]; | 45 | unsigned long locals[8]; |
@@ -72,6 +62,16 @@ struct sparc_stackf { | |||
72 | 62 | ||
73 | #ifdef __KERNEL__ | 63 | #ifdef __KERNEL__ |
74 | 64 | ||
65 | static inline bool pt_regs_is_syscall(struct pt_regs *regs) | ||
66 | { | ||
67 | return (regs->psr & PSR_SYSCALL); | ||
68 | } | ||
69 | |||
70 | static inline bool pt_regs_clear_syscall(struct pt_regs *regs) | ||
71 | { | ||
72 | return (regs->psr &= ~PSR_SYSCALL); | ||
73 | } | ||
74 | |||
75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) | 75 | #define user_mode(regs) (!((regs)->psr & PSR_PS)) |
76 | #define instruction_pointer(regs) ((regs)->pc) | 76 | #define instruction_pointer(regs) ((regs)->pc) |
77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) | 77 | #define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP]) |