| .. | .. |
|---|
| 11 | 11 | * See Documentation/atomic_bitops.txt for details. |
|---|
| 12 | 12 | */ |
|---|
| 13 | 13 | |
|---|
| 14 | | -static inline void set_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 14 | +static __always_inline void set_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 15 | 15 | { |
|---|
| 16 | 16 | p += BIT_WORD(nr); |
|---|
| 17 | 17 | atomic_long_or(BIT_MASK(nr), (atomic_long_t *)p); |
|---|
| 18 | 18 | } |
|---|
| 19 | 19 | |
|---|
| 20 | | -static inline void clear_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 20 | +static __always_inline void clear_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 21 | 21 | { |
|---|
| 22 | 22 | p += BIT_WORD(nr); |
|---|
| 23 | 23 | atomic_long_andnot(BIT_MASK(nr), (atomic_long_t *)p); |
|---|
| 24 | 24 | } |
|---|
| 25 | 25 | |
|---|
| 26 | | -static inline void change_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 26 | +static __always_inline void change_bit(unsigned int nr, volatile unsigned long *p) |
|---|
| 27 | 27 | { |
|---|
| 28 | 28 | p += BIT_WORD(nr); |
|---|
| 29 | 29 | atomic_long_xor(BIT_MASK(nr), (atomic_long_t *)p); |
|---|
| .. | .. |
|---|
| 35 | 35 | unsigned long mask = BIT_MASK(nr); |
|---|
| 36 | 36 | |
|---|
| 37 | 37 | p += BIT_WORD(nr); |
|---|
| 38 | | - if (READ_ONCE(*p) & mask) |
|---|
| 39 | | - return 1; |
|---|
| 40 | | - |
|---|
| 41 | 38 | old = atomic_long_fetch_or(mask, (atomic_long_t *)p); |
|---|
| 42 | 39 | return !!(old & mask); |
|---|
| 43 | 40 | } |
|---|
| .. | .. |
|---|
| 48 | 45 | unsigned long mask = BIT_MASK(nr); |
|---|
| 49 | 46 | |
|---|
| 50 | 47 | p += BIT_WORD(nr); |
|---|
| 51 | | - if (!(READ_ONCE(*p) & mask)) |
|---|
| 52 | | - return 0; |
|---|
| 53 | | - |
|---|
| 54 | 48 | old = atomic_long_fetch_andnot(mask, (atomic_long_t *)p); |
|---|
| 55 | 49 | return !!(old & mask); |
|---|
| 56 | 50 | } |
|---|