| /kernel/linux/linux-6.6/drivers/md/ |
| D | md-bitmap.c | 3 * 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->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() [all …]
|
| D | md-bitmap.h | 3 * 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 (1)*/ 130 __le32 state; /* 48 bitmap state information */ [all …]
|
| /kernel/linux/linux-5.10/drivers/md/ |
| D | md-bitmap.c | 3 * 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->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() [all …]
|
| D | md-bitmap.h | 3 * 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 (1)*/ 130 __le32 state; /* 48 bitmap state information */ [all …]
|
| /kernel/linux/linux-6.6/drivers/vfio/ |
| D | iova_bitmap.c | 14 * 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 in relatively [all …]
|
| /kernel/linux/linux-5.10/drivers/infiniband/hw/hns/ |
| 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 …]
|
| /kernel/linux/linux-6.6/fs/xfs/scrub/ |
| D | bitmap.h | 13 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_fn fn, [all …]
|
| D | bitmap.c | 15 #include "scrub/bitmap.h" 58 /* Iterate each interval of a bitmap. Do not change the bitmap. */ in INTERVAL_TREE_DEFINE() 59 #define for_each_xbitmap_extent(bn, bitmap) \ in INTERVAL_TREE_DEFINE() argument 60 for ((bn) = rb_entry_safe(rb_first(&(bitmap)->xb_root.rb_root), \ in INTERVAL_TREE_DEFINE() 66 /* Clear a range of this bitmap. */ 69 struct xbitmap *bitmap, 77 while ((bn = xbitmap_tree_iter_first(&bitmap->xb_root, start, last))) { 82 xbitmap_tree_remove(bn, &bitmap->xb_root); 84 xbitmap_tree_insert(bn, &bitmap->xb_root); 93 xbitmap_tree_insert(new_bn, &bitmap->xb_root); [all …]
|
| /kernel/linux/linux-6.6/lib/ |
| D | find_bit_benchmark.c | 14 * - 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_LEN); in test_find_first_and_bit() 71 static int __init test_find_next_bit(const void *bitmap, unsigned long len) in test_find_next_bit() argument [all …]
|
| D | bitmap.c | 3 * lib/bitmap.c 4 * Helper functions for bitmap.h. 7 #include <linux/bitmap.h> 26 * DOC: bitmap introduction 30 * given bitmap does _not_ need to be an exact multiple of 34 * of a bitmap are 'don't care'. The implementation makes 37 * The bitmap operations that return Boolean (bitmap_empty, 93 * __bitmap_shift_right - logical right shift of the bits in a bitmap 94 * @dst : destination bitmap 95 * @src : source bitmap [all …]
|
| D | idr.c | 2 #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, which is excessive. [all …]
|
| /kernel/linux/linux-6.6/drivers/net/ethernet/mellanox/mlx4/ |
| D | alloc.c | 38 #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->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() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/mellanox/mlx4/ |
| D | alloc.c | 38 #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->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() [all …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | find_bit_benchmark.c | 14 * - 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_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 [all …]
|
| D | idr.c | 2 #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, which is excessive. [all …]
|
| D | bitmap.c | 3 * lib/bitmap.c 4 * Helper functions for bitmap.h. 7 #include <linux/bitmap.h> 26 * DOC: bitmap introduction 30 * given bitmap does _not_ need to be an exact multiple of 34 * of a bitmap are 'don't care'. The implementation makes 37 * The bitmap operations that return Boolean (bitmap_empty, 93 * __bitmap_shift_right - logical right shift of the bits in a bitmap 94 * @dst : destination bitmap 95 * @src : source bitmap [all …]
|
| /kernel/linux/linux-5.10/fs/afs/ |
| D | dir_edit.c | 19 * 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[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() [all …]
|
| /kernel/linux/linux-6.6/fs/afs/ |
| D | dir_edit.c | 19 * 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[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() [all …]
|
| /kernel/linux/linux-5.10/fs/xfs/scrub/ |
| D | bitmap.c | 13 #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() argument 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() argument 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() argument [all …]
|
| /kernel/linux/common_modules/newip/src/common/ |
| D | nip_hdr_decap.c | 16 unsigned char bitmap[], in _get_nip_hdr_bitmap() argument 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() argument 46 if (!(bitmap & NIP_BITMAP_INCLUDE_TTL)) in _get_nip_hdr_ttl() 64 unsigned char bitmap, in _get_nip_hdr_len() argument 67 if (!(bitmap & NIP_BITMAP_INCLUDE_HDR_LEN)) in _get_nip_hdr_len() 88 unsigned char bitmap, in _get_nip_hdr_nexthdr() argument 91 if (!(bitmap & NIP_BITMAP_INCLUDE_NEXT_HDR)) in _get_nip_hdr_nexthdr() 107 unsigned char bitmap, in _get_nip_hdr_daddr() argument [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/sysdev/ |
| D | msi_bitmap.c | 9 #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 size is 0x%x bytes\n", size); in msi_bitmap_alloc() [all …]
|
| /kernel/linux/linux-5.10/arch/powerpc/sysdev/ |
| D | msi_bitmap.c | 9 #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 size is 0x%x bytes\n", size); in msi_bitmap_alloc() [all …]
|
| /kernel/linux/linux-5.10/fs/btrfs/tests/ |
| D | free-space-tests.c | 95 test_msg("running bitmap only tests"); in test_bitmaps() 99 test_err("couldn't create a bitmap entry %d", ret); in test_bitmaps() 105 test_err("error removing bitmap full range %d", ret); in test_bitmaps() 110 test_err("left some space in bitmap"); in test_bitmaps() 116 test_err("couldn't add to our bitmap entry %d", ret); in test_bitmaps() 127 * The first bitmap we have starts at offset 0 so the next one is just in test_bitmaps() 128 * at the end of the first bitmap. in test_bitmaps() 164 test_msg("running bitmap and extent tests"); in test_bitmaps_and_extents() 168 * bitmap, but the free space completely in the extent and then in test_bitmaps_and_extents() 169 * completely in the bitmap. in test_bitmaps_and_extents() [all …]
|
| /kernel/linux/linux-6.6/fs/ntfs/ |
| D | bitmap.h | 3 * bitmap.h - Defines for NTFS kernel bitmap handling. Part of the Linux-NTFS 22 * ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value 23 * @vi: vfs inode describing the bitmap 28 * Set @count bits starting at bit @start_bit in the bitmap described by the 41 * ntfs_bitmap_set_run - set a run of bits in a bitmap 42 * @vi: vfs inode describing the bitmap 46 * Set @count bits starting at bit @start_bit in the bitmap described by the 58 * ntfs_bitmap_clear_run - clear a run of bits in a bitmap 59 * @vi: vfs inode describing the bitmap 63 * Clear @count bits starting at bit @start_bit in the bitmap described by the [all …]
|
| /kernel/linux/linux-5.10/fs/ntfs/ |
| D | bitmap.h | 3 * bitmap.h - Defines for NTFS kernel bitmap handling. Part of the Linux-NTFS 22 * ntfs_bitmap_set_bits_in_run - set a run of bits in a bitmap to a value 23 * @vi: vfs inode describing the bitmap 28 * Set @count bits starting at bit @start_bit in the bitmap described by the 41 * ntfs_bitmap_set_run - set a run of bits in a bitmap 42 * @vi: vfs inode describing the bitmap 46 * Set @count bits starting at bit @start_bit in the bitmap described by the 58 * ntfs_bitmap_clear_run - clear a run of bits in a bitmap 59 * @vi: vfs inode describing the bitmap 63 * Clear @count bits starting at bit @start_bit in the bitmap described by the [all …]
|