Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 092a4e95 authored by Jamie Iles's avatar Jamie Iles Committed by Russell King
Browse files

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: default avatarJamie Iles <jamie.iles@picochip.com>
Signed-off-by: default avatarRussell King <rmk+kernel@arm.linux.org.uk>
parent 8784895e
Loading
Loading
Loading
Loading
+6 −0
Original line number Original line Diff line number Diff line
@@ -97,9 +97,15 @@
 * stack during a system call.  Note that sizeof(struct pt_regs)
 * stack during a system call.  Note that sizeof(struct pt_regs)
 * has to be a multiple of 8.
 * has to be a multiple of 8.
 */
 */
#ifndef __KERNEL__
struct pt_regs {
struct pt_regs {
	long uregs[18];
	long uregs[18];
};
};
#else /* __KERNEL__ */
struct pt_regs {
	unsigned long uregs[18];
};
#endif /* __KERNEL__ */


#define ARM_cpsr	uregs[16]
#define ARM_cpsr	uregs[16]
#define ARM_pc		uregs[15]
#define ARM_pc		uregs[15]