Lines Matching refs:BITS_PER_LONG
17 #define BITMAP_FIRST_WORD_MASK(start) (~0UL << ((start) & (BITS_PER_LONG - 1)))
18 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
20 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
36 unsigned int k, lim = bits / BITS_PER_LONG; in __bitmap_weight()
42 if (bits % BITS_PER_LONG) in __bitmap_weight()
53 int bits_to_set = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_set()
59 bits_to_set = BITS_PER_LONG; in __bitmap_set()
74 int bits_to_clear = BITS_PER_LONG - (start % BITS_PER_LONG); in __bitmap_clear()
80 bits_to_clear = BITS_PER_LONG; in __bitmap_clear()
106 unsigned long result = offset & ~(BITS_PER_LONG - 1); in find_next_bit()
112 offset %= BITS_PER_LONG; in find_next_bit()
116 if (size < BITS_PER_LONG) in find_next_bit()
120 size -= BITS_PER_LONG; in find_next_bit()
121 result += BITS_PER_LONG; in find_next_bit()
123 while (size & ~(BITS_PER_LONG - 1)) { in find_next_bit()
127 result += BITS_PER_LONG; in find_next_bit()
128 size -= BITS_PER_LONG; in find_next_bit()
135 tmp &= (~0UL >> (BITS_PER_LONG - size)); in find_next_bit()
149 for (idx = 0; idx * BITS_PER_LONG < size; idx++) { in find_first_bit()
151 return min(idx * BITS_PER_LONG + __ffs(addr[idx]), size); in find_first_bit()