• Home
  • Raw
  • Download

Lines Matching refs:nr

40 #define IS_IMMEDIATE(nr)		(__builtin_constant_p(nr))  argument
41 #define CONST_MASK_ADDR(nr, addr) BITOP_ADDR((void *)(addr) + ((nr)>>3)) argument
42 #define CONST_MASK(nr) (1 << ((nr) & 7)) argument
60 set_bit(unsigned int nr, volatile unsigned long *addr) in set_bit() argument
62 if (IS_IMMEDIATE(nr)) { in set_bit()
64 : CONST_MASK_ADDR(nr, addr) in set_bit()
65 : "iq" ((u8)CONST_MASK(nr)) in set_bit()
69 : BITOP_ADDR(addr) : "Ir" (nr) : "memory"); in set_bit()
82 static inline void __set_bit(int nr, volatile unsigned long *addr) in __set_bit() argument
84 asm volatile("bts %1,%0" : ADDR : "Ir" (nr) : "memory"); in __set_bit()
98 clear_bit(int nr, volatile unsigned long *addr) in clear_bit() argument
100 if (IS_IMMEDIATE(nr)) { in clear_bit()
102 : CONST_MASK_ADDR(nr, addr) in clear_bit()
103 : "iq" ((u8)~CONST_MASK(nr))); in clear_bit()
107 : "Ir" (nr)); in clear_bit()
119 static inline void clear_bit_unlock(unsigned nr, volatile unsigned long *addr) in clear_bit_unlock() argument
122 clear_bit(nr, addr); in clear_bit_unlock()
125 static inline void __clear_bit(int nr, volatile unsigned long *addr) in __clear_bit() argument
127 asm volatile("btr %1,%0" : ADDR : "Ir" (nr)); in __clear_bit()
142 static inline void __clear_bit_unlock(unsigned nr, volatile unsigned long *addr) in __clear_bit_unlock() argument
145 __clear_bit(nr, addr); in __clear_bit_unlock()
160 static inline void __change_bit(int nr, volatile unsigned long *addr) in __change_bit() argument
162 asm volatile("btc %1,%0" : ADDR : "Ir" (nr)); in __change_bit()
174 static inline void change_bit(int nr, volatile unsigned long *addr) in change_bit() argument
176 if (IS_IMMEDIATE(nr)) { in change_bit()
178 : CONST_MASK_ADDR(nr, addr) in change_bit()
179 : "iq" ((u8)CONST_MASK(nr))); in change_bit()
183 : "Ir" (nr)); in change_bit()
195 static inline int test_and_set_bit(int nr, volatile unsigned long *addr) in test_and_set_bit() argument
200 "sbb %0,%0" : "=r" (oldbit), ADDR : "Ir" (nr) : "memory"); in test_and_set_bit()
213 test_and_set_bit_lock(int nr, volatile unsigned long *addr) in test_and_set_bit_lock() argument
215 return test_and_set_bit(nr, addr); in test_and_set_bit_lock()
227 static inline int __test_and_set_bit(int nr, volatile unsigned long *addr) in __test_and_set_bit() argument
234 : "Ir" (nr)); in __test_and_set_bit()
246 static inline int test_and_clear_bit(int nr, volatile unsigned long *addr) in test_and_clear_bit() argument
252 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory"); in test_and_clear_bit()
266 static inline int __test_and_clear_bit(int nr, volatile unsigned long *addr) in __test_and_clear_bit() argument
273 : "Ir" (nr)); in __test_and_clear_bit()
278 static inline int __test_and_change_bit(int nr, volatile unsigned long *addr) in __test_and_change_bit() argument
285 : "Ir" (nr) : "memory"); in __test_and_change_bit()
298 static inline int test_and_change_bit(int nr, volatile unsigned long *addr) in test_and_change_bit() argument
304 : "=r" (oldbit), ADDR : "Ir" (nr) : "memory"); in test_and_change_bit()
309 static __always_inline int constant_test_bit(unsigned int nr, const volatile unsigned long *addr) in constant_test_bit() argument
311 return ((1UL << (nr % BITS_PER_LONG)) & in constant_test_bit()
312 (addr[nr / BITS_PER_LONG])) != 0; in constant_test_bit()
315 static inline int variable_test_bit(int nr, volatile const unsigned long *addr) in variable_test_bit() argument
322 : "m" (*(unsigned long *)addr), "Ir" (nr)); in variable_test_bit()
333 static int test_bit(int nr, const volatile unsigned long *addr);
336 #define test_bit(nr, addr) \ argument
337 (__builtin_constant_p((nr)) \
338 ? constant_test_bit((nr), (addr)) \
339 : variable_test_bit((nr), (addr)))