aboutsummaryrefslogtreecommitdiffstats
path: root/arch/openrisc/include/asm/ptrace.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/openrisc/include/asm/ptrace.h')
-rw-r--r--arch/openrisc/include/asm/ptrace.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/arch/openrisc/include/asm/ptrace.h b/arch/openrisc/include/asm/ptrace.h
index 054537c5f9c9..4651a737591d 100644
--- a/arch/openrisc/include/asm/ptrace.h
+++ b/arch/openrisc/include/asm/ptrace.h
@@ -73,11 +73,14 @@ struct pt_regs {
};
};
long pc;
+ /* For restarting system calls:
+ * Set to syscall number for syscall exceptions,
+ * -1 for all other exceptions.
+ */
long orig_gpr11; /* For restarting system calls */
- long syscallno; /* Syscall number (used by strace) */
long dummy; /* Cheap alignment fix */
+ long dummy2; /* Cheap alignment fix */
};
-#endif /* __ASSEMBLY__ */
/* TODO: Rename this to REDZONE because that's what it is */
#define STACK_FRAME_OVERHEAD 128 /* size of minimum stack frame */
@@ -87,6 +90,13 @@ struct pt_regs {
#define user_stack_pointer(regs) ((unsigned long)(regs)->sp)
#define profile_pc(regs) instruction_pointer(regs)
+static inline long regs_return_value(struct pt_regs *regs)
+{
+ return regs->gpr[11];
+}
+
+#endif /* __ASSEMBLY__ */
+
/*
* Offsets used by 'ptrace' system call interface.
*/