Lines Matching refs:nbits

78 		  unsigned int nbits)  in __check_eq_bitmap()  argument
80 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
83 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
92 const unsigned long *bitmap, unsigned int nbits) in __check_eq_pbl() argument
94 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap); in __check_eq_pbl()
337 unsigned int nbits = 64; in test_replace() local
338 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); in test_replace()
341 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); in test_replace()
344 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
345 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
348 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
349 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
352 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
353 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
356 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
357 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
367 const int nbits; member
467 err = bitmap_parselist(ptest.in, bmap, ptest.nbits); in test_bitmap_parselist()
478 && !__bitmap_equal(bmap, ptest.expected, ptest.nbits)) { in test_bitmap_parselist()
584 err = bitmap_parse(test.in, len, bmap, test.nbits); in test_bitmap_parse()
595 && !__bitmap_equal(bmap, test.expected, test.nbits)) { in test_bitmap_parse()
611 unsigned int nbits, next_bit; in test_bitmap_arr32() local
617 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) { in test_bitmap_arr32()
618 bitmap_to_arr32(arr, exp1, nbits); in test_bitmap_arr32()
619 bitmap_from_arr32(bmap2, arr, nbits); in test_bitmap_arr32()
620 expect_eq_bitmap(bmap2, exp1, nbits); in test_bitmap_arr32()
623 round_up(nbits, BITS_PER_LONG), nbits); in test_bitmap_arr32()
624 if (next_bit < round_up(nbits, BITS_PER_LONG)) { in test_bitmap_arr32()
627 nbits, next_bit); in test_bitmap_arr32()
631 if (nbits < EXP1_IN_BITS - 32) in test_bitmap_arr32()
632 expect_eq_uint(arr[DIV_ROUND_UP(nbits, 32)], in test_bitmap_arr32()
639 unsigned int nbits, next_bit; in test_bitmap_arr64() local
645 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) { in test_bitmap_arr64()
647 bitmap_to_arr64(arr, exp1, nbits); in test_bitmap_arr64()
648 bitmap_from_arr64(bmap2, arr, nbits); in test_bitmap_arr64()
649 expect_eq_bitmap(bmap2, exp1, nbits); in test_bitmap_arr64()
651 next_bit = find_next_bit(bmap2, round_up(nbits, BITS_PER_LONG), nbits); in test_bitmap_arr64()
652 if (next_bit < round_up(nbits, BITS_PER_LONG)) { in test_bitmap_arr64()
654 " tail is not safely cleared: %d\n", nbits, next_bit); in test_bitmap_arr64()
658 if ((nbits % 64) && in test_bitmap_arr64()
659 (arr[(nbits - 1) / 64] & ~GENMASK_ULL((nbits - 1) % 64, 0))) { in test_bitmap_arr64()
661 nbits, arr[(nbits - 1) / 64], in test_bitmap_arr64()
662 GENMASK_ULL((nbits - 1) % 64, 0)); in test_bitmap_arr64()
666 if (nbits < EXP1_IN_BITS - 64) in test_bitmap_arr64()
667 expect_eq_uint(arr[DIV_ROUND_UP(nbits, 64)], 0xa5a5a5a5); in test_bitmap_arr64()
675 unsigned int start, nbits; in test_mem_optimisations() local
678 for (nbits = 0; nbits < 1024 - start; nbits += 8) { in test_mem_optimisations()
682 bitmap_set(bmap1, start, nbits); in test_mem_optimisations()
683 __bitmap_set(bmap2, start, nbits); in test_mem_optimisations()
685 printk("set not equal %d %d\n", start, nbits); in test_mem_optimisations()
689 printk("set not __equal %d %d\n", start, nbits); in test_mem_optimisations()
693 bitmap_clear(bmap1, start, nbits); in test_mem_optimisations()
694 __bitmap_clear(bmap2, start, nbits); in test_mem_optimisations()
696 printk("clear not equal %d %d\n", start, nbits); in test_mem_optimisations()
701 nbits); in test_mem_optimisations()
977 unsigned int nbits; member
1025 bitmap_cut(out, in, t->first, t->cut, t->nbits); in test_bitmap_cut()
1027 expect_eq_bitmap(t->expected, out, t->nbits); in test_bitmap_cut()
1033 unsigned long nbits; member
1144 n = bitmap_print_bitmask_to_buf(print_buf, t->bitmap, t->nbits, in test_bitmap_print_buf()
1149 n = bitmap_print_list_to_buf(print_buf, t->bitmap, t->nbits, in test_bitmap_print_buf()
1156 n = bitmap_print_list_to_buf(print_buf, t->bitmap, t->nbits, in test_bitmap_print_buf()