s390/cmpxchg: add missing memory barrier to cmpxchg64
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Tue, 29 May 2012 04:54:32 +0000 (06:54 +0200)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Wed, 30 May 2012 07:07:55 +0000 (09:07 +0200)
All cmpxchg functions imply a memory barrier.
cmpxch64 did not have one for 31 bit code, so add it.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/cmpxchg.h

index 81d7908416cf769202a40541d6a1779560712df5..ebd31481f1d2abbeb7aa932d7e930adfb553b93a 100644 (file)
@@ -181,7 +181,7 @@ static inline unsigned long long __cmpxchg64(void *ptr,
                "       cds     %0,%2,%1"
                : "+&d" (rp_old), "=Q" (ptr)
                : "d" (rp_new), "Q" (ptr)
-               : "cc");
+               : "memory", "cc");
        return rp_old.pair;
 }
 #define cmpxchg64(ptr, o, n)                                           \