Lines Matching +full:non +full:- +full:volatile
1 /* SPDX-License-Identifier: GPL-2.0-only */
19 #include <asm-generic/bitops/__ffs.h>
20 #include <asm-generic/bitops/__fls.h>
21 #include <asm-generic/bitops/ffs.h>
22 #include <asm-generic/bitops/fls.h>
30 #include <asm-generic/bitops/__ffs.h>
31 #include <asm-generic/bitops/__fls.h>
32 #include <asm-generic/bitops/ffs.h>
33 #include <asm-generic/bitops/fls.h>
35 #include <asm/alternative-macros.h>
54 asm volatile (".option push\n" in variable__ffs()
67 * __ffs - find first set bit in a long word
83 asm volatile (".option push\n" in variable__fls()
89 return BITS_PER_LONG - 1 - word; in variable__fls()
96 * __fls - find last set bit in a long word
103 (unsigned long)(BITS_PER_LONG - 1 - __builtin_clzl(word)) : \
115 asm volatile (".option push\n" in variable_ffs()
128 * ffs - find first set bit in a word
147 asm volatile (".option push\n" in variable_fls()
153 return 32 - x; in variable_fls()
160 * fls - find last set bit in a word
173 ((x_ != 0) ? (32 - __builtin_clz(x_)) : 0) \
180 #include <asm-generic/bitops/ffz.h>
181 #include <asm-generic/bitops/fls64.h>
182 #include <asm-generic/bitops/sched.h>
186 #include <asm-generic/bitops/const_hweight.h>
225 * arch_test_and_set_bit - Set a bit and return its old value
231 static inline int arch_test_and_set_bit(int nr, volatile unsigned long *addr) in arch_test_and_set_bit()
237 * arch_test_and_clear_bit - Clear a bit and return its old value
243 static inline int arch_test_and_clear_bit(int nr, volatile unsigned long *addr) in arch_test_and_clear_bit()
249 * arch_test_and_change_bit - Change a bit and return its old value
256 static inline int arch_test_and_change_bit(int nr, volatile unsigned long *addr) in arch_test_and_change_bit()
262 * arch_set_bit - Atomically set a bit in memory
267 * on non x86 architectures, so if you are writing portable code,
271 * restricted to acting on a single-word quantity.
273 static inline void arch_set_bit(int nr, volatile unsigned long *addr) in arch_set_bit()
279 * arch_clear_bit - Clears a bit in memory
284 * on non x86 architectures, so if you are writing portable code,
287 static inline void arch_clear_bit(int nr, volatile unsigned long *addr) in arch_clear_bit()
293 * arch_change_bit - Toggle a bit in memory
299 * restricted to acting on a single-word quantity.
301 static inline void arch_change_bit(int nr, volatile unsigned long *addr) in arch_change_bit()
307 * arch_test_and_set_bit_lock - Set a bit and return its old value, for lock
315 unsigned long nr, volatile unsigned long *addr) in arch_test_and_set_bit_lock()
321 * arch_clear_bit_unlock - Clear a bit in memory, for unlock
328 unsigned long nr, volatile unsigned long *addr) in arch_clear_bit_unlock()
334 * arch___clear_bit_unlock - Clear a bit in memory, for unlock
344 * On RISC-V systems there seems to be no benefit to taking advantage of the
345 * non-atomic property here: it's a lot more instructions and we still have to
349 unsigned long nr, volatile unsigned long *addr) in arch___clear_bit_unlock()
355 volatile unsigned long *addr) in arch_xor_unlock_is_negative_byte()
372 #include <asm-generic/bitops/instrumented-atomic.h>
373 #include <asm-generic/bitops/instrumented-lock.h>
375 #include <asm-generic/bitops/non-atomic.h>
376 #include <asm-generic/bitops/le.h>
377 #include <asm-generic/bitops/ext2-atomic.h>