Lines Matching full:nr

48 #define CONST_MASK_ADDR(nr, addr)	WBYTE_ADDR((void *)(addr) + ((nr)>>3))  argument
49 #define CONST_MASK(nr) (1 << ((nr) & 7)) argument
52 arch_set_bit(long nr, volatile unsigned long *addr) in arch_set_bit() argument
54 if (__builtin_constant_p(nr)) { in arch_set_bit()
56 : CONST_MASK_ADDR(nr, addr) in arch_set_bit()
57 : "iq" (CONST_MASK(nr)) in arch_set_bit()
61 : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); in arch_set_bit()
66 arch___set_bit(unsigned long nr, volatile unsigned long *addr) in arch___set_bit() argument
68 asm volatile(__ASM_SIZE(bts) " %1,%0" : : ADDR, "Ir" (nr) : "memory"); in arch___set_bit()
72 arch_clear_bit(long nr, volatile unsigned long *addr) in arch_clear_bit() argument
74 if (__builtin_constant_p(nr)) { in arch_clear_bit()
76 : CONST_MASK_ADDR(nr, addr) in arch_clear_bit()
77 : "iq" (~CONST_MASK(nr))); in arch_clear_bit()
80 : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); in arch_clear_bit()
85 arch_clear_bit_unlock(long nr, volatile unsigned long *addr) in arch_clear_bit_unlock() argument
88 arch_clear_bit(nr, addr); in arch_clear_bit_unlock()
92 arch___clear_bit(unsigned long nr, volatile unsigned long *addr) in arch___clear_bit() argument
94 asm volatile(__ASM_SIZE(btr) " %1,%0" : : ADDR, "Ir" (nr) : "memory"); in arch___clear_bit()
110 arch___clear_bit_unlock(long nr, volatile unsigned long *addr) in arch___clear_bit_unlock() argument
112 arch___clear_bit(nr, addr); in arch___clear_bit_unlock()
116 arch___change_bit(unsigned long nr, volatile unsigned long *addr) in arch___change_bit() argument
118 asm volatile(__ASM_SIZE(btc) " %1,%0" : : ADDR, "Ir" (nr) : "memory"); in arch___change_bit()
122 arch_change_bit(long nr, volatile unsigned long *addr) in arch_change_bit() argument
124 if (__builtin_constant_p(nr)) { in arch_change_bit()
126 : CONST_MASK_ADDR(nr, addr) in arch_change_bit()
127 : "iq" (CONST_MASK(nr))); in arch_change_bit()
130 : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); in arch_change_bit()
135 arch_test_and_set_bit(long nr, volatile unsigned long *addr) in arch_test_and_set_bit() argument
137 return GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(bts), *addr, c, "Ir", nr); in arch_test_and_set_bit()
141 arch_test_and_set_bit_lock(long nr, volatile unsigned long *addr) in arch_test_and_set_bit_lock() argument
143 return arch_test_and_set_bit(nr, addr); in arch_test_and_set_bit_lock()
147 arch___test_and_set_bit(unsigned long nr, volatile unsigned long *addr) in arch___test_and_set_bit() argument
154 : ADDR, "Ir" (nr) : "memory"); in arch___test_and_set_bit()
159 arch_test_and_clear_bit(long nr, volatile unsigned long *addr) in arch_test_and_clear_bit() argument
161 return GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(btr), *addr, c, "Ir", nr); in arch_test_and_clear_bit()
173 arch___test_and_clear_bit(unsigned long nr, volatile unsigned long *addr) in arch___test_and_clear_bit() argument
180 : ADDR, "Ir" (nr) : "memory"); in arch___test_and_clear_bit()
185 arch___test_and_change_bit(unsigned long nr, volatile unsigned long *addr) in arch___test_and_change_bit() argument
192 : ADDR, "Ir" (nr) : "memory"); in arch___test_and_change_bit()
198 arch_test_and_change_bit(long nr, volatile unsigned long *addr) in arch_test_and_change_bit() argument
200 return GEN_BINARY_RMWcc(LOCK_PREFIX __ASM_SIZE(btc), *addr, c, "Ir", nr); in arch_test_and_change_bit()
203 static __always_inline bool constant_test_bit(long nr, const volatile unsigned long *addr) in constant_test_bit() argument
205 return ((1UL << (nr & (BITS_PER_LONG-1))) & in constant_test_bit()
206 (addr[nr >> _BITOPS_LONG_SHIFT])) != 0; in constant_test_bit()
209 static __always_inline bool constant_test_bit_acquire(long nr, const volatile unsigned long *addr) in constant_test_bit_acquire() argument
216 : "m" (((unsigned char *)addr)[nr >> 3]), in constant_test_bit_acquire()
217 "i" (1 << (nr & 7)) in constant_test_bit_acquire()
223 static __always_inline bool variable_test_bit(long nr, volatile const unsigned long *addr) in variable_test_bit() argument
230 : "m" (*(unsigned long *)addr), "Ir" (nr) : "memory"); in variable_test_bit()
236 arch_test_bit(unsigned long nr, const volatile unsigned long *addr) in arch_test_bit() argument
238 return __builtin_constant_p(nr) ? constant_test_bit(nr, addr) : in arch_test_bit()
239 variable_test_bit(nr, addr); in arch_test_bit()
243 arch_test_bit_acquire(unsigned long nr, const volatile unsigned long *addr) in arch_test_bit_acquire() argument
245 return __builtin_constant_p(nr) ? constant_test_bit_acquire(nr, addr) : in arch_test_bit_acquire()
246 variable_test_bit(nr, addr); in arch_test_bit_acquire()