Home
last modified time | relevance | path

Searched full:bitmap (Results 1 – 25 of 1661) sorted by relevance

12345678910>>...67

/Linux-v6.1/drivers/md/
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->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 …]
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 (1)*/
130 __le32 state; /* 48 bitmap state information */
[all …]
/Linux-v6.1/drivers/vfio/
Diova_bitmap.c13 * struct iova_bitmap_map - A bitmap representing an IOVA range
15 * Main data structure for tracking mapped user pages of bitmap data.
23 * The user does not need to exact location of the bits in the bitmap.
25 * records the IOVA *range* in the bitmap by setting the corresponding
28 * The bitmap is an array of u64 whereas each bit represents an IOVA of
29 * range of (1 << pgshift). Thus formula for the bitmap data to be set is:
46 /* pinned pages representing the bitmap data */
51 * struct iova_bitmap - The IOVA bitmap object
53 * Main data structure for iterating over the bitmap data.
56 * It uses a windowing scheme and pins the bitmap in relatively
[all …]
/Linux-v6.1/lib/
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_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 …]
Dbitmap.c3 * 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 …]
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, which is excessive.
[all …]
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()
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx4/
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->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 …]
/Linux-v6.1/fs/afs/
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[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 …]
/Linux-v6.1/fs/xfs/scrub/
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() 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 …]
Dbitmap.h19 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 …]
/Linux-v6.1/arch/powerpc/sysdev/
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 size is 0x%x bytes\n", size); in msi_bitmap_alloc()
[all …]
/Linux-v6.1/fs/ntfs/
Dbitmap.h3 * 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 …]
/Linux-v6.1/drivers/gpu/drm/panfrost/
Dpanfrost_regs.h87 #define GPU_SHADER_PRESENT_LO 0x100 /* (RO) Shader core present bitmap, low word */
88 #define GPU_SHADER_PRESENT_HI 0x104 /* (RO) Shader core present bitmap, high word */
89 #define GPU_TILER_PRESENT_LO 0x110 /* (RO) Tiler core present bitmap, low word */
90 #define GPU_TILER_PRESENT_HI 0x114 /* (RO) Tiler core present bitmap, high word */
92 #define GPU_L2_PRESENT_LO 0x120 /* (RO) Level 2 cache present bitmap, low word */
93 #define GPU_L2_PRESENT_HI 0x124 /* (RO) Level 2 cache present bitmap, high word */
99 #define GPU_STACK_PRESENT_LO 0xE00 /* (RO) Core stack present bitmap, low word */
100 #define GPU_STACK_PRESENT_HI 0xE04 /* (RO) Core stack present bitmap, high word */
102 #define SHADER_READY_LO 0x140 /* (RO) Shader core ready bitmap, low word */
103 #define SHADER_READY_HI 0x144 /* (RO) Shader core ready bitmap, high word */
[all …]
/Linux-v6.1/fs/btrfs/tests/
Dfree-space-tests.c95 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 …]
/Linux-v6.1/include/linux/
Dbitmap.h18 * longs. The bitmap interface and available operations are listed
19 * here, in bitmap.h
22 * lib/bitmap.c. Functions implementations that are architecture
26 * See lib/bitmap.c for more details.
30 * DOC: bitmap overview
32 * The available bitmap operations and their rough meaning in the
33 * case that the bitmap is a single unsigned long are thus:
54 * bitmap_weight_and(src1, src2, nbits) Hamming Weight of and'ed bitmap
67 * bitmap_parse(buf, buflen, dst, nbits) Parse bitmap dst from kernel buf
68 * bitmap_parse_user(ubuf, ulen, dst, nbits) Parse bitmap dst from user buf
[all …]
Dsbitmap.h42 * struct sbitmap - Scalable bitmap.
49 * @depth: Number of bits used in the whole bitmap.
59 * @map_nr: Number of words (cachelines) being used for the bitmap.
69 * @map: Allocated bitmap.
101 * struct sbitmap_queue - Scalable bitmap with the added ability to wait on free
111 * @sb: Scalable bitmap.
145 * @sb: Bitmap to initialize.
147 * @shift: Use 2^@shift bits per word in the bitmap; if a negative number if
172 * @sb: Bitmap to free.
183 * @sb: Bitmap to resize.
[all …]
/Linux-v6.1/drivers/block/drbd/
Ddrbd_bitmap.c15 #include <linux/bitmap.h>
41 * 1 << (38 - 3) bitmap bytes needed
43 * (that's 32 GiB of bitmap for 1 PiB storage)
52 * 22 --> we need that much 4KiB pages of bitmap.
61 * bitmap storage and IO:
62 * Bitmap is stored little endian on disk, and is kept little endian in
63 * core memory. Currently we still hold the full bitmap in core as long
67 * We plan to reduce the amount of in-core bitmap pages by paging them in
115 struct drbd_bitmap *b = device->bitmap; in __bm_print_lock_info()
118 drbd_err(device, "FIXME %s[%d] in %s, bitmap locked for '%s' by %s[%d]\n", in __bm_print_lock_info()
[all …]
/Linux-v6.1/fs/hfs/
Dbitmap.c2 * linux/fs/hfs/bitmap.c
10 * This file contains the code to modify the volume bitmap:
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()
116 * Search for 'num_bits' consecutive cleared bits in the bitmap blocks of
127 * returned range. If the bitmap is fragmented, this will be less than
141 void *bitmap; in hfs_vbm_search_free() local
[all …]
/Linux-v6.1/drivers/net/ethernet/mellanox/mlx5/core/steering/
Ddr_buddy.c21 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()
36 buddy->bitmap[i] = bitmap_zalloc(size, GFP_KERNEL); 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()
[all …]
/Linux-v6.1/fs/reiserfs/
Dresize.c23 struct reiserfs_bitmap_info *bitmap; in reiserfs_resize() local
63 …("reiserfs_resize: unable to resize a reiserfs without distributed bitmap (fs version < 3.5.12)\n"… in reiserfs_resize()
67 /* count used bits in last bitmap block */ in reiserfs_resize()
71 /* count bitmap blocks in new fs */ in reiserfs_resize()
93 * the bitmap node pointers from the old journal bitmap in reiserfs_resize()
119 * allocate additional bitmap blocks, reallocate in reiserfs_resize()
120 * array of bitmap block pointers in reiserfs_resize()
122 bitmap = in reiserfs_resize()
125 if (!bitmap) { in reiserfs_resize()
134 bitmap[i] = old_bitmap[i]; in reiserfs_resize()
[all …]
/Linux-v6.1/drivers/s390/cio/
Didset.c8 #include <linux/bitmap.h>
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-v6.1/arch/x86/kernel/
Dioport.c3 * This contains the io-permission bitmap code - written by obz, with changes
9 #include <linux/bitmap.h>
27 * Take a refcount on current's bitmap. It can be used by in io_bitmap_share()
28 * both tasks as long as none of them changes the bitmap. in io_bitmap_share()
63 * This changes the io permissions bitmap in the current task.
79 * IO bitmap up. ioperm() is much less timing critical than clone(), in ksys_ioperm()
84 /* No point to allocate a bitmap just to clear permissions */ in ksys_ioperm()
91 memset(iobm->bitmap, 0xff, sizeof(iobm->bitmap)); in ksys_ioperm()
96 * If the bitmap is not shared, then nothing can take a refcount as in ksys_ioperm()
109 * Store the bitmap pointer (might be the same if the task already in ksys_ioperm()
[all …]
/Linux-v6.1/net/ethtool/
Dbitset.c4 #include <linux/bitmap.h>
26 * ethnl_bitmap32_clear() - Clear u32 based bitmap
27 * @dst: bitmap to clear
30 * @mod: set if bitmap was modified
32 * Clear @nbits bits of a bitmap with indices @start <= i < @end
79 * @map: bitmap to test
116 * ethnl_bitmap32_update() - Modify u32 based bitmap according to value/mask
118 * @dst: bitmap to update
119 * @nbits: bit size of the bitmap
122 * @mod: set to true if bitmap is modified, preserve if not
[all …]
/Linux-v6.1/fs/ocfs2/
Dreservations.h45 * bitmap is provided. */
75 * ocfs2_resmap_init() - Initialize fields of a reservations bitmap
83 * ocfs2_resmap_restart() - "restart" a reservation bitmap
84 * @resmap: reservations bitmap
85 * @clen: Number of valid bits in the bitmap
86 * @disk_bitmap: the disk bitmap this resmap should refer to.
88 * Re-initialize the parameters of a reservation bitmap. This is
93 * reservations based on the new bitmap.
99 * ocfs2_resmap_uninit() - uninitialize a reservation bitmap structure
106 * @resmap: reservations bitmap
[all …]

12345678910>>...67