[RFC 5/5] ARM: P2V: extend to 16-bit translation offsets

Russell King - ARM Linux linux at arm.linux.org.uk
Tue Jan 4 19:15:24 EST 2011

On Tue, Jan 04, 2011 at 04:41:34PM -0500, Nicolas Pitre wrote:
> I'd suggest making the type argument into a mask instead, something 
> like:
> 	__pv_stub(x, t, "add", 0xff000000);
> 	__pv_stub(t, t, "add", 0x00ff0000);
> #endif
> Reasons for this are multiple:
>  - This would simplifies the patching code as the rotation bitfield in 
>    the instruction would already be set appropriately for the desired 
>    value by the assembler.  Would only suffice to test one bit in that 
>    field to determine the required constant to patch in.
>  - For the Thumb2 build, we want the assembler to select the appropriate 
>    encoding flavor for the add instruction from all the possibilities.  
>    Giving it a constant with all bits set nicely solves this issue.
> If further distinctions are needed in the future then we can use the 6 
> middle bits to encode alternatives.

Lets go with 0x81000000 and 0x0081000000 for the first then.  We can
count up with the 6-bit value from there.

More information about the linux-arm-kernel mailing list