| /OK3568_Linux_fs/kernel/drivers/md/ |
| H A D | md-bitmap.c | 35 static inline char *bmname(struct bitmap *bitmap) in bmname() argument 37 return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; in bmname() 50 static int md_bitmap_checkpage(struct bitmap_counts *bitmap, in md_bitmap_checkpage() argument 52 __releases(bitmap->lock) in md_bitmap_checkpage() 53 __acquires(bitmap->lock) in md_bitmap_checkpage() 57 if (page >= bitmap->pages) { in md_bitmap_checkpage() 65 if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */ in md_bitmap_checkpage() 68 if (bitmap->bp[page].map) /* page is already allocated, just return */ in md_bitmap_checkpage() 76 spin_unlock_irq(&bitmap->lock); in md_bitmap_checkpage() 91 spin_lock_irq(&bitmap->lock); in md_bitmap_checkpage() [all …]
|
| H A D | md-bitmap.h | 180 struct bitmap { struct 239 struct bitmap *md_bitmap_create(struct mddev *mddev, int slot); 244 void md_bitmap_print_sb(struct bitmap *bitmap); 245 void md_bitmap_update_sb(struct bitmap *bitmap); 246 void md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap); 248 int md_bitmap_setallbits(struct bitmap *bitmap); 249 void md_bitmap_write_all(struct bitmap *bitmap); 251 void md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e); 254 int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, 256 void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, [all …]
|
| /OK3568_Linux_fs/kernel/drivers/gpu/arm/mali400/mali/linux/ |
| H A D | mali_osk_bitmap.c | 25 u32 _mali_osk_bitmap_alloc(struct _mali_osk_bitmap *bitmap) in _mali_osk_bitmap_alloc() argument 29 MALI_DEBUG_ASSERT_POINTER(bitmap); in _mali_osk_bitmap_alloc() 31 _mali_osk_spinlock_lock(bitmap->lock); in _mali_osk_bitmap_alloc() 33 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->reserve); in _mali_osk_bitmap_alloc() 35 if (obj < bitmap->max) { in _mali_osk_bitmap_alloc() 36 set_bit(obj, bitmap->table); in _mali_osk_bitmap_alloc() 42 --bitmap->avail; in _mali_osk_bitmap_alloc() 43 _mali_osk_spinlock_unlock(bitmap->lock); in _mali_osk_bitmap_alloc() 48 void _mali_osk_bitmap_free(struct _mali_osk_bitmap *bitmap, u32 obj) in _mali_osk_bitmap_free() argument 50 MALI_DEBUG_ASSERT_POINTER(bitmap); in _mali_osk_bitmap_free() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/infiniband/hw/hns/ |
| H A D | hns_roce_alloc.c | 39 int hns_roce_bitmap_alloc(struct hns_roce_bitmap *bitmap, unsigned long *obj) in hns_roce_bitmap_alloc() argument 43 spin_lock(&bitmap->lock); in hns_roce_bitmap_alloc() 44 *obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in hns_roce_bitmap_alloc() 45 if (*obj >= bitmap->max) { in hns_roce_bitmap_alloc() 46 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in hns_roce_bitmap_alloc() 47 & bitmap->mask; in hns_roce_bitmap_alloc() 48 *obj = find_first_zero_bit(bitmap->table, bitmap->max); in hns_roce_bitmap_alloc() 51 if (*obj < bitmap->max) { in hns_roce_bitmap_alloc() 52 set_bit(*obj, bitmap->table); in hns_roce_bitmap_alloc() 53 bitmap->last = (*obj + 1); in hns_roce_bitmap_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/drivers/net/ethernet/mellanox/mlx4/ |
| H A D | alloc.c | 44 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) in mlx4_bitmap_alloc() argument 48 spin_lock(&bitmap->lock); in mlx4_bitmap_alloc() 50 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); in mlx4_bitmap_alloc() 51 if (obj >= bitmap->max) { in mlx4_bitmap_alloc() 52 bitmap->top = (bitmap->top + bitmap->max + bitmap->reserved_top) in mlx4_bitmap_alloc() 53 & bitmap->mask; in mlx4_bitmap_alloc() 54 obj = find_first_zero_bit(bitmap->table, bitmap->max); in mlx4_bitmap_alloc() 57 if (obj < bitmap->max) { in mlx4_bitmap_alloc() 58 set_bit(obj, bitmap->table); in mlx4_bitmap_alloc() 59 bitmap->last = (obj + 1); in mlx4_bitmap_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/fs/afs/ |
| H A D | dir_edit.c | 25 u64 bitmap; in afs_find_contig_bits() local 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() 37 bitmap >>= 1; /* The first entry is metadata */ in afs_find_contig_bits() [all …]
|
| /OK3568_Linux_fs/kernel/lib/ |
| H A D | idr.c | 386 struct ida_bitmap *bitmap, *alloc = NULL; in ida_alloc_range() local 397 bitmap = xas_find_marked(&xas, max / IDA_BITMAP_BITS, XA_FREE_MARK); in ida_alloc_range() 403 if (xa_is_value(bitmap)) { in ida_alloc_range() 404 unsigned long tmp = xa_to_value(bitmap); in ida_alloc_range() 416 bitmap = alloc; in ida_alloc_range() 417 if (!bitmap) in ida_alloc_range() 418 bitmap = kzalloc(sizeof(*bitmap), GFP_NOWAIT); in ida_alloc_range() 419 if (!bitmap) in ida_alloc_range() 421 bitmap->bitmap[0] = tmp; in ida_alloc_range() 422 xas_store(&xas, bitmap); in ida_alloc_range() [all …]
|
| H A D | find_bit_benchmark.c | 29 static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata; 36 static int __init test_find_first_bit(void *bitmap, unsigned long len) in test_find_first_bit() argument 43 i = find_first_bit(bitmap, len); in test_find_first_bit() 44 __clear_bit(i, bitmap); in test_find_first_bit() 52 static int __init test_find_next_bit(const void *bitmap, unsigned long len) in test_find_next_bit() argument 59 i = find_next_bit(bitmap, BITMAP_LEN, i) + 1; in test_find_next_bit() 66 static int __init test_find_next_zero_bit(const void *bitmap, unsigned long len) in test_find_next_zero_bit() argument 73 i = find_next_zero_bit(bitmap, len, i) + 1; in test_find_next_zero_bit() 80 static int __init test_find_last_bit(const void *bitmap, unsigned long len) in test_find_last_bit() argument 88 l = find_last_bit(bitmap, len); in test_find_last_bit() [all …]
|
| H 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()
|
| H A D | bitmap.c | 336 int __bitmap_weight(const unsigned long *bitmap, unsigned int bits) in __bitmap_weight() argument 342 w += hweight_long(bitmap[k]); in __bitmap_weight() 345 w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); in __bitmap_weight() 505 unsigned long *bitmap, int nbits) in bitmap_set_region() argument 513 bitmap_set(bitmap, start, min(r->end - start + 1, r->off)); in bitmap_set_region() 744 u32 *bitmap = (u32 *)maskp; in bitmap_parse() local 757 end = bitmap_get_x32_reverse(start, end, &bitmap[chunk ^ 1]); in bitmap_parse() 759 end = bitmap_get_x32_reverse(start, end, &bitmap[chunk]); in bitmap_parse() 1109 static int __reg_op(unsigned long *bitmap, unsigned int pos, int order, int reg_op) in __reg_op() argument 1141 if (bitmap[index + i] & mask) in __reg_op() [all …]
|
| /OK3568_Linux_fs/kernel/arch/powerpc/sysdev/ |
| H A D | msi_bitmap.c | 21 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs() 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() 95 bitmap_allocate_region(bmp->bitmap, 0, get_count_order(bmp->irq_count)); in msi_bitmap_reserve_dt_hwirqs() 103 bitmap_release_region(bmp->bitmap, *p + j, 0); in msi_bitmap_reserve_dt_hwirqs() 124 bmp->bitmap = kzalloc(size, GFP_KERNEL); in msi_bitmap_alloc() 126 bmp->bitmap = memblock_alloc(size, SMP_CACHE_BYTES); in msi_bitmap_alloc() 127 if (!bmp->bitmap) in msi_bitmap_alloc() 131 kmemleak_not_leak(bmp->bitmap); in msi_bitmap_alloc() [all …]
|
| /OK3568_Linux_fs/kernel/fs/xfs/scrub/ |
| H 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 …]
|
| H A D | bitmap.c | 22 struct xbitmap *bitmap, in xbitmap_set() argument 35 list_add_tail(&bmr->list, &bitmap->list); in xbitmap_set() 43 struct xbitmap *bitmap) in xbitmap_destroy() argument 48 for_each_xbitmap_extent(bmr, n, bitmap) { in xbitmap_destroy() 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 112 if (list_empty(&bitmap->list) || list_empty(&sub->list)) in xbitmap_disunion() 116 list_sort(NULL, &bitmap->list, xbitmap_range_cmp); in xbitmap_disunion() 129 lp = bitmap->list.next; in xbitmap_disunion() [all …]
|
| /OK3568_Linux_fs/kernel/include/linux/ |
| H A D | bitmap.h | 125 extern void bitmap_free(const unsigned long *bitmap); 137 extern int __bitmap_empty(const unsigned long *bitmap, unsigned int nbits); 138 extern int __bitmap_full(const unsigned long *bitmap, unsigned int nbits); 169 extern int __bitmap_weight(const unsigned long *bitmap, unsigned int nbits); 219 extern int bitmap_find_free_region(unsigned long *bitmap, unsigned int bits, int order); 220 extern void bitmap_release_region(unsigned long *bitmap, unsigned int pos, int order); 221 extern int bitmap_allocate_region(unsigned long *bitmap, unsigned int pos, int order); 228 extern unsigned int bitmap_ord_to_pos(const unsigned long *bitmap, unsigned int ord, unsigned int n… 278 extern void bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, 280 extern void bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, [all …]
|
| /OK3568_Linux_fs/kernel/drivers/s390/cio/ |
| H 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()
|
| /OK3568_Linux_fs/kernel/drivers/gpu/drm/i915/selftests/ |
| H A D | i915_syncmap.c | 62 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print() 77 for_each_set_bit(i, (unsigned long *)&p->bitmap, KSYNCMAP) { in __sync_print() 80 last << 1 | !!(p->bitmap >> (i + 1)), in __sync_print() 183 if (hweight32((*sync)->bitmap) != 1) { in check_one() 185 (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_one() 189 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_one() 252 if (hweight32((*sync)->bitmap) != 1) { in check_leaf() 254 context, (*sync)->bitmap, hweight32((*sync)->bitmap)); in check_leaf() 258 err = check_seqno((*sync), ilog2((*sync)->bitmap), seqno); in check_leaf() 314 if (hweight32(join->bitmap) != 2) { in igt_syncmap_join_above() [all …]
|
| /OK3568_Linux_fs/kernel/fs/btrfs/tests/ |
| H A D | extent-io-tests.c | 271 static int check_eb_bitmap(unsigned long *bitmap, struct extent_buffer *eb, in check_eb_bitmap() argument 279 bit = !!test_bit(i, bitmap); in check_eb_bitmap() 296 static int __test_eb_bitmaps(unsigned long *bitmap, struct extent_buffer *eb, in __test_eb_bitmaps() argument 303 memset(bitmap, 0, len); in __test_eb_bitmaps() 305 if (memcmp_extent_buffer(eb, bitmap, 0, len) != 0) { in __test_eb_bitmaps() 310 bitmap_set(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 312 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 318 bitmap_clear(bitmap, 0, len * BITS_PER_BYTE); in __test_eb_bitmaps() 320 ret = check_eb_bitmap(bitmap, eb, len); in __test_eb_bitmaps() 328 bitmap_set(bitmap, in __test_eb_bitmaps() [all …]
|
| /OK3568_Linux_fs/prebuilts/gcc/linux-x86/arm/gcc-arm-10.3-2021.07-x86_64-arm-none-linux-gnueabihf/lib/gcc/arm-none-linux-gnueabihf/10.3.1/plugin/include/ |
| H A D | bitmap.h | 368 void bitmap_list_view (bitmap); 369 void bitmap_tree_view (bitmap); 372 extern void bitmap_clear (bitmap); 375 extern void bitmap_copy (bitmap, const_bitmap); 378 extern void bitmap_move (bitmap, bitmap); 409 extern void bitmap_and (bitmap, const_bitmap, const_bitmap); 410 extern bool bitmap_and_into (bitmap, const_bitmap); 411 extern bool bitmap_and_compl (bitmap, const_bitmap, const_bitmap); 412 extern bool bitmap_and_compl_into (bitmap, const_bitmap); 414 extern void bitmap_compl_and_into (bitmap, const_bitmap); [all …]
|
| H A D | df.h | 191 typedef void (*df_alloc_function) (bitmap); 199 typedef void (*df_reset_function) (bitmap); 206 typedef void (*df_local_compute_function) (bitmap); 209 typedef void (*df_init_function) (bitmap); 212 typedef void (*df_dataflow_function) (struct dataflow *, bitmap, int *, int); 226 typedef void (*df_finalizer_function) (bitmap); 308 bitmap out_of_date_transfer_functions; 546 bitmap blocks_to_analyze; 576 bitmap entry_block_defs; 577 bitmap exit_block_uses; /* The set of hardware registers used in exit block. */ [all …]
|
| H A D | valtrack.h | 74 bitmap used; 97 bitmap used; 100 bitmap to_rescan; 126 extern void dead_debug_global_init (struct dead_debug_global *, bitmap); 127 extern void dead_debug_global_finish (struct dead_debug_global *, bitmap); 128 extern void dead_debug_local_init (struct dead_debug_local *, bitmap, 130 extern void dead_debug_local_finish (struct dead_debug_local *, bitmap);
|
| /OK3568_Linux_fs/prebuilts/gcc/linux-x86/aarch64/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/lib/gcc/aarch64-none-linux-gnu/10.3.1/plugin/include/ |
| H A D | bitmap.h | 368 void bitmap_list_view (bitmap); 369 void bitmap_tree_view (bitmap); 372 extern void bitmap_clear (bitmap); 375 extern void bitmap_copy (bitmap, const_bitmap); 378 extern void bitmap_move (bitmap, bitmap); 409 extern void bitmap_and (bitmap, const_bitmap, const_bitmap); 410 extern bool bitmap_and_into (bitmap, const_bitmap); 411 extern bool bitmap_and_compl (bitmap, const_bitmap, const_bitmap); 412 extern bool bitmap_and_compl_into (bitmap, const_bitmap); 414 extern void bitmap_compl_and_into (bitmap, const_bitmap); [all …]
|
| H A D | df.h | 191 typedef void (*df_alloc_function) (bitmap); 199 typedef void (*df_reset_function) (bitmap); 206 typedef void (*df_local_compute_function) (bitmap); 209 typedef void (*df_init_function) (bitmap); 212 typedef void (*df_dataflow_function) (struct dataflow *, bitmap, int *, int); 226 typedef void (*df_finalizer_function) (bitmap); 308 bitmap out_of_date_transfer_functions; 546 bitmap blocks_to_analyze; 576 bitmap entry_block_defs; 577 bitmap exit_block_uses; /* The set of hardware registers used in exit block. */ [all …]
|
| H A D | valtrack.h | 74 bitmap used; 97 bitmap used; 100 bitmap to_rescan; 126 extern void dead_debug_global_init (struct dead_debug_global *, bitmap); 127 extern void dead_debug_global_finish (struct dead_debug_global *, bitmap); 128 extern void dead_debug_local_init (struct dead_debug_local *, bitmap, 130 extern void dead_debug_local_finish (struct dead_debug_local *, bitmap);
|
| /OK3568_Linux_fs/kernel/fs/hfs/ |
| H 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()
|
| /OK3568_Linux_fs/kernel/fs/nfs/ |
| H A D | nfs4xdr.c | 980 const __u32 *bitmap, size_t len) in xdr_encode_bitmap4() argument 985 while (len > 0 && bitmap[len-1] == 0) in xdr_encode_bitmap4() 987 ret = xdr_stream_encode_uint32_array(xdr, bitmap, len); in xdr_encode_bitmap4() 993 static size_t mask_bitmap4(const __u32 *bitmap, const __u32 *mask, in mask_bitmap4() argument 999 while (len > 0 && (bitmap[len-1] == 0 || mask[len-1] == 0)) in mask_bitmap4() 1002 tmp = bitmap[i] & mask[i]; in mask_bitmap4() 1243 const __u32 *bitmap, const __u32 *mask, size_t len, in encode_getattr() argument 1252 len = mask_bitmap4(bitmap, mask, masked_bitmap, len); in encode_getattr() 1253 bitmap = masked_bitmap; in encode_getattr() 1255 xdr_encode_bitmap4(xdr, bitmap, len); in encode_getattr() [all …]
|