aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/ptrace_32.h
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-31 20:32:35 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-31 20:32:35 -0700
commit6717c282e407650c29e7b058623d89f543015a33 (patch)
treed23e0e8cea5ec49f5946dfd35bd20ec6e6cd53a9 /arch/sparc/include/asm/ptrace_32.h
parent9c636e30a33aa37873c53977c429f0fdad4ec0eb (diff)
sparc: Add __KERNEL__ ifdef protection to pt_regs helpers.
Some of them use 'bool' and whatnot and therefore are not kosher for userspace, so don't export them there. Reported by Roland McGrath. Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/include/asm/ptrace_32.h')
-rw-r--r--arch/sparc/include/asm/ptrace_32.h20
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 d43c88b8683..d409c4f21a5 100644
--- a/arch/sparc/include/asm/ptrace_32.h
+++ b/arch/sparc/include/asm/ptrace_32.h
@@ -40,16 +40,6 @@ 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];
@@ -72,6 +62,16 @@ struct sparc_stackf {
#ifdef __KERNEL__
+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);
+}
+
#define user_mode(regs) (!((regs)->psr & PSR_PS))
#define instruction_pointer(regs) ((regs)->pc)
#define user_stack_pointer(regs) ((regs)->u_regs[UREG_FP])