Lines Matching refs:nbits
73 unsigned int nbits) in __check_eq_bitmap() argument
75 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
78 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
87 const unsigned long *bitmap, unsigned int nbits) in __check_eq_pbl() argument
89 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap); in __check_eq_pbl()
276 unsigned int nbits = 64; in test_replace() local
277 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); in test_replace()
280 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); in test_replace()
283 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
284 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
287 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
288 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
291 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
292 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace()
295 bitmap_replace(bmap, &exp2[1 * nlongs], &exp2[0 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
296 expect_eq_bitmap(bmap, exp3_1_0, nbits); in test_replace()
306 const int nbits; member
367 err = bitmap_parselist(ptest.in, bmap, ptest.nbits); in test_bitmap_parselist()
377 && !__bitmap_equal(bmap, ptest.expected, ptest.nbits)) { in test_bitmap_parselist()
444 err = bitmap_parse(test.in, len, bmap, test.nbits); in test_bitmap_parse()
454 && !__bitmap_equal(bmap, test.expected, test.nbits)) { in test_bitmap_parse()
471 unsigned int nbits, next_bit; in test_bitmap_arr32() local
477 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) { in test_bitmap_arr32()
478 bitmap_to_arr32(arr, exp1, nbits); in test_bitmap_arr32()
479 bitmap_from_arr32(bmap2, arr, nbits); in test_bitmap_arr32()
480 expect_eq_bitmap(bmap2, exp1, nbits); in test_bitmap_arr32()
483 round_up(nbits, BITS_PER_LONG), nbits); in test_bitmap_arr32()
484 if (next_bit < round_up(nbits, BITS_PER_LONG)) in test_bitmap_arr32()
487 nbits, next_bit); in test_bitmap_arr32()
489 if (nbits < EXP1_IN_BITS - 32) in test_bitmap_arr32()
490 expect_eq_uint(arr[DIV_ROUND_UP(nbits, 32)], in test_bitmap_arr32()
499 unsigned int start, nbits; in test_mem_optimisations() local
502 for (nbits = 0; nbits < 1024 - start; nbits += 8) { in test_mem_optimisations()
506 bitmap_set(bmap1, start, nbits); in test_mem_optimisations()
507 __bitmap_set(bmap2, start, nbits); in test_mem_optimisations()
509 printk("set not equal %d %d\n", start, nbits); in test_mem_optimisations()
513 printk("set not __equal %d %d\n", start, nbits); in test_mem_optimisations()
517 bitmap_clear(bmap1, start, nbits); in test_mem_optimisations()
518 __bitmap_clear(bmap2, start, nbits); in test_mem_optimisations()
520 printk("clear not equal %d %d\n", start, nbits); in test_mem_optimisations()
525 nbits); in test_mem_optimisations()
568 unsigned int nbits; member
616 bitmap_cut(out, in, t->first, t->cut, t->nbits); in test_bitmap_cut()
618 expect_eq_bitmap(t->expected, out, t->nbits); in test_bitmap_cut()