diff options
author | Jamie Iles <jamie.iles@picochip.com> | 2010-01-06 04:50:08 -0500 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2010-01-08 11:14:21 -0500 |
commit | 092a4e957a835cbf6b2ec82a6a4d6ff06c0a362e (patch) | |
tree | c22d005f4268be3553029ae258a68d910e62c28e | |
parent | 8784895ede9a39cfecf76fe26b090a602877f70f (diff) |
ARM: 5866/1: arm ptrace: use unsigned types for kernel pt_regs
Make registers unsigned for kernel space. This is important for
example in the perf events where the PC is stored into a u64. We
don't want it sign extended so make the regs unsigned to prevent
casts throughout the kernel.
Signed-off-by: Jamie Iles <jamie.iles@picochip.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r-- | arch/arm/include/asm/ptrace.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/ptrace.h b/arch/arm/include/asm/ptrace.h index bbecccda76d0..eec6e897ceb2 100644 --- a/arch/arm/include/asm/ptrace.h +++ b/arch/arm/include/asm/ptrace.h | |||
@@ -97,9 +97,15 @@ | |||
97 | * stack during a system call. Note that sizeof(struct pt_regs) | 97 | * stack during a system call. Note that sizeof(struct pt_regs) |
98 | * has to be a multiple of 8. | 98 | * has to be a multiple of 8. |
99 | */ | 99 | */ |
100 | #ifndef __KERNEL__ | ||
100 | struct pt_regs { | 101 | struct pt_regs { |
101 | long uregs[18]; | 102 | long uregs[18]; |
102 | }; | 103 | }; |
104 | #else /* __KERNEL__ */ | ||
105 | struct pt_regs { | ||
106 | unsigned long uregs[18]; | ||
107 | }; | ||
108 | #endif /* __KERNEL__ */ | ||
103 | 109 | ||
104 | #define ARM_cpsr uregs[16] | 110 | #define ARM_cpsr uregs[16] |
105 | #define ARM_pc uregs[15] | 111 | #define ARM_pc uregs[15] |