xen/arm64: resync atomics and spinlock asm with Linux
authorIan Campbell <ian.campbell@citrix.com>
Fri, 19 Jul 2013 15:20:09 +0000 (16:20 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 22 Aug 2013 14:48:00 +0000 (15:48 +0100)
commitc85c3e3cb9c0540cb604c379298bfd885ade1592
tree91e9299160b496f4d869ba41f87be2a330c0e793
parent79474832b5e068aa4d131f8e586b0fa674a7ee3e
xen/arm64: resync atomics and spinlock asm with Linux

This picks up the changes from Linux commit 3a0310eb369a:
    arm64: atomics: fix grossly inconsistent asm constraints for exclusives

    Our uses of inline asm constraints for atomic operations are fairly
    wild and varied. We basically need to guarantee the following:

      1. Any instructions with barrier implications
         (load-acquire/store-release) have a "memory" clobber

      2. When performing exclusive accesses, the addresing mode is generated
         using the "Q" constraint

      3. Atomic blocks which use the condition flags, have a "cc" clobber

    This patch addresses these concerns which, as well as fixing the
    semantics of the code, stops GCC complaining about impossible asm
    constraints.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Tim Deegan <tim@xen.org>
xen/include/asm-arm/arm64/atomic.h
xen/include/asm-arm/arm64/spinlock.h
xen/include/asm-arm/arm64/system.h