/linux-6.3-rc2/drivers/md/ |
A D | md-bitmap.c | 352 struct bitmap *bitmap, in read_page() argument 1228 struct bitmap *bitmap; in md_bitmap_daemon_work() local 1238 bitmap = mddev->bitmap; in md_bitmap_daemon_work() 1644 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_sync_with_cluster() local 1710 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_flush() local 1772 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_wait_behind_writes() local 1786 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_destroy() local 1813 struct bitmap *bitmap; in md_bitmap_create() local 1903 struct bitmap *bitmap = mddev->bitmap; in md_bitmap_load() local 1960 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-6.3-rc2/drivers/vfio/ |
A D | iova_bitmap.c | 132 return iova / (BITS_PER_TYPE(*bitmap->bitmap) * pgsize); in iova_bitmap_offset_to_index() 143 return (index * BITS_PER_TYPE(*bitmap->bitmap)) << pgshift; in iova_bitmap_index_to_offset() 176 sizeof(*bitmap->bitmap), PAGE_SIZE); in iova_bitmap_get() 188 addr = bitmap->bitmap + bitmap->mapped_base_index; in iova_bitmap_get() 244 bitmap = kzalloc(sizeof(*bitmap), GFP_KERNEL); in iova_bitmap_alloc() 245 if (!bitmap) in iova_bitmap_alloc() 250 bitmap->bitmap = data; in iova_bitmap_alloc() 265 return bitmap; in iova_bitmap_alloc() 290 kfree(bitmap); in iova_bitmap_free() 305 bytes / sizeof(*bitmap->bitmap)); in iova_bitmap_mapped_remaining() [all …]
|
/linux-6.3-rc2/lib/ |
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() 58 bitmap_copy(cp, bitmap, BITMAP_LEN); in test_find_first_and_bit() 107 l = find_last_bit(bitmap, len); in test_find_last_bit() 125 l = find_nth_bit(bitmap, len, n); in test_find_nth_bit() 155 get_random_bytes(bitmap, sizeof(bitmap)); in find_bit_test() 158 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test() 160 test_find_last_bit(bitmap, BITMAP_LEN); in find_bit_test() 173 bitmap_zero(bitmap, BITMAP_LEN); in find_bit_test() 181 test_find_next_bit(bitmap, BITMAP_LEN); in find_bit_test() [all …]
|
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() 511 if (!test_bit(bit, bitmap->bitmap)) in ida_free() 513 __clear_bit(bit, bitmap->bitmap); in ida_free() 515 if (bitmap_empty(bitmap->bitmap, IDA_BITMAP_BITS)) { in ida_free() [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 | 911 u32 *bitmap = (u32 *)maskp; in bitmap_parse() local 1414 kfree(bitmap); in bitmap_free() 1422 bitmap_free(bitmap); in devm_bitmap_free() 1428 unsigned long *bitmap; in devm_bitmap_alloc() local 1432 if (!bitmap) in devm_bitmap_alloc() 1439 return bitmap; in devm_bitmap_alloc() 1512 *bitmap++ = val; in bitmap_from_arr64() 1514 *bitmap++ = val >> 32; in bitmap_from_arr64() 1539 while (bitmap < end) { in bitmap_to_arr64() 1540 *buf = *bitmap++; in bitmap_to_arr64() [all …]
|
/linux-6.3-rc2/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-6.3-rc2/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-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
A D | dr_buddy.c | 19 buddy->bitmap = kcalloc(buddy->max_order + 1, in mlx5dr_buddy_init() 20 sizeof(*buddy->bitmap), in mlx5dr_buddy_init() 26 if (!buddy->bitmap || !buddy->num_free) in mlx5dr_buddy_init() 35 if (!buddy->bitmap[i]) in mlx5dr_buddy_init() 43 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in mlx5dr_buddy_init() 51 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_init() 55 kfree(buddy->bitmap); in mlx5dr_buddy_init() 66 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_cleanup() 69 kfree(buddy->bitmap); in mlx5dr_buddy_cleanup() 130 bitmap_clear(buddy->bitmap[order_iter], seg, 1); in mlx5dr_buddy_alloc_mem() [all …]
|
/linux-6.3-rc2/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 | 23 struct xbitmap *bitmap, in xbitmap_set() argument 44 struct xbitmap *bitmap) in xbitmap_destroy() argument 58 struct xbitmap *bitmap) in xbitmap_init() argument 60 INIT_LIST_HEAD(&bitmap->list); in xbitmap_init() 101 struct xbitmap *bitmap, in xbitmap_disunion() argument 130 lp = bitmap->list.next; in xbitmap_disunion() 131 while (lp != &bitmap->list) { in xbitmap_disunion() 252 struct xbitmap *bitmap, in xbitmap_set_btcur_path() argument 280 struct xbitmap *bitmap = priv; in xbitmap_collect_btblock() local 295 struct xbitmap *bitmap, in xbitmap_set_btblocks() argument [all …]
|
/linux-6.3-rc2/arch/powerpc/sysdev/ |
A D | msi_bitmap.c | 27 bitmap_set(bmp->bitmap, offset, num); in msi_bitmap_alloc_hwirqs() 48 bitmap_clear(bmp->bitmap, offset, num); in msi_bitmap_free_hwirqs() 60 bitmap_allocate_region(bmp->bitmap, hwirq, 0); in msi_bitmap_reserve_hwirq() 125 bmp->bitmap = kzalloc(size, GFP_KERNEL); in msi_bitmap_alloc() 128 if (!bmp->bitmap) in msi_bitmap_alloc() 132 kmemleak_not_leak(bmp->bitmap); in msi_bitmap_alloc() 135 if (!bmp->bitmap) { in msi_bitmap_alloc() 151 kfree(bmp->bitmap); in msi_bitmap_free() 153 bmp->bitmap = NULL; in msi_bitmap_free() 215 WARN_ON(bmp.bitmap != NULL); in test_basics() [all …]
|
/linux-6.3-rc2/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-6.3-rc2/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-6.3-rc2/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-6.3-rc2/fs/nfs/ |
A D | nfs4xdr.c | 1688 bitmap[1] = 0; in nfs4_acltype_to_bitmap() 1691 bitmap[0] = 0; in nfs4_acltype_to_bitmap() 1695 bitmap[0] = 0; in nfs4_acltype_to_bitmap() 1704 __u32 bitmap[2]; in encode_setacl() local 1710 xdr_encode_bitmap4(xdr, bitmap, ARRAY_SIZE(bitmap)); in encode_setacl() 4595 res->bm = bitmap[0]; in decode_first_threshold_item4() 4772 bitmap[3] = {0}; in decode_getfattr_generic() local 4898 uint32_t *bitmap, in decode_attr_change_attr_type() argument 5405 bitmap[3] = {0}; in decode_getacl() local 5427 if (unlikely(bitmap[0] || bitmap[1] & (FATTR4_WORD1_DACL - 1U))) in decode_getacl() [all …]
|
/linux-6.3-rc2/fs/btrfs/tests/ |
A D | extent-io-tests.c | 330 bit = !!test_bit(i, bitmap); in check_eb_bitmap() 354 memset(bitmap, 0, len); in __test_eb_bitmaps() 363 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 371 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 379 bitmap_set(bitmap, in __test_eb_bitmaps() 391 bitmap_clear(bitmap, in __test_eb_bitmaps() 415 bitmap_set(bitmap, i * 32 + j, 1); in __test_eb_bitmaps() 421 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 433 unsigned long *bitmap = NULL; in test_eb_bitmaps() local 446 if (!bitmap) { in test_eb_bitmaps() [all …]
|
/linux-6.3-rc2/include/linux/ |
A D | bitmap.h | 126 void bitmap_free(const unsigned long *bitmap); 291 void bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, 293 void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, 296 #define bitmap_from_arr32(bitmap, buf, nbits) \ argument 297 bitmap_copy_clear_tail((unsigned long *) (bitmap), \ 299 #define bitmap_to_arr32(buf, bitmap, nbits) \ argument 301 (const unsigned long *) (bitmap), (nbits)) 314 #define bitmap_from_arr64(bitmap, buf, nbits) \ argument 316 #define bitmap_to_arr64(buf, bitmap, nbits) \ argument 519 *rs = find_next_bit(bitmap, end, *rs); in bitmap_next_set_region() [all …]
|
/linux-6.3-rc2/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, device->bitmap)) in drbd_bm_capacity() 460 if (!expect(device, 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-6.3-rc2/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-6.3-rc2/fs/ocfs2/ |
A D | ocfs2.h | 872 __set_bit_le(bit, bitmap); in _ocfs2_set_bit() 878 __clear_bit_le(bit, bitmap); in _ocfs2_clear_bit() 900 static inline void ocfs2_set_bit_unaligned(int bit, void *bitmap) in ocfs2_set_bit_unaligned() argument 902 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_set_bit_unaligned() 903 ocfs2_set_bit(bit, bitmap); in ocfs2_set_bit_unaligned() 908 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_clear_bit_unaligned() 909 ocfs2_clear_bit(bit, bitmap); in ocfs2_clear_bit_unaligned() 914 bitmap = correct_addr_and_bit_unaligned(&bit, bitmap); in ocfs2_test_bit_unaligned() 915 return ocfs2_test_bit(bit, bitmap); in ocfs2_test_bit_unaligned() 922 bitmap = correct_addr_and_bit_unaligned(&fix, bitmap); in ocfs2_find_next_zero_bit_unaligned() [all …]
|
/linux-6.3-rc2/fs/udf/ |
A D | balloc.c | 47 bitmap->s_block_bitmap[bitmap_nr] = bh; in read_block_bitmap() 77 struct udf_bitmap *bitmap, in __load_block_bitmap() argument 81 int nr_groups = bitmap->s_nr_groups; in __load_block_bitmap() 88 if (bitmap->s_block_bitmap[block_group]) in __load_block_bitmap() 99 struct udf_bitmap *bitmap, in load_block_bitmap() argument 109 if (!bitmap->s_block_bitmap[slot]) in load_block_bitmap() 129 struct udf_bitmap *bitmap, in udf_bitmap_free_blocks() argument 174 bh = bitmap->s_block_bitmap[bitmap_nr]; in udf_bitmap_free_blocks() 195 struct udf_bitmap *bitmap, in udf_bitmap_prealloc_blocks() argument 262 nr_groups = bitmap->s_nr_groups; in udf_bitmap_new_block() [all …]
|
/linux-6.3-rc2/drivers/net/ethernet/mellanox/mlx5/core/ |
A D | alloc.c | 46 unsigned long *bitmap; member 143 pgdir->bitmap = bitmap_zalloc_node(db_per_page, GFP_KERNEL, node); in mlx5_alloc_db_pgdir() 144 if (!pgdir->bitmap) { in mlx5_alloc_db_pgdir() 149 bitmap_fill(pgdir->bitmap, db_per_page); in mlx5_alloc_db_pgdir() 154 bitmap_free(pgdir->bitmap); in mlx5_alloc_db_pgdir() 169 i = find_first_bit(pgdir->bitmap, db_per_page); in mlx5_alloc_db_from_pgdir() 173 __clear_bit(i, pgdir->bitmap); in mlx5_alloc_db_from_pgdir() 222 __set_bit(db->index, db->u.pgdir->bitmap); in mlx5_db_free() 224 if (bitmap_full(db->u.pgdir->bitmap, db_per_page)) { in mlx5_db_free() 228 bitmap_free(db->u.pgdir->bitmap); in mlx5_db_free()
|
/linux-6.3-rc2/drivers/gpu/drm/vmwgfx/ |
A D | vmwgfx_page_dirty.c | 70 unsigned long bitmap[]; member 91 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable() 105 offset, &dirty->bitmap[0], in vmw_bo_dirty_scan_pagetable() 146 &dirty->bitmap[0], in vmw_bo_dirty_scan_mkwrite() 148 bitmap_clear(&dirty->bitmap[0], 0, dirty->bitmap_size); in vmw_bo_dirty_scan_mkwrite() 150 bitmap_set(&dirty->bitmap[0], dirty->start, in vmw_bo_dirty_scan_mkwrite() 197 &dirty->bitmap[0], &dirty->start, in vmw_bo_dirty_pre_unmap() 265 &dirty->bitmap[0], in vmw_bo_dirty_add() 334 bitmap_clear(&dirty->bitmap[0], start, num); in vmw_bo_dirty_transfer_to_res() 404 !test_bit(page_offset, &vbo->dirty->bitmap[0])) { in vmw_bo_vm_mkwrite() [all …]
|