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