Lines Matching refs:nbits

74 		  unsigned int nbits)
76 if (!bitmap_equal(exp_bmap, bmap, nbits)) {
79 nbits, exp_bmap, nbits, bmap);
88 const unsigned long *bitmap, unsigned int nbits)
90 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap);
277 unsigned int nbits = 64;
278 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG);
281 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2);
284 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);
285 expect_eq_bitmap(bmap, exp3_0_1, nbits);
288 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);
289 expect_eq_bitmap(bmap, exp3_1_0, nbits);
292 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits);
293 expect_eq_bitmap(bmap, exp3_0_1, nbits);
296 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits);
297 expect_eq_bitmap(bmap, exp3_1_0, nbits);
307 const int nbits;
368 err = bitmap_parselist(ptest.in, bmap, ptest.nbits);
378 && !__bitmap_equal(bmap, ptest.expected, ptest.nbits)) {
445 err = bitmap_parse(test.in, len, bmap, test.nbits);
455 && !__bitmap_equal(bmap, test.expected, test.nbits)) {
472 unsigned int nbits, next_bit;
478 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) {
479 bitmap_to_arr32(arr, exp1, nbits);
480 bitmap_from_arr32(bmap2, arr, nbits);
481 expect_eq_bitmap(bmap2, exp1, nbits);
484 round_up(nbits, BITS_PER_LONG), nbits);
485 if (next_bit < round_up(nbits, BITS_PER_LONG))
486 pr_err("bitmap_copy_arr32(nbits == %d:"
488 nbits, next_bit);
490 if (nbits < EXP1_IN_BITS - 32)
491 expect_eq_uint(arr[DIV_ROUND_UP(nbits, 32)],
500 unsigned int start, nbits;
503 for (nbits = 0; nbits < 1024 - start; nbits += 8) {
507 bitmap_set(bmap1, start, nbits);
508 __bitmap_set(bmap2, start, nbits);
510 printk("set not equal %d %d\n", start, nbits);
514 printk("set not __equal %d %d\n", start, nbits);
518 bitmap_clear(bmap1, start, nbits);
519 __bitmap_clear(bmap2, start, nbits);
521 printk("clear not equal %d %d\n", start, nbits);
526 nbits);
569 unsigned int nbits;
617 bitmap_cut(out, in, t->first, t->cut, t->nbits);
619 expect_eq_bitmap(t->expected, out, t->nbits);