[PATCH 4/4] Use generic ARM instruction set condition code checks for kprobes.

Leif Lindholm leif.lindholm at arm.com
Fri Dec 9 13:26:44 EST 2011


On 12/09/11 18:05, Jon Medhurst (Tixy) wrote:
>>> Yes, that is functionally equivalent, and what I did in the RFC version,
>>> but it ended up looking messy at the calling point.
>>
>> Ok, then could you route the ARM variant through the wrapper too?
>
> The function Leif added is for checking the condition code in an ARM
> instruction, so it doesn't need a wrapper when used for this.

It doesn't, but...

> The other locations in the kprobes tests get the condition nibble from
> the ITSATE or from thumb conditional branch instructions. In these cases
> the code looks cleaner if the condition is passed as a value between 0x0
> and 0xf, rather than being shift up to bit position 28 where the
> conditional ARM instructions have it encoded.

I did what Will suggested though, and it does make it a bit cleaner. It 
also moves the ARM_OPCODE_* testing out of the test_context_cpsr code, 
so that all three cases have the probe_should_run setting pretty much 
identical.

I'll post the updated set shortly, so you can have a look.

/
	Leif




More information about the linux-arm-kernel mailing list