[PATCH] ARM: Add SWP/SWPB emulation for ARMv7 processors

Leif Lindholm leif.lindholm at arm.com
Fri Dec 18 09:15:24 EST 2009


Thanks for the feedback.

> From: Woodruff, Richard [mailto:r-woodruff2 at ti.com]
> Sent: 17 December 2009 18:20
 
> Still, the exclusive operations for some systems don't extend beyond an
> ARM smp-cluster. Not all cores and interconnect implementations support
> the range lock.  As such from a SOC point of view SWP still has value
> as it may exist where lwrex/swrex would fail. It is also much lighter
> than using some kind of mailbox alternative.
>
> While the ARM is important to many SOCs its not the whole thing. I've
> seen some side threads where people are busy blindly removing SWP and
> quoting half information.

There is nothing half about SWP/SWPB being deprecated from ARMv6 onwards.
Also, not all systems properly implement the bus locking support required
for SWP to be properly atomic externally.

> My main comment on patch in this regard is to make the point you won't
> be able to fully emulate a SWP with the sequence you posted if you
> consider other cores outside the ARM cluster. Some note to that effect
> would be positive in the description.

I would argue that this is not a property of the patch, but rather the
architectural deprecation of the instruction(s).

However, I take your point. What if I add a comment that this emulation
will not work on uncached memory regions where no global exclusive
monitor is implemented?

Regards
	/
		Leif





More information about the linux-arm-kernel mailing list