Skip to content

Commit 02aff3a

Browse files
heicarstMartin Schwidefsky
authored andcommitted
s390/bitops: fix inline assembly constraints
Fix inline assembly contraints for non atomic bitops functions. This is broken since 2.6.34 987bcda "[S390] use inline assembly contraints available with gcc 3.3.3". Reported-by: Andreas Krebbel <krebbel@linux.vnet.ibm.com> Reported-by: Peter Oberparleiter <peter.oberparleiter@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
1 parent 558b9ef commit 02aff3a

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎arch/s390/include/asm/bitops.h‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ static inline void __set_bit(unsigned long nr, volatile unsigned long *ptr)
216216
addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
217217
asm volatile(
218218
" oc %O0(1,%R0),%1"
219-
: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc" );
219+
: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc");
220220
}
221221

222222
static inline void
@@ -244,7 +244,7 @@ __clear_bit(unsigned long nr, volatile unsigned long *ptr)
244244
addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
245245
asm volatile(
246246
" nc %O0(1,%R0),%1"
247-
: "=Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7]) : "cc" );
247+
: "+Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7]) : "cc");
248248
}
249249

250250
static inline void
@@ -271,7 +271,7 @@ static inline void __change_bit(unsigned long nr, volatile unsigned long *ptr)
271271
addr = (unsigned long) ptr + ((nr ^ (BITS_PER_LONG - 8)) >> 3);
272272
asm volatile(
273273
" xc %O0(1,%R0),%1"
274-
: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc" );
274+
: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7]) : "cc");
275275
}
276276

277277
static inline void
@@ -301,7 +301,7 @@ test_and_set_bit_simple(unsigned long nr, volatile unsigned long *ptr)
301301
ch = *(unsigned char *) addr;
302302
asm volatile(
303303
" oc %O0(1,%R0),%1"
304-
: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7])
304+
: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7])
305305
: "cc", "memory");
306306
return (ch >> (nr & 7)) & 1;
307307
}
@@ -320,7 +320,7 @@ test_and_clear_bit_simple(unsigned long nr, volatile unsigned long *ptr)
320320
ch = *(unsigned char *) addr;
321321
asm volatile(
322322
" nc %O0(1,%R0),%1"
323-
: "=Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7])
323+
: "+Q" (*(char *) addr) : "Q" (_ni_bitmap[nr & 7])
324324
: "cc", "memory");
325325
return (ch >> (nr & 7)) & 1;
326326
}
@@ -339,7 +339,7 @@ test_and_change_bit_simple(unsigned long nr, volatile unsigned long *ptr)
339339
ch = *(unsigned char *) addr;
340340
asm volatile(
341341
" xc %O0(1,%R0),%1"
342-
: "=Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7])
342+
: "+Q" (*(char *) addr) : "Q" (_oi_bitmap[nr & 7])
343343
: "cc", "memory");
344344
return (ch >> (nr & 7)) & 1;
345345
}

0 commit comments

Comments
 (0)