Lines Matching refs:bm
485 unsigned long *p_addr, *bm; in bm_clear_surplus() local
498 bm = p_addr + (tmp/BITS_PER_LONG); in bm_clear_surplus()
504 cleared = hweight_long(*bm & ~mask); in bm_clear_surplus()
505 *bm &= mask; in bm_clear_surplus()
506 bm++; in bm_clear_surplus()
509 if (BITS_PER_LONG == 32 && ((bm - p_addr) & 1) == 1) { in bm_clear_surplus()
512 cleared += hweight_long(*bm); in bm_clear_surplus()
513 *bm = 0; in bm_clear_surplus()
522 unsigned long *p_addr, *bm; in bm_set_surplus() local
534 bm = p_addr + (tmp/BITS_PER_LONG); in bm_set_surplus()
540 *bm |= ~mask; in bm_set_surplus()
541 bm++; in bm_set_surplus()
544 if (BITS_PER_LONG == 32 && ((bm - p_addr) & 1) == 1) { in bm_set_surplus()
547 *bm = ~0UL; in bm_set_surplus()
584 unsigned long *p_addr, *bm; in bm_memset() local
599 bm = p_addr + MLPP(offset); in bm_memset()
600 if (bm+do_now > p_addr + LWPP) { in bm_memset()
602 p_addr, bm, (int)do_now); in bm_memset()
604 memset(bm, c, do_now * sizeof(long)); in bm_memset()
812 unsigned long *p_addr, *bm; in drbd_bm_merge_lel() local
833 bm = p_addr + MLPP(offset); in drbd_bm_merge_lel()
836 bits = hweight_long(*bm); in drbd_bm_merge_lel()
837 word = *bm | *buffer++; in drbd_bm_merge_lel()
838 *bm++ = word; in drbd_bm_merge_lel()
861 unsigned long *p_addr, *bm; in drbd_bm_get_lel() local
883 bm = p_addr + MLPP(offset); in drbd_bm_get_lel()
886 *buffer++ = *bm++; in drbd_bm_get_lel()
1635 unsigned long *p_addr, *bm; in drbd_bm_e_weight() local
1652 bm = p_addr + MLPP(s); in drbd_bm_e_weight()
1653 count += bitmap_weight(bm, n * BITS_PER_LONG); in drbd_bm_e_weight()