Lines Matching refs:nbits
14 #define BITMAP_LAST_WORD_MASK(nbits) \ argument
16 ((nbits) % BITS_PER_LONG) ? \
17 (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \
20 #define small_const_nbits(nbits) \ argument
21 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
23 static inline void bitmap_zero(unsigned long *dst, int nbits) in bitmap_zero() argument
25 if (small_const_nbits(nbits)) in bitmap_zero()
28 int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); in bitmap_zero()
33 static inline int bitmap_weight(const unsigned long *src, int nbits) in bitmap_weight() argument
35 if (small_const_nbits(nbits)) in bitmap_weight()
36 return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_weight()
37 return __bitmap_weight(src, nbits); in bitmap_weight()
41 const unsigned long *src2, int nbits) in bitmap_or() argument
43 if (small_const_nbits(nbits)) in bitmap_or()
46 __bitmap_or(dst, src1, src2, nbits); in bitmap_or()