]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
s390/atomic_ops: Use symbolic names
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 1 Jul 2024 15:04:56 +0000 (17:04 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Wed, 10 Jul 2024 17:50:44 +0000 (19:50 +0200)
Consistently use symbolic names in all atomic ops inline assemblies.

Reviewed-by: Juergen Christ <jchrist@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/include/asm/atomic_ops.h

index 7fa5f96a553a4720c5f5d41119d10c7cc954ce9e..7f47e29278041fe871bb0fc9adc48c07a420726b 100644 (file)
@@ -13,16 +13,16 @@ static __always_inline int __atomic_read(const atomic_t *v)
        int c;
 
        asm volatile(
-               "       l       %0,%1\n"
-               : "=d" (c) : "R" (v->counter));
+               "       l       %[c],%[counter]\n"
+               : [c] "=d" (c) : [counter] "R" (v->counter));
        return c;
 }
 
 static __always_inline void __atomic_set(atomic_t *v, int i)
 {
        asm volatile(
-               "       st      %1,%0\n"
-               : "=R" (v->counter) : "d" (i));
+               "       st      %[i],%[counter]\n"
+               : [counter] "=R" (v->counter) : [i] "d" (i));
 }
 
 static __always_inline s64 __atomic64_read(const atomic64_t *v)
@@ -30,16 +30,16 @@ static __always_inline s64 __atomic64_read(const atomic64_t *v)
        s64 c;
 
        asm volatile(
-               "       lg      %0,%1\n"
-               : "=d" (c) : "RT" (v->counter));
+               "       lg      %[c],%[counter]\n"
+               : [c] "=d" (c) : [counter] "RT" (v->counter));
        return c;
 }
 
 static __always_inline void __atomic64_set(atomic64_t *v, s64 i)
 {
        asm volatile(
-               "       stg     %1,%0\n"
-               : "=RT" (v->counter) : "d" (i));
+               "       stg     %[i],%[counter]\n"
+               : [counter] "=RT" (v->counter) : [i] "d" (i));
 }
 
 #ifdef CONFIG_HAVE_MARCH_Z196_FEATURES