[PATCH] ARM: bitops: Fix low-level code to be Thumb-2 compatible

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Feb 2 15:47:17 EST 2011


On Wed, Feb 02, 2011 at 03:39:13PM -0500, Nicolas Pitre wrote:
> On Wed, 2 Feb 2011, Russell King - ARM Linux wrote:
> 
> > On Wed, Feb 02, 2011 at 02:33:55PM -0500, Nicolas Pitre wrote:
> > > On Wed, 2 Feb 2011, Dave Martin wrote:
> > > 
> > > > The new bitops code cunningly str <Rt>, [r1, -r1] to trigger
> > > > a fault by attempting to store to address zero.
> > > > 
> > > > This code doesn't assemble in Thumb-2, since Thumb-2 doesn't
> > > > allow negative register offsets at all for loads and stores.
> > > > 
> > > > The patch loads 0 into r2 and uses that as a base register
> > > > instead for the Thumb-2 case: r2 seems non-live at every
> > > > instance of this problem.
> > > > 
> > > > The ARM case is unaffected.
> > > > 
> > > > Signed-off-by: Dave Martin <dave.martin at linaro.org>
> > > 
> > > Russell proposed a better solution already:
> > > 
> > > http://mid.gmane.org/alpine.LFD.2.00.1101181312360.8580@xanadu.home
> > > 
> > > No idea why this wasn't folded in his series yet though.
> > 
> > Because I haven't got a round tuit.
> > 
> > http://www.quantumenterprises.co.uk/roundtuit/traditional_round_tuits.htm
> 
> LOL!  No problem, here's a virtual one.  :-)

While you're waiting, you might like to get involved with the firestorm
which David Brown has started with GregKH over the visibility of my git
tree.  I'm beyond participating in such arguments.

Oh, and if I follow what GregKH is saying, I have to refuse to fold this
change in.



More information about the linux-arm-kernel mailing list