summaryrefslogtreecommitdiffstats
path: root/include/asm-arm/proc-armv/ptrace.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-22 23:05:57 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-22 23:05:57 +0000
commit51d3b7814cdccef9188240fe0cbd8d97ff2c7470 (patch)
tree5cbb01d0323d4f63ade66bdf48ba4a91aaa6df16 /include/asm-arm/proc-armv/ptrace.h
parent52273a23c9a84336b93a35e4847fc88fac7eb0e4 (diff)
Merge with Linux 2.3.7.
WARNING: 2.3.7 is known to eat filesystems for breakfast and little children for lunch, so if you try this on your machine make backups first ...
Diffstat (limited to 'include/asm-arm/proc-armv/ptrace.h')
-rw-r--r--include/asm-arm/proc-armv/ptrace.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/asm-arm/proc-armv/ptrace.h b/include/asm-arm/proc-armv/ptrace.h
index b24305bd4..01f0a8ac8 100644
--- a/include/asm-arm/proc-armv/ptrace.h
+++ b/include/asm-arm/proc-armv/ptrace.h
@@ -52,6 +52,8 @@ struct pt_regs {
#define CC_Z_BIT (1 << 30)
#define CC_N_BIT (1 << 31)
+#ifdef __KERNEL__
+
#if 0 /* GCC/egcs should be able to optimise this, IMHO */
#define user_mode(regs) \
((((regs)->ARM_cpsr & MODE_MASK) == USR_MODE) || \
@@ -81,8 +83,8 @@ struct pt_regs {
*/
static inline int valid_user_regs(struct pt_regs *regs)
{
- if ((regs->ARM_cpsr & 0xf) == 0 ||
- (regs->ARM_cpsr & (F_BIT|I_BIT)))
+ if ((regs->ARM_cpsr & 0xf) == 0 &&
+ (regs->ARM_cpsr & (F_BIT|I_BIT)) == 0)
return 1;
/*
@@ -93,5 +95,7 @@ static inline int valid_user_regs(struct pt_regs *regs)
return 0;
}
+#endif /* __KERNEL__ */
+
#endif