• Home
  • Raw
  • Download

Lines Matching refs:nbits

86 			unsigned shift, unsigned nbits)  in __bitmap_shift_right()  argument
88 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right()
90 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in __bitmap_shift_right()
131 unsigned int shift, unsigned int nbits) in __bitmap_shift_left() argument
134 unsigned int lim = BITS_TO_LONGS(nbits); in __bitmap_shift_left()
364 int c, old_c, totaldigits, ndigits, nchunks, nbits; in __bitmap_parse() local
370 nchunks = nbits = totaldigits = c = 0; in __bitmap_parse()
422 nbits += (nchunks == 1) ? nbits_to_hold_value(chunk) : CHUNKSZ; in __bitmap_parse()
423 if (nbits > nmaskbits) in __bitmap_parse()
682 static int bitmap_pos_to_ord(const unsigned long *buf, unsigned int pos, unsigned int nbits) in bitmap_pos_to_ord() argument
684 if (pos >= nbits || !test_bit(pos, buf)) in bitmap_pos_to_ord()
708 unsigned int bitmap_ord_to_pos(const unsigned long *buf, unsigned int ord, unsigned int nbits) in bitmap_ord_to_pos() argument
712 for (pos = find_first_bit(buf, nbits); in bitmap_ord_to_pos()
713 pos < nbits && ord; in bitmap_ord_to_pos()
714 pos = find_next_bit(buf, nbits, pos + 1)) in bitmap_ord_to_pos()
754 unsigned int nbits) in bitmap_remap() argument
760 bitmap_zero(dst, nbits); in bitmap_remap()
762 w = bitmap_weight(new, nbits); in bitmap_remap()
763 for_each_set_bit(oldbit, src, nbits) { in bitmap_remap()
764 int n = bitmap_pos_to_ord(old, oldbit, nbits); in bitmap_remap()
769 set_bit(bitmap_ord_to_pos(new, n % w, nbits), dst); in bitmap_remap()
953 unsigned int sz, unsigned int nbits) in bitmap_fold() argument
959 bitmap_zero(dst, nbits); in bitmap_fold()
961 for_each_set_bit(oldbit, orig, nbits) in bitmap_fold()
1121 bitmap_from_u32array(unsigned long *bitmap, unsigned int nbits, in bitmap_from_u32array() argument
1126 for (src_idx = dst_idx = 0; dst_idx < BITS_TO_LONGS(nbits); ++dst_idx) { in bitmap_from_u32array()
1137 if (dst_idx < nbits/BITS_PER_LONG) in bitmap_from_u32array()
1140 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in bitmap_from_u32array()
1147 return min_t(unsigned int, nbits, 32*nwords); in bitmap_from_u32array()
1165 const unsigned long *bitmap, unsigned int nbits) in bitmap_to_u32array() argument
1172 if (src_idx < BITS_TO_LONGS(nbits)) { in bitmap_to_u32array()
1174 if (src_idx >= nbits/BITS_PER_LONG) in bitmap_to_u32array()
1175 part &= BITMAP_LAST_WORD_MASK(nbits); in bitmap_to_u32array()
1189 return min_t(unsigned int, nbits, 32*nwords); in bitmap_to_u32array()
1202 void bitmap_copy_le(unsigned long *dst, const unsigned long *src, unsigned int nbits) in bitmap_copy_le() argument
1206 for (i = 0; i < nbits/BITS_PER_LONG; i++) { in bitmap_copy_le()