/linux/drivers/md/ |
A D | md-bitmap.c | 352 struct bitmap *bitmap, in read_page() argument 1227 struct bitmap *bitmap; in md_bitmap_daemon_work() local 1237 bitmap = mddev->bitmap; in md_bitmap_daemon_work() 1643 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_sync_with_cluster() local 1709 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_flush() local 1771 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_wait_behind_writes() local 1785 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_destroy() local 1812 struct bitmap *bitmap; in md_bitmap_create() local 1902 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_load() local 1959 struct bitmap *bitmap; in get_bitmap_from_slot() local [all …]
|
A D | md-bitmap.h | 180 struct bitmap { struct 244 void md_bitmap_print_sb(struct bitmap *bitmap); 245 void md_bitmap_update_sb(struct bitmap *bitmap); 248 int md_bitmap_setallbits(struct bitmap *bitmap); 249 void md_bitmap_write_all(struct bitmap *bitmap); 254 int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, 256 void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, 260 void md_bitmap_close_sync(struct bitmap *bitmap); 266 void md_bitmap_unplug(struct bitmap *bitmap); 269 int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx4/ |
A D | alloc.c | 50 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc() 52 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc() 60 if (bitmap->last == bitmap->max) in mlx4_bitmap_alloc() 122 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc_range() 132 if (bitmap->last >= bitmap->max) in mlx4_bitmap_alloc_range() 160 obj &= bitmap->max + bitmap->reserved_top - 1; in mlx4_bitmap_free_range() 164 bitmap->last = min(bitmap->last, obj); in mlx4_bitmap_free_range() 165 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_free_range() 186 bitmap->effective_len = bitmap->avail; in mlx4_bitmap_init() 256 zone->bitmap = bitmap; in mlx4_zone_add_one() [all …]
|
/linux/fs/afs/ |
A D | dir_edit.c | 29 bitmap = (u64)block->hdr.bitmap[0] << 0 * 8; in afs_find_contig_bits() 30 bitmap |= (u64)block->hdr.bitmap[1] << 1 * 8; in afs_find_contig_bits() 31 bitmap |= (u64)block->hdr.bitmap[2] << 2 * 8; in afs_find_contig_bits() 32 bitmap |= (u64)block->hdr.bitmap[3] << 3 * 8; in afs_find_contig_bits() 33 bitmap |= (u64)block->hdr.bitmap[4] << 4 * 8; in afs_find_contig_bits() 34 bitmap |= (u64)block->hdr.bitmap[5] << 5 * 8; in afs_find_contig_bits() 35 bitmap |= (u64)block->hdr.bitmap[6] << 6 * 8; in afs_find_contig_bits() 36 bitmap |= (u64)block->hdr.bitmap[7] << 7 * 8; in afs_find_contig_bits() 138 bitmap = (u64)block->hdr.bitmap[0] << 0 * 8; in afs_dir_scan_block() 139 bitmap |= (u64)block->hdr.bitmap[1] << 1 * 8; in afs_dir_scan_block() [all …]
|
/linux/lib/ |
A D | idr.c | 418 bitmap = kzalloc(sizeof(*bitmap), GFP_NOWAIT); in ida_alloc_range() 421 bitmap->bitmap[0] = tmp; in ida_alloc_range() 424 bitmap->bitmap[0] = 0; in ida_alloc_range() 436 __set_bit(bit, bitmap->bitmap); in ida_alloc_range() 437 if (bitmap_full(bitmap->bitmap, IDA_BITMAP_BITS)) in ida_alloc_range() 445 bitmap = kzalloc(sizeof(*bitmap), GFP_NOWAIT); in ida_alloc_range() 448 __set_bit(bit, bitmap->bitmap); in ida_alloc_range() 510 if (!test_bit(bit, bitmap->bitmap)) in ida_free() 512 __clear_bit(bit, bitmap->bitmap); in ida_free() 514 if (bitmap_empty(bitmap->bitmap, IDA_BITMAP_BITS)) { in ida_free() [all …]
|
A D | find_bit_benchmark.c | 43 i = find_first_bit(bitmap, len); in test_find_first_bit() 44 __clear_bit(i, bitmap); in test_find_first_bit() 73 i = find_next_zero_bit(bitmap, len, i) + 1; in test_find_next_zero_bit() 88 l = find_last_bit(bitmap, len); in test_find_last_bit() 120 get_random_bytes(bitmap, sizeof(bitmap)); in find_bit_test() 123 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test() 125 test_find_last_bit(bitmap, BITMAP_LEN); in find_bit_test() 136 bitmap_zero(bitmap, BITMAP_LEN); in find_bit_test() 144 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test() 146 test_find_last_bit(bitmap, BITMAP_LEN); in find_bit_test() [all …]
|
A D | memweight.c | 15 const unsigned char *bitmap = ptr; in memweight() local 17 for (; bytes > 0 && ((unsigned long)bitmap) % sizeof(long); in memweight() 18 bytes--, bitmap++) in memweight() 19 ret += hweight8(*bitmap); in memweight() 24 ret += bitmap_weight((unsigned long *)bitmap, in memweight() 27 bitmap += longs * sizeof(long); in memweight() 34 for (; bytes > 0; bytes--, bitmap++) in memweight() 35 ret += hweight8(*bitmap); in memweight()
|
A D | bitmap.c | 342 w += hweight_long(bitmap[k]); in __bitmap_weight() 883 u32 *bitmap = (u32 *)maskp; in bitmap_parse() local 1281 if (bitmap[index + i] & mask) in __reg_op() 1289 bitmap[index + i] |= mask; in __reg_op() 1294 bitmap[index + i] &= ~mask; in __reg_op() 1416 kfree(bitmap); in bitmap_free() 1422 unsigned long *bitmap = data; in devm_bitmap_free() local 1424 bitmap_free(bitmap); in devm_bitmap_free() 1430 unsigned long *bitmap; in devm_bitmap_alloc() local 1434 if (!bitmap) in devm_bitmap_alloc() [all …]
|
/linux/arch/powerpc/sysdev/ |
A D | msi_bitmap.c | 26 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 47 bitmap_clear(bmp->bitmap, offset, num); in msi_bitmap_free_hwirqs() 59 bitmap_allocate_region(bmp->bitmap, hwirq, 0); in msi_bitmap_reserve_hwirq() 124 bmp->bitmap = kzalloc(size, GFP_KERNEL); in msi_bitmap_alloc() 127 if (!bmp->bitmap) in msi_bitmap_alloc() 131 kmemleak_not_leak(bmp->bitmap); in msi_bitmap_alloc() 134 if (!bmp->bitmap) { in msi_bitmap_alloc() 150 kfree(bmp->bitmap); in msi_bitmap_free() 152 bmp->bitmap = NULL; in msi_bitmap_free() 214 WARN_ON(bmp.bitmap != NULL); in test_basics() [all …]
|
/linux/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
A D | dr_buddy.c | 21 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init() 22 sizeof(*buddy->bitmap), in mlx5dr_buddy_init() 28 if (!buddy->bitmap || !buddy->num_free) in mlx5dr_buddy_init() 37 if (!buddy->bitmap[i]) in mlx5dr_buddy_init() 45 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in mlx5dr_buddy_init() 53 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_init() 57 kfree(buddy->bitmap); in mlx5dr_buddy_init() 68 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_cleanup() 71 kfree(buddy->bitmap); in mlx5dr_buddy_cleanup() 132 bitmap_clear(buddy->bitmap[order_iter], seg, 1); in mlx5dr_buddy_alloc_mem() [all …]
|
/linux/fs/xfs/scrub/ |
A D | bitmap.h | 19 void xbitmap_init(struct xbitmap *bitmap); 20 void xbitmap_destroy(struct xbitmap *bitmap); 22 #define for_each_xbitmap_extent(bex, n, bitmap) \ argument 23 list_for_each_entry_safe((bex), (n), &(bitmap)->list, list) 25 #define for_each_xbitmap_block(b, bex, n, bitmap) \ argument 26 list_for_each_entry_safe((bex), (n), &(bitmap)->list, list) \ 29 int xbitmap_set(struct xbitmap *bitmap, uint64_t start, uint64_t len); 30 int xbitmap_disunion(struct xbitmap *bitmap, struct xbitmap *sub); 31 int xbitmap_set_btcur_path(struct xbitmap *bitmap, 33 int xbitmap_set_btblocks(struct xbitmap *bitmap, [all …]
|
A D | bitmap.c | 22 struct xbitmap *bitmap, in xbitmap_set() argument 43 struct xbitmap *bitmap) in xbitmap_destroy() argument 57 struct xbitmap *bitmap) in xbitmap_init() argument 59 INIT_LIST_HEAD(&bitmap->list); in xbitmap_init() 100 struct xbitmap *bitmap, in xbitmap_disunion() argument 129 lp = bitmap->list.next; in xbitmap_disunion() 130 while (lp != &bitmap->list) { in xbitmap_disunion() 251 struct xbitmap *bitmap, in xbitmap_set_btcur_path() argument 279 struct xbitmap *bitmap = priv; in xbitmap_collect_btblock() local 294 struct xbitmap *bitmap, in xbitmap_set_btblocks() argument [all …]
|
/linux/include/linux/ |
A D | bitmap.h | 128 void bitmap_free(const unsigned long *bitmap); 278 void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, 281 #define bitmap_from_arr32(bitmap, buf, nbits) \ argument 282 bitmap_copy_clear_tail((unsigned long *) (bitmap), \ 284 #define bitmap_to_arr32(buf, bitmap, nbits) \ argument 286 (const unsigned long *) (bitmap), (nbits)) 473 *rs = find_next_zero_bit(bitmap, end, *rs); in bitmap_next_clear_region() 474 *re = find_next_bit(bitmap, end, *rs + 1); in bitmap_next_clear_region() 481 *rs = find_next_bit(bitmap, end, *rs); in bitmap_next_set_region() 482 *re = find_next_zero_bit(bitmap, end, *rs + 1); in bitmap_next_set_region() [all …]
|
/linux/drivers/s390/cio/ |
A D | idset.c | 16 unsigned long bitmap[]; member 32 memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); in idset_new() 44 memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); in idset_fill() 49 set_bit(ssid * set->num_id + id, set->bitmap); in idset_add() 54 clear_bit(ssid * set->num_id + id, set->bitmap); in idset_del() 59 return test_bit(ssid * set->num_id + id, set->bitmap); in idset_contains() 82 bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no); in idset_sch_del_subseq() 92 return bitmap_empty(set->bitmap, set->num_ssid * set->num_id); in idset_is_empty() 99 bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); in idset_add_set()
|
/linux/drivers/gpu/drm/i915/selftests/ |
A D | i915_syncmap.c | 183 if (hweight32((*sync)->bitmap) != 1) { in check_one() 185 (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_one() 252 if (hweight32((*sync)->bitmap) != 1) { in check_leaf() 254 context, (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_leaf() 314 if (hweight32(join->bitmap) != 2) { in igt_syncmap_join_above() 316 join->bitmap, hweight32(join->bitmap)); in igt_syncmap_join_above() 435 sync->bitmap, hweight32(sync->bitmap), in igt_syncmap_neighbours() 500 sync->bitmap, hweight32(sync->bitmap), in igt_syncmap_compact() 523 if (!is_power_of_2(leaf->bitmap)) { in igt_syncmap_compact() 525 idx, leaf->bitmap, hweight32(leaf->bitmap)); in igt_syncmap_compact() [all …]
|
/linux/fs/btrfs/tests/ |
A D | extent-io-tests.c | 279 bit = !!test_bit(i, bitmap); in check_eb_bitmap() 303 memset(bitmap, 0, len); in __test_eb_bitmaps() 312 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 320 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 328 bitmap_set(bitmap, in __test_eb_bitmaps() 340 bitmap_clear(bitmap, in __test_eb_bitmaps() 364 bitmap_set(bitmap, i * 32 + j, 1); in __test_eb_bitmaps() 370 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 382 unsigned long *bitmap = NULL; in test_eb_bitmaps() local 395 if (!bitmap) { in test_eb_bitmaps() [all …]
|
/linux/fs/hfs/ |
A D | bitmap.c | 29 static u32 hfs_find_set_zero_bits(__be32 *bitmap, u32 size, u32 offset, u32 *max) in hfs_find_set_zero_bits() argument 40 curr = bitmap + (offset / 32); in hfs_find_set_zero_bits() 41 end = bitmap + ((size + 31) / 32); in hfs_find_set_zero_bits() 70 start = (curr - bitmap) * 32 + i; in hfs_find_set_zero_bits() 108 *max = (curr - bitmap) * 32 + i - start; in hfs_find_set_zero_bits() 141 void *bitmap; in hfs_vbm_search_free() local 149 bitmap = HFS_SB(sb)->bitmap; in hfs_vbm_search_free() 151 pos = hfs_find_set_zero_bits(bitmap, HFS_SB(sb)->fs_ablocks, goal, num_bits); in hfs_vbm_search_free() 154 pos = hfs_find_set_zero_bits(bitmap, goal, 0, num_bits); in hfs_vbm_search_free() 210 curr = HFS_SB(sb)->bitmap + (start / 32); in hfs_clear_vbm_bits()
|
/linux/fs/nfs/ |
A D | nfs4xdr.c | 1265 bitmap = masked_bitmap; in encode_getattr() 4445 if (unlikely(bitmap[0])) in decode_statfs() 4486 uint32_t *bitmap, in decode_threshold_hint() argument 4542 res->bm = bitmap[0]; in decode_first_threshold_item4() 4556 uint32_t *bitmap, in decode_attr_mdsthreshold() argument 4639 if (unlikely(bitmap[0])) in decode_getfattr_attrs() 4696 if (unlikely(bitmap[1])) in decode_getfattr_attrs() 4721 bitmap[3] = {0}; in decode_getfattr_generic() local 4847 uint32_t *bitmap, in decode_attr_change_attr_type() argument 4899 if (unlikely(bitmap[0])) in decode_fsinfo() [all …]
|
/linux/drivers/block/drbd/ |
A D | drbd_bitmap.c | 115 struct drbd_bitmap *b = device->bitmap; in __bm_print_lock_info() 126 struct drbd_bitmap *b = device->bitmap; in drbd_bm_lock() 223 wake_up(&device->bitmap->bm_io_wait); in bm_page_unlock_io() 242 device->bitmap->n_bitmap_hints = 0; in drbd_bm_reset_al_hints() 444 device->bitmap = b; in drbd_bm_init() 451 if (!expect(device->bitmap)) in drbd_bm_capacity() 460 if (!expect(device->bitmap)) in drbd_bm_cleanup() 462 bm_free_pages(device->bitmap->bm_pages, device->bitmap->bm_number_of_pages); in drbd_bm_cleanup() 463 bm_vk_free(device->bitmap->bm_pages); in drbd_bm_cleanup() 464 kfree(device->bitmap); in drbd_bm_cleanup() [all …]
|
/linux/fs/ocfs2/ |
A D | ocfs2.h | 875 __set_bit_le(bit, bitmap); in _ocfs2_set_bit() 881 __clear_bit_le(bit, bitmap); in _ocfs2_clear_bit() 903 static inline void ocfs2_set_bit_unaligned(int bit, void *bitmap) in ocfs2_set_bit_unaligned() argument 905 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_set_bit_unaligned() 906 ocfs2_set_bit(bit, bitmap); in ocfs2_set_bit_unaligned() 911 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_clear_bit_unaligned() 912 ocfs2_clear_bit(bit, bitmap); in ocfs2_clear_bit_unaligned() 917 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_test_bit_unaligned() 918 return ocfs2_test_bit(bit, bitmap); in ocfs2_test_bit_unaligned() 925 bitmap = correct_addr_and_bit_unaligned(&fix, bitmap); in ocfs2_find_next_zero_bit_unaligned() [all …]
|
/linux/fs/udf/ |
A D | balloc.c | 49 bitmap->s_block_bitmap[bitmap_nr] = bh; in read_block_bitmap() 54 struct udf_bitmap *bitmap, in __load_block_bitmap() argument 58 int nr_groups = bitmap->s_nr_groups; in __load_block_bitmap() 65 if (bitmap->s_block_bitmap[block_group]) in __load_block_bitmap() 76 struct udf_bitmap *bitmap, in load_block_bitmap() argument 86 if (!bitmap->s_block_bitmap[slot]) in load_block_bitmap() 106 struct udf_bitmap *bitmap, in udf_bitmap_free_blocks() argument 151 bh = bitmap->s_block_bitmap[bitmap_nr]; in udf_bitmap_free_blocks() 172 struct udf_bitmap *bitmap, in udf_bitmap_prealloc_blocks() argument 239 nr_groups = bitmap->s_nr_groups; in udf_bitmap_new_block() [all …]
|
/linux/drivers/pci/endpoint/ |
A D | pci-epc-mem.c | 52 unsigned long *bitmap = NULL; in pci_epc_multi_mem_init() local 84 bitmap = kzalloc(bitmap_size, GFP_KERNEL); in pci_epc_multi_mem_init() 85 if (!bitmap) { in pci_epc_multi_mem_init() 95 mem->bitmap = bitmap; in pci_epc_multi_mem_init() 109 kfree(mem->bitmap); in pci_epc_multi_mem_init() 148 kfree(mem->bitmap); in pci_epc_mem_exit() 185 pageno = bitmap_find_free_region(mem->bitmap, mem->pages, in pci_epc_mem_alloc_addr() 193 bitmap_release_region(mem->bitmap, in pci_epc_mem_alloc_addr() 256 bitmap_release_region(mem->bitmap, pageno, order); in pci_epc_mem_free_addr()
|
/linux/fs/btrfs/ |
A D | free-space-cache.c | 556 void *bitmap) in io_ctl_add_entry() argument 1052 if (e->bitmap) { in write_cache_extent_entries() 1561 if (bitmap) { in tree_insert_offset() 2351 if (!bitmap) in steal_from_bitmap_to_end() 2355 j = find_next_zero_bit(bitmap->bitmap, BITS_PER_BITMAP, i); in steal_from_bitmap_to_end() 2396 if (!bitmap) in steal_from_bitmap_to_front() 2402 for_each_clear_bit_from(j, bitmap->bitmap, BITS_PER_BITMAP) { in steal_from_bitmap_to_front() 2839 bool bitmap; in __btrfs_return_cluster_to_free_space() local 2846 bitmap = (entry->bitmap != NULL); in __btrfs_return_cluster_to_free_space() 2847 if (!bitmap) { in __btrfs_return_cluster_to_free_space() [all …]
|
/linux/arch/powerpc/platforms/4xx/ |
A D | msi.c | 40 struct msi_bitmap bitmap; member 51 err = msi_bitmap_alloc(&msi_data->bitmap, msi_irqs, in ppc4xx_msi_init_allocator() 56 err = msi_bitmap_reserve_dt_hwirqs(&msi_data->bitmap); in ppc4xx_msi_init_allocator() 58 msi_bitmap_free(&msi_data->bitmap); in ppc4xx_msi_init_allocator() 83 int_no = msi_bitmap_alloc_hwirqs(&msi_data->bitmap, 1); in ppc4xx_setup_msi_irqs() 93 msi_bitmap_free_hwirqs(&msi_data->bitmap, int_no, 1); in ppc4xx_setup_msi_irqs() 123 msi_bitmap_free_hwirqs(&msi_data->bitmap, hwirq, 1); in ppc4xx_teardown_msi_irqs() 206 if (msi->bitmap.bitmap) in ppc4xx_of_msi_remove() 207 msi_bitmap_free(&msi->bitmap); in ppc4xx_of_msi_remove()
|
/linux/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_page_dirty.c | 72 unsigned long bitmap[]; member 93 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable() 107 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable() 148 &dirty->bitmap[0], in vmw_bo_dirty_scan_mkwrite() 150 bitmap_clear(&dirty->bitmap[0], 0, dirty->bitmap_size); in vmw_bo_dirty_scan_mkwrite() 152 bitmap_set(&dirty->bitmap[0], dirty->start, in vmw_bo_dirty_scan_mkwrite() 199 &dirty->bitmap[0], &dirty->start, in vmw_bo_dirty_pre_unmap() 279 &dirty->bitmap[0], in vmw_bo_dirty_add() 352 bitmap_clear(&dirty->bitmap[0], start, num); in vmw_bo_dirty_transfer_to_res() 422 !test_bit(page_offset, &vbo->dirty->bitmap[0])) { in vmw_bo_vm_mkwrite() [all …]
|