[PATCH 4/5] arm: enable support for software perf events

Russell King - ARM Linux linux at arm.linux.org.uk
Mon Jan 4 06:11:37 EST 2010


On Mon, Jan 04, 2010 at 10:48:41AM +0000, Jamie Iles wrote:
> +/* Get the PC. Make sure that we have a 64bit value with the upper 32 cleared.
> + */
> +#define perf_instruction_pointer(_regs) \
> +	((u64)instruction_pointer(regs) & 0xFFFFFFFFLU)

Maybe we should make pt_regs entries be unsigned instead of having this?
Nothing should be affected by that change - and it looks like x86 went
through this change, making two pt_regs structures, one for userspace
with signed ints/longs, and one for kernel space with unsigned ints/longs.

I think it would make more sense to do that rather than litter the kernel
with casts like the above.



More information about the linux-arm-kernel mailing list