aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/include/asm/cmpxchg.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/arch/s390/include/asm/cmpxchg.h b/arch/s390/include/asm/cmpxchg.h
index 26f2cb1aa9ff..8d798e962b63 100644
--- a/arch/s390/include/asm/cmpxchg.h
+++ b/arch/s390/include/asm/cmpxchg.h
@@ -29,7 +29,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
29 " cs %0,0,%4\n" 29 " cs %0,0,%4\n"
30 " jl 0b\n" 30 " jl 0b\n"
31 : "=&d" (old), "=Q" (*(int *) addr) 31 : "=&d" (old), "=Q" (*(int *) addr)
32 : "d" (x << shift), "d" (~(255 << shift)), 32 : "d" ((x & 0xff) << shift), "d" (~(0xff << shift)),
33 "Q" (*(int *) addr) : "memory", "cc", "0"); 33 "Q" (*(int *) addr) : "memory", "cc", "0");
34 return old >> shift; 34 return old >> shift;
35 case 2: 35 case 2:
@@ -44,7 +44,7 @@ static inline unsigned long __xchg(unsigned long x, void *ptr, int size)
44 " cs %0,0,%4\n" 44 " cs %0,0,%4\n"
45 " jl 0b\n" 45 " jl 0b\n"
46 : "=&d" (old), "=Q" (*(int *) addr) 46 : "=&d" (old), "=Q" (*(int *) addr)
47 : "d" (x << shift), "d" (~(65535 << shift)), 47 : "d" ((x & 0xffff) << shift), "d" (~(0xffff << shift)),
48 "Q" (*(int *) addr) : "memory", "cc", "0"); 48 "Q" (*(int *) addr) : "memory", "cc", "0");
49 return old >> shift; 49 return old >> shift;
50 case 4: 50 case 4:
@@ -114,8 +114,9 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
114 " jnz 0b\n" 114 " jnz 0b\n"
115 "1:" 115 "1:"
116 : "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr) 116 : "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr)
117 : "d" (old << shift), "d" (new << shift), 117 : "d" ((old & 0xff) << shift),
118 "d" (~(255 << shift)) 118 "d" ((new & 0xff) << shift),
119 "d" (~(0xff << shift))
119 : "memory", "cc"); 120 : "memory", "cc");
120 return prev >> shift; 121 return prev >> shift;
121 case 2: 122 case 2:
@@ -135,8 +136,9 @@ static inline unsigned long __cmpxchg(void *ptr, unsigned long old,
135 " jnz 0b\n" 136 " jnz 0b\n"
136 "1:" 137 "1:"
137 : "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr) 138 : "=&d" (prev), "=&d" (tmp), "+Q" (*(int *) addr)
138 : "d" (old << shift), "d" (new << shift), 139 : "d" ((old & 0xffff) << shift),
139 "d" (~(65535 << shift)) 140 "d" ((new & 0xffff) << shift),
141 "d" (~(0xffff << shift))
140 : "memory", "cc"); 142 : "memory", "cc");
141 return prev >> shift; 143 return prev >> shift;
142 case 4: 144 case 4: