locking/atomic/x86: Correct the definition of __arch_try_cmpxchg128()
authorUros Bizjak <ubizjak@gmail.com>
Mon, 8 Apr 2024 09:13:56 +0000 (11:13 +0200)
committerIngo Molnar <mingo@kernel.org>
Tue, 9 Apr 2024 07:51:02 +0000 (09:51 +0200)
Correct the definition of __arch_try_cmpxchg128(), introduced by:

  b23e139d0b66 ("arch: Introduce arch_{,try_}_cmpxchg128{,_local}()")

Fixes: b23e139d0b66 ("arch: Introduce arch_{,try_}_cmpxchg128{,_local}()")
Signed-off-by: Uros Bizjak <ubizjak@gmail.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Link: https://lore.kernel.org/r/20240408091547.90111-2-ubizjak@gmail.com
arch/x86/include/asm/cmpxchg_64.h

index 44b08b53ab32fc358cb314ea1c89ac3ded8d815b..c1d6cd58f80940347141cdf0ecdb5953c3e899d3 100644 (file)
@@ -62,7 +62,7 @@ static __always_inline u128 arch_cmpxchg128_local(volatile u128 *ptr, u128 old,
        asm volatile(_lock "cmpxchg16b %[ptr]"                          \
                     CC_SET(e)                                          \
                     : CC_OUT(e) (ret),                                 \
-                      [ptr] "+m" (*ptr),                               \
+                      [ptr] "+m" (*(_ptr)),                            \
                       "+a" (o.low), "+d" (o.high)                      \
                     : "b" (n.low), "c" (n.high)                        \
                     : "memory");                                       \