Home
last modified time | relevance | path

Searched refs:bitmap (Results 1 - 25 of 1209) sorted by relevance

12345678910>>...49

/kernel/linux/linux-6.6/drivers/md/
H A Dmd-bitmap.c3 * bitmap.c two-level bitmap (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
5 * bitmap_create - sets up the bitmap structure
6 * bitmap_destroy - destroys the bitmap structure
9 * - added disk storage for bitmap
10 * - changes to allow various bitmap chunk sizes
33 #include "md-bitmap.h"
35 static inline char *bmname(struct bitmap *bitmap) in bmname() argument
37 return bitmap in bmname()
112 md_bitmap_checkfree(struct bitmap_counts *bitmap, unsigned long page) md_bitmap_checkfree() argument
224 __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap, unsigned long pg_index, struct page *page) __write_sb_page() argument
280 write_sb_page(struct bitmap *bitmap, unsigned long pg_index, struct page *page, bool wait) write_sb_page() argument
300 write_file_page(struct bitmap *bitmap, struct page *page, int wait) write_file_page() argument
319 struct bitmap *bitmap = bh->b_private; end_bitmap_write() local
351 read_file_page(struct file *file, unsigned long index, struct bitmap *bitmap, unsigned long count, struct page *page) read_file_page() argument
414 write_file_page(struct bitmap *bitmap, struct page *page, int wait) write_file_page() argument
417 read_file_page(struct file *file, unsigned long index, struct bitmap *bitmap, unsigned long count, struct page *page) read_file_page() argument
435 filemap_write_page(struct bitmap *bitmap, unsigned long pg_index, bool wait) filemap_write_page() argument
457 md_bitmap_wait_writes(struct bitmap *bitmap) md_bitmap_wait_writes() argument
475 md_bitmap_update_sb(struct bitmap *bitmap) md_bitmap_update_sb() argument
516 md_bitmap_print_sb(struct bitmap *bitmap) md_bitmap_print_sb() argument
555 md_bitmap_new_disk_sb(struct bitmap *bitmap) md_bitmap_new_disk_sb() argument
614 md_bitmap_read_sb(struct bitmap *bitmap) md_bitmap_read_sb() argument
893 md_bitmap_file_kick(struct bitmap *bitmap) md_bitmap_file_kick() argument
915 set_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) set_page_attr() argument
921 clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) clear_page_attr() argument
927 test_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) test_page_attr() argument
933 test_and_clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) test_and_clear_page_attr() argument
946 md_bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_set_bit() argument
977 md_bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_clear_bit() argument
1007 md_bitmap_file_test_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_test_bit() argument
1031 md_bitmap_unplug(struct bitmap *bitmap) md_bitmap_unplug() argument
1068 struct bitmap *bitmap; global() member
1081 md_bitmap_unplug_async(struct bitmap *bitmap) md_bitmap_unplug_async() argument
1108 md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) md_bitmap_init_from_disk() argument
1230 md_bitmap_write_all(struct bitmap *bitmap) md_bitmap_write_all() argument
1249 md_bitmap_count_page(struct bitmap_counts *bitmap, sector_t offset, int inc) md_bitmap_count_page() argument
1258 md_bitmap_set_pending(struct bitmap_counts *bitmap, sector_t offset) md_bitmap_set_pending() argument
1296 struct bitmap *bitmap; md_bitmap_daemon_work() local
1467 md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int behind) md_bitmap_startwrite() argument
1531 md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int success, int behind) md_bitmap_endwrite() argument
1584 __bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) __bitmap_start_sync() argument
1612 md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) md_bitmap_start_sync() argument
1636 md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted) md_bitmap_end_sync() argument
1667 md_bitmap_close_sync(struct bitmap *bitmap) md_bitmap_close_sync() argument
1684 md_bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force) md_bitmap_cond_end_sync() argument
1718 struct bitmap *bitmap = mddev->bitmap; md_bitmap_sync_with_cluster() local
1735 md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed) md_bitmap_set_memory_bits() argument
1762 md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e) md_bitmap_dirty_bits() argument
1784 struct bitmap *bitmap = mddev->bitmap; md_bitmap_flush() local
1808 md_bitmap_free(struct bitmap *bitmap) md_bitmap_free() argument
1846 struct bitmap *bitmap = mddev->bitmap; md_bitmap_wait_behind_writes() local
1860 struct bitmap *bitmap = mddev->bitmap; md_bitmap_destroy() local
1886 struct bitmap *bitmap; md_bitmap_create() local
1976 struct bitmap *bitmap = mddev->bitmap; md_bitmap_load() local
2033 struct bitmap *bitmap; get_bitmap_from_slot() local
2060 struct bitmap *bitmap; md_bitmap_copy_from_slot() local
2100 md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap) md_bitmap_status() argument
2127 md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, int chunksize, int init) md_bitmap_resize() argument
2414 struct bitmap *bitmap; location_store() local
[all...]
H A Dmd-bitmap.h3 * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
11 /* version 4 insists the bitmap is in little-endian order
20 * in-memory bitmap:
110 * bitmap structures:
115 /* use these for bitmap->flags and bitmap->sb->state bit-fields */
117 BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */
122 /* the superblock at the front of the bitmap file -- little endian */
125 __le32 version; /* 4 the bitmap major for now, could change... */
127 __le64 events; /* 24 event counter for the bitmap (
180 struct bitmap { global() struct
279 md_bitmap_enabled(struct bitmap *bitmap) md_bitmap_enabled() argument
[all...]
/kernel/linux/linux-5.10/drivers/md/
H A Dmd-bitmap.c3 * bitmap.c two-level bitmap (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
5 * bitmap_create - sets up the bitmap structure
6 * bitmap_destroy - destroys the bitmap structure
9 * - added disk storage for bitmap
10 * - changes to allow various bitmap chunk sizes
33 #include "md-bitmap.h"
35 static inline char *bmname(struct bitmap *bitmap) in bmname() argument
37 return bitmap in bmname()
112 md_bitmap_checkfree(struct bitmap_counts *bitmap, unsigned long page) md_bitmap_checkfree() argument
205 write_sb_page(struct bitmap *bitmap, struct page *page, int wait) write_sb_page() argument
281 write_page(struct bitmap *bitmap, struct page *page, int wait) write_page() argument
312 struct bitmap *bitmap = bh->b_private; end_bitmap_write() local
344 read_page(struct file *file, unsigned long index, struct bitmap *bitmap, unsigned long count, struct page *page) read_page() argument
419 md_bitmap_wait_writes(struct bitmap *bitmap) md_bitmap_wait_writes() argument
437 md_bitmap_update_sb(struct bitmap *bitmap) md_bitmap_update_sb() argument
473 md_bitmap_print_sb(struct bitmap *bitmap) md_bitmap_print_sb() argument
512 md_bitmap_new_disk_sb(struct bitmap *bitmap) md_bitmap_new_disk_sb() argument
571 md_bitmap_read_sb(struct bitmap *bitmap) md_bitmap_read_sb() argument
858 md_bitmap_file_kick(struct bitmap *bitmap) md_bitmap_file_kick() argument
888 set_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) set_page_attr() argument
894 clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) clear_page_attr() argument
900 test_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) test_page_attr() argument
906 test_and_clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) test_and_clear_page_attr() argument
919 md_bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_set_bit() argument
948 md_bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_clear_bit() argument
976 md_bitmap_file_test_bit(struct bitmap *bitmap, sector_t block) md_bitmap_file_test_bit() argument
1001 md_bitmap_unplug(struct bitmap *bitmap) md_bitmap_unplug() argument
1049 md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) md_bitmap_init_from_disk() argument
1173 md_bitmap_write_all(struct bitmap *bitmap) md_bitmap_write_all() argument
1192 md_bitmap_count_page(struct bitmap_counts *bitmap, sector_t offset, int inc) md_bitmap_count_page() argument
1201 md_bitmap_set_pending(struct bitmap_counts *bitmap, sector_t offset) md_bitmap_set_pending() argument
1222 struct bitmap *bitmap; md_bitmap_daemon_work() local
1395 md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int behind) md_bitmap_startwrite() argument
1459 md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int success, int behind) md_bitmap_endwrite() argument
1512 __bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) __bitmap_start_sync() argument
1540 md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) md_bitmap_start_sync() argument
1564 md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted) md_bitmap_end_sync() argument
1595 md_bitmap_close_sync(struct bitmap *bitmap) md_bitmap_close_sync() argument
1612 md_bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force) md_bitmap_cond_end_sync() argument
1646 struct bitmap *bitmap = mddev->bitmap; md_bitmap_sync_with_cluster() local
1663 md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed) md_bitmap_set_memory_bits() argument
1690 md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e) md_bitmap_dirty_bits() argument
1712 struct bitmap *bitmap = mddev->bitmap; md_bitmap_flush() local
1736 md_bitmap_free(struct bitmap *bitmap) md_bitmap_free() argument
1774 struct bitmap *bitmap = mddev->bitmap; md_bitmap_wait_behind_writes() local
1788 struct bitmap *bitmap = mddev->bitmap; md_bitmap_destroy() local
1815 struct bitmap *bitmap; md_bitmap_create() local
1905 struct bitmap *bitmap = mddev->bitmap; md_bitmap_load() local
1962 struct bitmap *bitmap; get_bitmap_from_slot() local
1989 struct bitmap *bitmap; md_bitmap_copy_from_slot() local
2029 md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap) md_bitmap_status() argument
2056 md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, int chunksize, int init) md_bitmap_resize() argument
2343 struct bitmap *bitmap; location_store() local
[all...]
H A Dmd-bitmap.h3 * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003
11 /* version 4 insists the bitmap is in little-endian order
20 * in-memory bitmap:
110 * bitmap structures:
115 /* use these for bitmap->flags and bitmap->sb->state bit-fields */
117 BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */
122 /* the superblock at the front of the bitmap file -- little endian */
125 __le32 version; /* 4 the bitmap major for now, could change... */
127 __le64 events; /* 24 event counter for the bitmap (
180 struct bitmap { global() struct
[all...]
/kernel/linux/linux-6.6/drivers/vfio/
H A Diova_bitmap.c14 * struct iova_bitmap_map - A bitmap representing an IOVA range
16 * Main data structure for tracking mapped user pages of bitmap data.
24 * The user does not need to exact location of the bits in the bitmap.
26 * records the IOVA *range* in the bitmap by setting the corresponding
29 * The bitmap is an array of u64 whereas each bit represents an IOVA of
30 * range of (1 << pgshift). Thus formula for the bitmap data to be set is:
47 /* pinned pages representing the bitmap data */
52 * struct iova_bitmap - The IOVA bitmap object
54 * Main data structure for iterating over the bitmap data.
57 * It uses a windowing scheme and pins the bitmap i
103 u8 __user *bitmap; global() member
127 iova_bitmap_offset_to_index(struct iova_bitmap *bitmap, unsigned long iova) iova_bitmap_offset_to_index() argument
138 iova_bitmap_index_to_offset(struct iova_bitmap *bitmap, unsigned long index) iova_bitmap_index_to_offset() argument
149 iova_bitmap_mapped_iova(struct iova_bitmap *bitmap) iova_bitmap_mapped_iova() argument
161 iova_bitmap_get(struct iova_bitmap *bitmap) iova_bitmap_get() argument
214 iova_bitmap_put(struct iova_bitmap *bitmap) iova_bitmap_put() argument
242 struct iova_bitmap *bitmap; iova_bitmap_alloc() local
280 iova_bitmap_free(struct iova_bitmap *bitmap) iova_bitmap_free() argument
298 iova_bitmap_mapped_remaining(struct iova_bitmap *bitmap) iova_bitmap_mapped_remaining() argument
314 iova_bitmap_mapped_length(struct iova_bitmap *bitmap) iova_bitmap_mapped_length() argument
338 iova_bitmap_done(struct iova_bitmap *bitmap) iova_bitmap_done() argument
348 iova_bitmap_advance(struct iova_bitmap *bitmap) iova_bitmap_advance() argument
376 iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, iova_bitmap_fn_t fn) iova_bitmap_for_each() argument
402 iova_bitmap_set(struct iova_bitmap *bitmap, unsigned long iova, size_t length) iova_bitmap_set() argument
[all...]
/kernel/linux/linux-5.10/drivers/infiniband/hw/hns/
H A Dhns_roce_alloc.c39 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 in hns_roce_bitmap_alloc()
66 hns_roce_bitmap_free(struct hns_roce_bitmap *bitmap, unsigned long obj, int rr) hns_roce_bitmap_free() argument
72 hns_roce_bitmap_alloc_range(struct hns_roce_bitmap *bitmap, int cnt, int align, unsigned long *obj) hns_roce_bitmap_alloc_range() argument
111 hns_roce_bitmap_free_range(struct hns_roce_bitmap *bitmap, unsigned long obj, int cnt, int rr) hns_roce_bitmap_free_range() argument
130 hns_roce_bitmap_init(struct hns_roce_bitmap *bitmap, u32 num, u32 mask, u32 reserved_bot, u32 reserved_top) hns_roce_bitmap_init() argument
155 hns_roce_bitmap_cleanup(struct hns_roce_bitmap *bitmap) hns_roce_bitmap_cleanup() argument
[all...]
/kernel/linux/linux-6.6/lib/
H A Dfind_bit_benchmark.c14 * - randomly filled bitmap with approximately equal number of set and
16 * - sparse bitmap with few set bits at random positions.
29 static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata;
34 * all other tests for the same bitmap because it sets all bits of bitmap to 1.
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_first_and_bit(void *bitmap, const void *bitmap2, unsigned long len) in test_find_first_and_bit() argument
58 bitmap_copy(cp, bitmap, BITMAP_LE in test_find_first_and_bit()
71 test_find_next_bit(const void *bitmap, unsigned long len) test_find_next_bit() argument
85 test_find_next_zero_bit(const void *bitmap, unsigned long len) test_find_next_zero_bit() argument
99 test_find_last_bit(const void *bitmap, unsigned long len) test_find_last_bit() argument
118 test_find_nth_bit(const unsigned long *bitmap, unsigned long len) test_find_nth_bit() argument
134 test_find_next_and_bit(const void *bitmap, const void *bitmap2, unsigned long len) test_find_next_and_bit() argument
177 __set_bit(get_random_u32_below(BITMAP_LEN), bitmap); find_bit_test() local
[all...]
H A Didr.c2 #include <linux/bitmap.h>
334 * each entry. The XA_FREE_MARK is only cleared when all bits in the bitmap
341 * leaf bitmap before doing a radix tree lookup.
344 * leaf, instead of allocating a 128-byte bitmap, we store the bits
346 * because we can always convert them into a bitmap entry.
349 * single 128-byte bitmap, we currently switch to a 576-byte node, put
350 * the 128-byte bitmap in the first entry and then start allocating extra
352 * data as a bitmap before moving to that scheme. I do not believe this
361 * RCU head in the bitmap, which adds a 2-pointer overhead to each 128-byte
362 * bitmap, whic
386 struct ida_bitmap *bitmap, *alloc = NULL; ida_alloc_range() local
491 struct ida_bitmap *bitmap; ida_free() local
544 struct ida_bitmap *bitmap; ida_destroy() local
582 struct ida_bitmap *bitmap = entry; ida_dump_entry() local
[all...]
H A Dmemweight.c4 #include <linux/bitmap.h>
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()
/kernel/linux/linux-6.6/fs/xfs/scrub/
H A Dbitmap.h13 void xbitmap_init(struct xbitmap *bitmap);
14 void xbitmap_destroy(struct xbitmap *bitmap);
16 int xbitmap_clear(struct xbitmap *bitmap, uint64_t start, uint64_t len);
17 int xbitmap_set(struct xbitmap *bitmap, uint64_t start, uint64_t len);
18 int xbitmap_disunion(struct xbitmap *bitmap, struct xbitmap *sub);
19 uint64_t xbitmap_hweight(struct xbitmap *bitmap);
22 * Return codes for the bitmap iterator functions are 0 to continue iterating,
25 * iteration, because neither bitmap iterator ever generates that error code on
26 * its own. Callers must not modify the bitmap while walking it.
29 int xbitmap_walk(struct xbitmap *bitmap, xbitmap_walk_f
41 xagb_bitmap_init(struct xagb_bitmap *bitmap) xagb_bitmap_init() argument
46 xagb_bitmap_destroy(struct xagb_bitmap *bitmap) xagb_bitmap_destroy() argument
51 xagb_bitmap_clear(struct xagb_bitmap *bitmap, xfs_agblock_t start, xfs_extlen_t len) xagb_bitmap_clear() argument
56 xagb_bitmap_set(struct xagb_bitmap *bitmap, xfs_agblock_t start, xfs_extlen_t len) xagb_bitmap_set() argument
63 xagb_bitmap_test( struct xagb_bitmap *bitmap, xfs_agblock_t start, xfs_extlen_t *len) xagb_bitmap_test() argument
82 xagb_bitmap_disunion(struct xagb_bitmap *bitmap, struct xagb_bitmap *sub) xagb_bitmap_disunion() argument
88 xagb_bitmap_hweight(struct xagb_bitmap *bitmap) xagb_bitmap_hweight() argument
92 xagb_bitmap_empty(struct xagb_bitmap *bitmap) xagb_bitmap_empty() argument
97 xagb_bitmap_walk(struct xagb_bitmap *bitmap, xbitmap_walk_fn fn, void *priv) xagb_bitmap_walk() argument
[all...]
H A Dbitmap.c15 #include "scrub/bitmap.h"
58 /* Iterate each interval of a bitmap. Do not change the bitmap. */
59 #define for_each_xbitmap_extent(bn, bitmap) \
60 for ((bn) = rb_entry_safe(rb_first(&(bitmap)->xb_root.rb_root), \
66 /* Clear a range of this bitmap. */
69 struct xbitmap *bitmap, in xbitmap_clear()
77 while ((bn = xbitmap_tree_iter_first(&bitmap->xb_root, start, last))) { in xbitmap_clear()
82 xbitmap_tree_remove(bn, &bitmap->xb_root); in xbitmap_clear()
84 xbitmap_tree_insert(bn, &bitmap in xbitmap_clear()
68 xbitmap_clear( struct xbitmap *bitmap, uint64_t start, uint64_t len) xbitmap_clear() argument
117 xbitmap_set( struct xbitmap *bitmap, uint64_t start, uint64_t len) xbitmap_set() argument
177 xbitmap_destroy( struct xbitmap *bitmap) xbitmap_destroy() argument
190 xbitmap_init( struct xbitmap *bitmap) xbitmap_init() argument
211 xbitmap_disunion( struct xbitmap *bitmap, struct xbitmap *sub) xbitmap_disunion() argument
273 struct xagb_bitmap *bitmap = priv; xagb_bitmap_visit_btblock() local
290 xagb_bitmap_set_btblocks( struct xagb_bitmap *bitmap, struct xfs_btree_cur *cur) xagb_bitmap_set_btblocks() argument
304 xagb_bitmap_set_btcur_path( struct xagb_bitmap *bitmap, struct xfs_btree_cur *cur) xagb_bitmap_set_btcur_path() argument
322 xbitmap_hweight( struct xbitmap *bitmap) xbitmap_hweight() argument
336 xbitmap_walk( struct xbitmap *bitmap, xbitmap_walk_fn fn, void *priv) xbitmap_walk() argument
355 xbitmap_empty( struct xbitmap *bitmap) xbitmap_empty() argument
363 xbitmap_test( struct xbitmap *bitmap, uint64_t start, uint64_t *len) xbitmap_test() argument
[all...]
/kernel/linux/linux-5.10/lib/
H A Dfind_bit_benchmark.c14 * - randomly filled bitmap with approximately equal number of set and
16 * - sparse bitmap with few set bits at random positions.
29 static DECLARE_BITMAP(bitmap, BITMAP_LEN) __initdata;
34 * all other tests for the same bitmap because it sets all bits of bitmap to 1.
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_LE in test_find_next_bit()
66 test_find_next_zero_bit(const void *bitmap, unsigned long len) test_find_next_zero_bit() argument
80 test_find_last_bit(const void *bitmap, unsigned long len) test_find_last_bit() argument
99 test_find_next_and_bit(const void *bitmap, const void *bitmap2, unsigned long len) test_find_next_and_bit() argument
[all...]
H A Didr.c2 #include <linux/bitmap.h>
334 * each entry. The XA_FREE_MARK is only cleared when all bits in the bitmap
341 * leaf bitmap before doing a radix tree lookup.
344 * leaf, instead of allocating a 128-byte bitmap, we store the bits
346 * because we can always convert them into a bitmap entry.
349 * single 128-byte bitmap, we currently switch to a 576-byte node, put
350 * the 128-byte bitmap in the first entry and then start allocating extra
352 * data as a bitmap before moving to that scheme. I do not believe this
361 * RCU head in the bitmap, which adds a 2-pointer overhead to each 128-byte
362 * bitmap, whic
386 struct ida_bitmap *bitmap, *alloc = NULL; ida_alloc_range() local
491 struct ida_bitmap *bitmap; ida_free() local
544 struct ida_bitmap *bitmap; ida_destroy() local
582 struct ida_bitmap *bitmap = entry; ida_dump_entry() local
[all...]
H A Dmemweight.c4 #include <linux/bitmap.h>
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()
/kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/
H A Dalloc.c38 #include <linux/bitmap.h>
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 in mlx4_bitmap_alloc()
74 mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr) mlx4_bitmap_free() argument
79 find_aligned_range(unsigned long *bitmap, u32 start, u32 nbits, int len, int align, u32 skip_mask) find_aligned_range() argument
109 mlx4_bitmap_alloc_range(struct mlx4_bitmap *bitmap, int cnt, int align, u32 skip_mask) mlx4_bitmap_alloc_range() argument
147 mlx4_bitmap_avail(struct mlx4_bitmap *bitmap) mlx4_bitmap_avail() argument
152 mlx4_bitmap_masked_value(struct mlx4_bitmap *bitmap, u32 obj) mlx4_bitmap_masked_value() argument
157 mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt, int use_rr) mlx4_bitmap_free_range() argument
173 mlx4_bitmap_init(struct mlx4_bitmap *bitmap, u32 num, u32 mask, u32 reserved_bot, u32 reserved_top) mlx4_bitmap_init() argument
197 mlx4_bitmap_cleanup(struct mlx4_bitmap *bitmap) mlx4_bitmap_cleanup() argument
217 struct mlx4_bitmap *bitmap; global() member
241 mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc, struct mlx4_bitmap *bitmap, u32 flags, int priority, int offset, u32 *puid) mlx4_zone_add_one() argument
441 struct mlx4_bitmap *bitmap; mlx4_zone_get_bitmap() local
[all...]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx4/
H A Dalloc.c38 #include <linux/bitmap.h>
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 in mlx4_bitmap_alloc()
74 mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr) mlx4_bitmap_free() argument
79 find_aligned_range(unsigned long *bitmap, u32 start, u32 nbits, int len, int align, u32 skip_mask) find_aligned_range() argument
109 mlx4_bitmap_alloc_range(struct mlx4_bitmap *bitmap, int cnt, int align, u32 skip_mask) mlx4_bitmap_alloc_range() argument
147 mlx4_bitmap_avail(struct mlx4_bitmap *bitmap) mlx4_bitmap_avail() argument
152 mlx4_bitmap_masked_value(struct mlx4_bitmap *bitmap, u32 obj) mlx4_bitmap_masked_value() argument
157 mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt, int use_rr) mlx4_bitmap_free_range() argument
173 mlx4_bitmap_init(struct mlx4_bitmap *bitmap, u32 num, u32 mask, u32 reserved_bot, u32 reserved_top) mlx4_bitmap_init() argument
197 mlx4_bitmap_cleanup(struct mlx4_bitmap *bitmap) mlx4_bitmap_cleanup() argument
217 struct mlx4_bitmap *bitmap; global() member
241 mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc, struct mlx4_bitmap *bitmap, u32 flags, int priority, int offset, u32 *puid) mlx4_zone_add_one() argument
441 struct mlx4_bitmap *bitmap; mlx4_zone_get_bitmap() local
[all...]
/kernel/linux/linux-5.10/fs/afs/
H A Ddir_edit.c19 * There are 64 slots, which means we can load the entire bitmap into a
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[ in afs_find_contig_bits()
114 u64 bitmap; afs_dir_scan_block() local
[all...]
/kernel/linux/linux-6.6/fs/afs/
H A Ddir_edit.c19 * There are 64 slots, which means we can load the entire bitmap into a
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[ in afs_find_contig_bits()
134 u64 bitmap; afs_dir_scan_block() local
[all...]
/kernel/linux/common_modules/newip/src/common/
H A Dnip_hdr_decap.c16 unsigned char bitmap[], in _get_nip_hdr_bitmap()
34 bitmap[i] = *nbuf->data; in _get_nip_hdr_bitmap()
36 } while (bitmap[i++] & NIP_BITMAP_HAVE_MORE_BIT); in _get_nip_hdr_bitmap()
43 unsigned char bitmap, in _get_nip_hdr_ttl()
46 if (!(bitmap & NIP_BITMAP_INCLUDE_TTL)) in _get_nip_hdr_ttl()
64 unsigned char bitmap, in _get_nip_hdr_len()
67 if (!(bitmap & NIP_BITMAP_INCLUDE_HDR_LEN)) in _get_nip_hdr_len()
88 unsigned char bitmap, in _get_nip_hdr_nexthdr()
91 if (!(bitmap & NIP_BITMAP_INCLUDE_NEXT_HDR)) in _get_nip_hdr_nexthdr()
107 unsigned char bitmap, in _get_nip_hdr_daddr()
15 _get_nip_hdr_bitmap(struct nip_buff *nbuf, unsigned char bitmap[], unsigned char bitmap_index_max) _get_nip_hdr_bitmap() argument
42 _get_nip_hdr_ttl(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_hdr_ttl() argument
63 _get_nip_hdr_len(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_hdr_len() argument
87 _get_nip_hdr_nexthdr(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_hdr_nexthdr() argument
106 _get_nip_hdr_daddr(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_hdr_daddr() argument
128 _get_nip_hdr_saddr(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_hdr_saddr() argument
150 _get_nip_total_len(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _get_nip_total_len() argument
170 _nip_hdr_bitmap0_parse(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _nip_hdr_bitmap0_parse() argument
200 _nip_hdr_bitmap1_parse(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _nip_hdr_bitmap1_parse() argument
218 _nip_hdr_unknown_bit_check(struct nip_buff *nbuf, unsigned char bitmap, struct nip_hdr_decap *niph) _nip_hdr_unknown_bit_check() argument
258 unsigned char bitmap[BITMAP_MAX] = {0}; nip_hdr_parse() local
[all...]
/kernel/liteos_a/kernel/base/core/
H A Dlos_bitmap.c46 VOID LOS_BitmapSet(UINT32 *bitmap, UINT16 pos) in LOS_BitmapSet() argument
48 if (bitmap == NULL) { in LOS_BitmapSet()
52 *bitmap |= 1U << (pos & OS_BITMAP_MASK); in LOS_BitmapSet()
55 VOID LOS_BitmapClr(UINT32 *bitmap, UINT16 pos) in LOS_BitmapClr() argument
57 if (bitmap == NULL) { in LOS_BitmapClr()
61 *bitmap &= ~(1U << (pos & OS_BITMAP_MASK)); in LOS_BitmapClr()
64 UINT16 LOS_HighBitGet(UINT32 bitmap) in LOS_HighBitGet() argument
66 if (bitmap == 0) { in LOS_HighBitGet()
70 return (OS_BITMAP_MASK - CLZ(bitmap)); in LOS_HighBitGet()
73 UINT16 LOS_LowBitGet(UINT32 bitmap) in LOS_LowBitGet() argument
82 LOS_BitmapSetNBits(UINTPTR *bitmap, UINT32 start, UINT32 numsSet) LOS_BitmapSetNBits() argument
102 LOS_BitmapClrNBits(UINTPTR *bitmap, UINT32 start, UINT32 numsClear) LOS_BitmapClrNBits() argument
122 LOS_BitmapFfz(UINTPTR *bitmap, UINT32 numBits) LOS_BitmapFfz() argument
[all...]
/kernel/linux/linux-5.10/arch/powerpc/sysdev/
H A Dmsi_bitmap.c9 #include <linux/bitmap.h>
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()
65 * @bmp: pointer to the MSI bitmap.
69 * are reserved in the bitmap.
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()
120 pr_debug("msi_bitmap: allocator bitmap siz in msi_bitmap_alloc()
[all...]
/kernel/linux/linux-6.6/arch/powerpc/sysdev/
H A Dmsi_bitmap.c9 #include <linux/bitmap.h>
22 offset = bitmap_find_next_zero_area(bmp->bitmap, bmp->irq_count, 0, in msi_bitmap_alloc_hwirqs()
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()
66 * @bmp: pointer to the MSI bitmap.
70 * are reserved in the bitmap.
96 bitmap_allocate_region(bmp->bitmap, 0, get_count_order(bmp->irq_count)); in msi_bitmap_reserve_dt_hwirqs()
104 bitmap_release_region(bmp->bitmap, *p + j, 0); in msi_bitmap_reserve_dt_hwirqs()
121 pr_debug("msi_bitmap: allocator bitmap siz in msi_bitmap_alloc()
[all...]
/kernel/linux/linux-5.10/fs/xfs/scrub/
H A Dbitmap.h19 void xbitmap_init(struct xbitmap *bitmap);
20 void xbitmap_destroy(struct xbitmap *bitmap);
22 #define for_each_xbitmap_extent(bex, n, bitmap) \
23 list_for_each_entry_safe((bex), (n), &(bitmap)->list, list)
25 #define for_each_xbitmap_block(b, bex, n, bitmap) \
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 Dbitmap.c13 #include "scrub/bitmap.h"
16 * Set a range of this bitmap. Caller must ensure the range is not set.
18 * This is the logical equivalent of bitmap |= mask(start, len).
22 struct xbitmap *bitmap, in xbitmap_set()
35 list_add_tail(&bmr->list, &bitmap->list); in xbitmap_set()
40 /* Free everything related to this bitmap. */
43 struct xbitmap *bitmap) in xbitmap_destroy()
48 for_each_xbitmap_extent(bmr, n, bitmap) { in xbitmap_destroy()
54 /* Set up a per-AG block bitmap. */
57 struct xbitmap *bitmap) in xbitmap_init()
21 xbitmap_set( struct xbitmap *bitmap, uint64_t start, uint64_t len) xbitmap_set() argument
42 xbitmap_destroy( struct xbitmap *bitmap) xbitmap_destroy() argument
56 xbitmap_init( struct xbitmap *bitmap) xbitmap_init() argument
99 xbitmap_disunion( struct xbitmap *bitmap, struct xbitmap *sub) xbitmap_disunion() argument
250 xbitmap_set_btcur_path( struct xbitmap *bitmap, struct xfs_btree_cur *cur) xbitmap_set_btcur_path() argument
279 struct xbitmap *bitmap = priv; xbitmap_collect_btblock() local
293 xbitmap_set_btblocks( struct xbitmap *bitmap, struct xfs_btree_cur *cur) xbitmap_set_btblocks() argument
303 xbitmap_hweight( struct xbitmap *bitmap) xbitmap_hweight() argument
[all...]
/kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx5/core/steering/
H A Ddr_buddy.c19 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()
34 buddy->bitmap[i] = bitmap_zalloc(size, GFP_KERNEL); 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()
[all...]

Completed in 14 milliseconds

12345678910>>...49