aboutsummaryrefslogtreecommitdiff
path: root/include/asm-sparc/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-sparc/ptrace.h')
-rw-r--r--include/asm-sparc/ptrace.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/asm-sparc/ptrace.h b/include/asm-sparc/ptrace.h
index c25334234a6..0afb867d6c1 100644
--- a/include/asm-sparc/ptrace.h
+++ b/include/asm-sparc/ptrace.h
@@ -10,6 +10,8 @@
#ifndef __ASSEMBLY__
+#include <linux/types.h>
+
struct pt_regs {
unsigned long psr;
unsigned long pc;
@@ -39,6 +41,16 @@ struct pt_regs {
#define UREG_FP UREG_I6
#define UREG_RETPC UREG_I7
+static inline bool pt_regs_is_syscall(struct pt_regs *regs)
+{
+ return (regs->psr & PSR_SYSCALL);
+}
+
+static inline bool pt_regs_clear_syscall(struct pt_regs *regs)
+{
+ return (regs->psr &= ~PSR_SYSCALL);
+}
+
/* A register window */
struct reg_window {
unsigned long locals[8];