|
@@ -230,11 +230,11 @@ test_and_set_bit_lock(long nr, volatile unsigned long *addr)
|
|
*/
|
|
*/
|
|
static __always_inline int __test_and_set_bit(long nr, volatile unsigned long *addr)
|
|
static __always_inline int __test_and_set_bit(long nr, volatile unsigned long *addr)
|
|
{
|
|
{
|
|
- int oldbit;
|
|
|
|
|
|
+ unsigned char oldbit;
|
|
|
|
|
|
asm("bts %2,%1\n\t"
|
|
asm("bts %2,%1\n\t"
|
|
- "sbb %0,%0"
|
|
|
|
- : "=r" (oldbit), ADDR
|
|
|
|
|
|
+ "setc %0"
|
|
|
|
+ : "=qm" (oldbit), ADDR
|
|
: "Ir" (nr));
|
|
: "Ir" (nr));
|
|
return oldbit;
|
|
return oldbit;
|
|
}
|
|
}
|
|
@@ -270,11 +270,11 @@ static __always_inline int test_and_clear_bit(long nr, volatile unsigned long *a
|
|
*/
|
|
*/
|
|
static __always_inline int __test_and_clear_bit(long nr, volatile unsigned long *addr)
|
|
static __always_inline int __test_and_clear_bit(long nr, volatile unsigned long *addr)
|
|
{
|
|
{
|
|
- int oldbit;
|
|
|
|
|
|
+ unsigned char oldbit;
|
|
|
|
|
|
asm volatile("btr %2,%1\n\t"
|
|
asm volatile("btr %2,%1\n\t"
|
|
- "sbb %0,%0"
|
|
|
|
- : "=r" (oldbit), ADDR
|
|
|
|
|
|
+ "setc %0"
|
|
|
|
+ : "=qm" (oldbit), ADDR
|
|
: "Ir" (nr));
|
|
: "Ir" (nr));
|
|
return oldbit;
|
|
return oldbit;
|
|
}
|
|
}
|
|
@@ -282,11 +282,11 @@ static __always_inline int __test_and_clear_bit(long nr, volatile unsigned long
|
|
/* WARNING: non atomic and it can be reordered! */
|
|
/* WARNING: non atomic and it can be reordered! */
|
|
static __always_inline int __test_and_change_bit(long nr, volatile unsigned long *addr)
|
|
static __always_inline int __test_and_change_bit(long nr, volatile unsigned long *addr)
|
|
{
|
|
{
|
|
- int oldbit;
|
|
|
|
|
|
+ unsigned char oldbit;
|
|
|
|
|
|
asm volatile("btc %2,%1\n\t"
|
|
asm volatile("btc %2,%1\n\t"
|
|
- "sbb %0,%0"
|
|
|
|
- : "=r" (oldbit), ADDR
|
|
|
|
|
|
+ "setc %0"
|
|
|
|
+ : "=qm" (oldbit), ADDR
|
|
: "Ir" (nr) : "memory");
|
|
: "Ir" (nr) : "memory");
|
|
|
|
|
|
return oldbit;
|
|
return oldbit;
|
|
@@ -313,11 +313,11 @@ static __always_inline int constant_test_bit(long nr, const volatile unsigned lo
|
|
|
|
|
|
static __always_inline int variable_test_bit(long nr, volatile const unsigned long *addr)
|
|
static __always_inline int variable_test_bit(long nr, volatile const unsigned long *addr)
|
|
{
|
|
{
|
|
- int oldbit;
|
|
|
|
|
|
+ unsigned char oldbit;
|
|
|
|
|
|
asm volatile("bt %2,%1\n\t"
|
|
asm volatile("bt %2,%1\n\t"
|
|
- "sbb %0,%0"
|
|
|
|
- : "=r" (oldbit)
|
|
|
|
|
|
+ "setc %0"
|
|
|
|
+ : "=qm" (oldbit)
|
|
: "m" (*(unsigned long *)addr), "Ir" (nr));
|
|
: "m" (*(unsigned long *)addr), "Ir" (nr));
|
|
|
|
|
|
return oldbit;
|
|
return oldbit;
|