Thread (39 messages) 39 messages, 14 authors, 2011-02-17

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

From: Russell King - ARM Linux <hidden>
Date: 2011-01-05 00:15:24

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);
#ifdef CONFIG_ARM_PATCH_PHYS_VIRT_16BIT
	__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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help