[RFC PATCH] arm64: cmpxchg.h: Bring ldxr and stxr closer
Pranith Kumar
bobby.prani at gmail.com
Tue Mar 3 08:58:26 PST 2015
On Tue, Mar 3, 2015 at 9:34 AM, Catalin Marinas <catalin.marinas at arm.com> wrote:
>
> Do you mean the cmpxchg_double() change? Becuase %w0 and %0 is the same
> physical register. You set it to 0 and immediately override it with
> ldxp.
>
Thanks Catalin. I realized the blunder a while after Will pointed it
out. The asm here was a bit confusing. %0 usually refers to the first
input/output variable. But for ldxp instruction(which is just a
double-word load, not exclusive), it refers to the physical registers.
What about the changes in cmpxchg()? Why do we need to set %w0 to 0
after the ldxrh instruction? Also, could you please point me to any
arm64 asm reference?
Thanks!
--
Pranith
More information about the linux-arm-kernel
mailing list