aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/cmpxchg.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index 0f636cbdf342..4236408070e5 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -185,11 +185,12 @@ static inline unsigned long long __cmpxchg64(void *ptr,
185{ 185{
186 register_pair rp_old = {.pair = old}; 186 register_pair rp_old = {.pair = old};
187 register_pair rp_new = {.pair = new}; 187 register_pair rp_new = {.pair = new};
188 unsigned long long *ullptr = ptr;
188 189
189 asm volatile( 190 asm volatile(
190 " cds %0,%2,%1" 191 " cds %0,%2,%1"
191 : "+&d" (rp_old), "=Q" (ptr) 192 : "+d" (rp_old), "+Q" (*ullptr)
192 : "d" (rp_new), "Q" (ptr) 193 : "d" (rp_new)
193 : "memory", "cc"); 194 : "memory", "cc");
194 return rp_old.pair; 195 return rp_old.pair;
195} 196}