Lines Matching +full:even +full:- +full:numbered

1 /* SPDX-License-Identifier: GPL-2.0 */
9 * Within a word, bits are numbered LSB first. Lot's of places make
12 * big-endian system because, unlike little endian, the number of each
16 * end up numbered:
20 * The bits are numbered:
23 * The main difference is that bit 0-63 in the bit number field needs to be
42 #define __BITOPS_WORDS(bits) (((bits) + BITS_PER_LONG - 1) / BITS_PER_LONG)
49 addr = (unsigned long)ptr + ((nr ^ (nr & (BITS_PER_LONG - 1))) >> 3); in __bitops_word()
55 return 1UL << (nr & (BITS_PER_LONG - 1)); in __bitops_mask()
204 #include <asm-generic/bitops/instrumented-atomic.h>
205 #include <asm-generic/bitops/instrumented-non-atomic.h>
206 #include <asm-generic/bitops/instrumented-lock.h>
210 * The bits are numbered:
224 return set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in set_bit_inv()
229 return clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in clear_bit_inv()
235 return test_and_clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_and_clear_bit_inv()
240 return __set_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __set_bit_inv()
245 return __clear_bit(nr ^ (BITS_PER_LONG - 1), ptr); in __clear_bit_inv()
251 return test_bit(nr ^ (BITS_PER_LONG - 1), ptr); in test_bit_inv()
255 * __flogr - find leftmost one
256 * @word - The word to search
297 rp.even = word; in __flogr()
301 return rp.even; in __flogr()
306 * __ffs - find first bit in word.
313 return __flogr(-word & word) ^ (BITS_PER_LONG - 1); in __ffs()
317 * ffs - find first bit set
325 unsigned long mask = 2 * BITS_PER_LONG - 1; in ffs()
328 return (1 + (__flogr(-val & val) ^ (BITS_PER_LONG - 1))) & mask; in ffs()
332 * __fls - find last (most-significant) set bit in a long word
339 return __flogr(word) ^ (BITS_PER_LONG - 1); in __fls()
343 * fls64 - find last set bit in a 64-bit word
355 unsigned long mask = 2 * BITS_PER_LONG - 1; in fls64()
357 return (1 + (__flogr(word) ^ (BITS_PER_LONG - 1))) & mask; in fls64()
361 * fls - find last (most-significant) bit set
372 #include <asm-generic/bitops/ffz.h>
373 #include <asm-generic/bitops/hweight.h>
374 #include <asm-generic/bitops/sched.h>
375 #include <asm-generic/bitops/le.h>
376 #include <asm-generic/bitops/ext2-atomic-setbit.h>