arm64: make ll/sc __cmpxchg_case_##name asm consistent
authorMark Rutland <mark.rutland@arm.com>
Tue, 4 Aug 2015 16:27:34 +0000 (17:27 +0100)
committerWill Deacon <will.deacon@arm.com>
Tue, 4 Aug 2015 17:51:04 +0000 (18:51 +0100)
The ll/sc __cmpxchg_case_##name assembly mostly uses symbolic names for
operands, but in a single case uses %2 to refer to what is otherwise
known as %[v]. This makes the code more painful to read than is
necessary.

Use %[v] instead.

Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/include/asm/atomic_ll_sc.h

index 6671978e60fe591ae28a1f7e081d984a025ecddb..b3b5c4ae3800b061d5ad2fdd911aea677feedc32 100644 (file)
@@ -181,7 +181,7 @@ __LL_SC_PREFIX(__cmpxchg_case_##name(volatile void *ptr,            \
        unsigned long tmp, oldval;                                      \
                                                                        \
        asm volatile(                                                   \
-       "       prfm    pstl1strm, %2\n"                                \
+       "       prfm    pstl1strm, %[v]\n"                              \
        "1:     ldxr" #sz "\t%" #w "[oldval], %[v]\n"                   \
        "       eor     %" #w "[tmp], %" #w "[oldval], %" #w "[old]\n"  \
        "       cbnz    %" #w "[tmp], 2f\n"                             \