diff options
author | David S. Miller <davem@davemloft.net> | 2008-07-31 20:32:35 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-31 20:32:35 -0700 |
commit | 6717c282e407650c29e7b058623d89f543015a33 (patch) | |
tree | d23e0e8cea5ec49f5946dfd35bd20ec6e6cd53a9 /arch/sparc/include/asm/ptrace_64.h | |
parent | 9c636e30a33aa37873c53977c429f0fdad4ec0eb (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_64.h')
-rw-r--r-- | arch/sparc/include/asm/ptrace_64.h | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/arch/sparc/include/asm/ptrace_64.h b/arch/sparc/include/asm/ptrace_64.h index 390d92ac67c..06e4914c13f 100644 --- a/arch/sparc/include/asm/ptrace_64.h +++ b/arch/sparc/include/asm/ptrace_64.h @@ -37,21 +37,6 @@ struct pt_regs { unsigned int magic; }; -static inline int pt_regs_trap_type(struct pt_regs *regs) -{ - return regs->magic & 0x1ff; -} - -static inline bool pt_regs_is_syscall(struct pt_regs *regs) -{ - return (regs->tstate & TSTATE_SYSCALL); -} - -static inline bool pt_regs_clear_syscall(struct pt_regs *regs) -{ - return (regs->tstate &= ~TSTATE_SYSCALL); -} - struct pt_regs32 { unsigned int psr; unsigned int pc; @@ -128,6 +113,21 @@ struct sparc_trapf { #ifdef __KERNEL__ +static inline int pt_regs_trap_type(struct pt_regs *regs) +{ + return regs->magic & 0x1ff; +} + +static inline bool pt_regs_is_syscall(struct pt_regs *regs) +{ + return (regs->tstate & TSTATE_SYSCALL); +} + +static inline bool pt_regs_clear_syscall(struct pt_regs *regs) +{ + return (regs->tstate &= ~TSTATE_SYSCALL); +} + struct global_reg_snapshot { unsigned long tstate; unsigned long tpc; @@ -154,7 +154,6 @@ extern unsigned long profile_pc(struct pt_regs *); #define profile_pc(regs) instruction_pointer(regs) #endif extern void show_regs(struct pt_regs *); -extern void __show_regs(struct pt_regs *); #endif #else /* __ASSEMBLY__ */ |