| /linux/drivers/md/ |
| H A 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 34 #include "md-bitmap.h" 38 * in-memory bitmap: 126 * bitmap structures: 129 /* the in-memory bitmap i 152 struct bitmap { global() struct 154 bitmap_countsbitmap global() argument 167 mddevbitmap global() argument 172 bitmap_storagebitmap global() argument 175 need_syncbitmap global() argument 197 behind_writes_usedbitmap global() argument 202 daemon_lastrunbitmap global() argument 207 last_end_syncbitmap global() argument 221 cluster_slotbitmap global() argument 224 bmname(struct bitmap * bitmap) bmname() argument 231 struct bitmap *bitmap = data; bitmap_enabled() local 254 md_bitmap_checkpage(struct bitmap_counts * bitmap,unsigned long page,int create,int no_hijack) md_bitmap_checkpage() argument 316 md_bitmap_checkfree(struct bitmap_counts * bitmap,unsigned long page) md_bitmap_checkfree() argument 428 __write_sb_page(struct md_rdev * rdev,struct bitmap * bitmap,unsigned long pg_index,struct page * page) __write_sb_page() argument 485 write_sb_page(struct bitmap * bitmap,unsigned long pg_index,struct page * page,bool wait) write_sb_page() argument 509 struct bitmap *bitmap = bh->b_private; end_bitmap_write() local 517 write_file_page(struct bitmap * bitmap,struct page * page,int wait) write_file_page() argument 559 read_file_page(struct file * file,unsigned long index,struct bitmap * bitmap,unsigned long count,struct page * page) read_file_page() argument 620 write_file_page(struct bitmap * bitmap,struct page * page,int wait) write_file_page() argument 624 read_file_page(struct file * file,unsigned long index,struct bitmap * bitmap,unsigned long count,struct page * page) read_file_page() argument 641 filemap_write_page(struct bitmap * bitmap,unsigned long pg_index,bool wait) filemap_write_page() argument 663 md_bitmap_wait_writes(struct bitmap * bitmap) md_bitmap_wait_writes() argument 684 struct bitmap *bitmap = data; bitmap_update_sb() local 721 bitmap_print_sb(struct bitmap * bitmap) bitmap_print_sb() argument 760 md_bitmap_new_disk_sb(struct bitmap * bitmap) md_bitmap_new_disk_sb() argument 819 md_bitmap_read_sb(struct bitmap * bitmap) md_bitmap_read_sb() argument 1097 md_bitmap_file_kick(struct bitmap * bitmap) md_bitmap_file_kick() argument 1119 set_page_attr(struct bitmap * bitmap,int pnum,enum bitmap_page_attr attr) set_page_attr() argument 1125 clear_page_attr(struct bitmap * bitmap,int pnum,enum bitmap_page_attr attr) clear_page_attr() argument 1131 test_page_attr(struct bitmap * bitmap,int pnum,enum bitmap_page_attr attr) test_page_attr() argument 1137 test_and_clear_page_attr(struct bitmap * bitmap,int pnum,enum bitmap_page_attr attr) test_and_clear_page_attr() argument 1150 md_bitmap_file_set_bit(struct bitmap * bitmap,sector_t block) md_bitmap_file_set_bit() argument 1181 md_bitmap_file_clear_bit(struct bitmap * bitmap,sector_t block) md_bitmap_file_clear_bit() argument 1211 md_bitmap_file_test_bit(struct bitmap * bitmap,sector_t block) md_bitmap_file_test_bit() argument 1235 __bitmap_unplug(struct bitmap * bitmap) __bitmap_unplug() argument 1270 struct bitmap *bitmap; global() member 1283 bitmap_unplug_async(struct bitmap * bitmap) bitmap_unplug_async() argument 1299 struct bitmap *bitmap = mddev->bitmap; bitmap_unplug() local 1323 md_bitmap_init_from_disk(struct bitmap * bitmap,sector_t start) md_bitmap_init_from_disk() argument 1449 struct bitmap *bitmap = mddev->bitmap; bitmap_write_all() local 1463 md_bitmap_count_page(struct bitmap_counts * bitmap,sector_t offset,int inc) md_bitmap_count_page() argument 1472 md_bitmap_set_pending(struct bitmap_counts * bitmap,sector_t offset) md_bitmap_set_pending() argument 1510 struct bitmap *bitmap; bitmap_daemon_work() local 1629 md_bitmap_get_counter(struct bitmap_counts * bitmap,sector_t offset,sector_t * blocks,int create) md_bitmap_get_counter() argument 1682 struct bitmap *bitmap = mddev->bitmap; bitmap_start_write() local 1743 struct bitmap *bitmap = mddev->bitmap; bitmap_end_write() local 1788 __bitmap_start_sync(struct bitmap * bitmap,sector_t offset,sector_t * blocks,bool degraded) __bitmap_start_sync() argument 1837 __bitmap_end_sync(struct bitmap * bitmap,sector_t offset,sector_t * blocks,bool aborted) __bitmap_end_sync() argument 1878 struct bitmap *bitmap = mddev->bitmap; bitmap_close_sync() local 1894 struct bitmap *bitmap = mddev->bitmap; bitmap_cond_end_sync() local 1924 struct bitmap *bitmap = mddev->bitmap; bitmap_sync_with_cluster() local 1940 md_bitmap_set_memory_bits(struct bitmap * bitmap,sector_t offset,int needed) md_bitmap_set_memory_bits() argument 1971 struct bitmap *bitmap = mddev->bitmap; bitmap_dirty_bits() local 1992 struct bitmap *bitmap = mddev->bitmap; bitmap_flush() local 2017 struct bitmap *bitmap = data; md_bitmap_free() local 2051 struct bitmap *bitmap = mddev->bitmap; bitmap_start_behind_write() local 2065 struct bitmap *bitmap = mddev->bitmap; bitmap_end_behind_write() local 2076 struct bitmap *bitmap = mddev->bitmap; bitmap_wait_behind_writes() local 2090 struct bitmap *bitmap = mddev->bitmap; bitmap_destroy() local 2116 struct bitmap *bitmap; __bitmap_create() local 2204 struct bitmap *bitmap = __bitmap_create(mddev, -1); bitmap_create() local 2218 struct bitmap *bitmap = mddev->bitmap; bitmap_load() local 2274 struct bitmap *bitmap; bitmap_get_from_slot() local 2300 struct bitmap *bitmap; bitmap_copy_from_slot() local 2340 struct bitmap *bitmap = data; bitmap_set_pages() local 2349 struct bitmap *bitmap = data; bitmap_get_stats() local 2374 __bitmap_resize(struct bitmap * bitmap,sector_t blocks,int chunksize,bool init) __bitmap_resize() argument 2584 struct bitmap *bitmap = mddev->bitmap; bitmap_resize() local 2765 struct bitmap *bitmap; space_store() local 2954 struct bitmap *bitmap; can_clear_show() local 2969 struct bitmap *bitmap = mddev->bitmap; can_clear_store() local 2996 struct bitmap *bitmap; behind_writes_used_show() local 3012 struct bitmap *bitmap = mddev->bitmap; behind_writes_used_reset() local [all...] |
| H A D | md-bitmap.h | 3 * bitmap.h: Copyright (C) Peter T. Breuer (ptb@ot.uc3m.es) 2003 22 /* version 6 is only used for lockless bitmap */ 25 /* use these for bitmap->flags and bitmap->sb->state bit-fields */ 27 BITMAP_STALE = 1, /* the bitmap file is out of date or had -EIO */ 36 /* the superblock at the front of the bitmap file -- little endian */ 39 __le32 version; /* 4 the bitmap major for now, could change... */ 41 __le64 events; /* 24 event counter for the bitmap (1)*/ 44 __le32 state; /* 48 bitmap state information */ 45 __le32 chunksize; /* 52 the bitmap chunk size in bytes */ 49 * reserved for the bitmap. */ [all …]
|
| /linux/drivers/iommu/iommufd/ |
| H A 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: 50 /* pinned pages representing the bitmap data */ 55 * struct iova_bitmap - The IOVA bitmap object 57 * Main data structure for iterating over the bitmap data. 60 * It uses a windowing scheme and pins the bitmap i 106 u8 __user *bitmap; global() member 130 iova_bitmap_offset_to_index(struct iova_bitmap * bitmap,unsigned long iova) iova_bitmap_offset_to_index() argument 140 iova_bitmap_index_to_offset(struct iova_bitmap * bitmap,unsigned long index) iova_bitmap_index_to_offset() argument 151 iova_bitmap_mapped_iova(struct iova_bitmap * bitmap) iova_bitmap_mapped_iova() argument 165 iova_bitmap_get(struct iova_bitmap * bitmap) iova_bitmap_get() argument 219 iova_bitmap_put(struct iova_bitmap * bitmap) iova_bitmap_put() argument 247 struct iova_bitmap *bitmap; iova_bitmap_alloc() local 283 iova_bitmap_free(struct iova_bitmap * bitmap) iova_bitmap_free() argument 302 iova_bitmap_mapped_remaining(struct iova_bitmap * bitmap) iova_bitmap_mapped_remaining() argument 318 iova_bitmap_mapped_length(struct iova_bitmap * bitmap) iova_bitmap_mapped_length() argument 355 iova_bitmap_advance_to(struct iova_bitmap * bitmap,unsigned long iova) iova_bitmap_advance_to() argument 384 iova_bitmap_for_each(struct iova_bitmap * bitmap,void * opaque,iova_bitmap_fn_t fn) iova_bitmap_for_each() argument 401 iova_bitmap_set(struct iova_bitmap * bitmap,unsigned long iova,size_t length) iova_bitmap_set() argument [all...] |
| /linux/fs/xfs/scrub/ |
| H A D | bitmap.c | 15 #include "scrub/bitmap.h" 19 /* u64 bitmap */ 61 /* Iterate each interval of a bitmap. Do not change the bitmap. */ in INTERVAL_TREE_DEFINE() 62 #define for_each_xbitmap64_extent(bn, bitmap) \ in INTERVAL_TREE_DEFINE() argument 63 for ((bn) = rb_entry_safe(rb_first(&(bitmap)->xb_root.rb_root), \ in INTERVAL_TREE_DEFINE() 69 /* Clear a range of this bitmap. */ 72 struct xbitmap64 *bitmap, 83 while ((bn = xbitmap64_tree_iter_first(&bitmap->xb_root, start, last))) { 88 xbitmap64_tree_remove(bn, &bitmap 121 xbitmap64_set(struct xbitmap64 * bitmap,uint64_t start,uint64_t len) xbitmap64_set() argument 186 xbitmap64_destroy(struct xbitmap64 * bitmap) xbitmap64_destroy() argument 199 xbitmap64_init(struct xbitmap64 * bitmap) xbitmap64_init() argument 220 xbitmap64_disunion(struct xbitmap64 * bitmap,struct xbitmap64 * sub) xbitmap64_disunion() argument 242 xbitmap64_hweight(struct xbitmap64 * bitmap) xbitmap64_hweight() argument 256 xbitmap64_walk(struct xbitmap64 * bitmap,xbitmap64_walk_fn fn,void * priv) xbitmap64_walk() argument 275 xbitmap64_empty(struct xbitmap64 * bitmap) xbitmap64_empty() argument 283 xbitmap64_test(struct xbitmap64 * bitmap,uint64_t start,uint64_t * len) xbitmap64_test() argument 342 for_each_xbitmap32_extent(bn,bitmap) INTERVAL_TREE_DEFINE() argument 401 xbitmap32_set(struct xbitmap32 * bitmap,uint32_t start,uint32_t len) xbitmap32_set() argument 466 xbitmap32_destroy(struct xbitmap32 * bitmap) xbitmap32_destroy() argument 479 xbitmap32_init(struct xbitmap32 * bitmap) xbitmap32_init() argument 500 xbitmap32_disunion(struct xbitmap32 * bitmap,struct xbitmap32 * sub) xbitmap32_disunion() argument 522 xbitmap32_hweight(struct xbitmap32 * bitmap) xbitmap32_hweight() argument 536 xbitmap32_walk(struct xbitmap32 * bitmap,xbitmap32_walk_fn fn,void * priv) xbitmap32_walk() argument 555 xbitmap32_empty(struct xbitmap32 * bitmap) xbitmap32_empty() argument 563 xbitmap32_test(struct xbitmap32 * bitmap,uint32_t start,uint32_t * len) xbitmap32_test() argument 585 xbitmap32_count_set_regions(struct xbitmap32 * bitmap) xbitmap32_count_set_regions() argument [all...] |
| H A D | bitmap.h | 9 /* u64 bitmap */ 15 void xbitmap64_init(struct xbitmap64 *bitmap); 16 void xbitmap64_destroy(struct xbitmap64 *bitmap); 18 int xbitmap64_clear(struct xbitmap64 *bitmap, uint64_t start, uint64_t len); 19 int xbitmap64_set(struct xbitmap64 *bitmap, uint64_t start, uint64_t len); 20 int xbitmap64_disunion(struct xbitmap64 *bitmap, struct xbitmap64 *sub); 21 uint64_t xbitmap64_hweight(struct xbitmap64 *bitmap); 24 * Return codes for the bitmap iterator functions are 0 to continue iterating, 27 * iteration, because neither bitmap iterator ever generates that error code on 28 * its own. Callers must not modify the bitmap while walking it. [all …]
|
| H A D | agb_bitmap.h | 15 static inline void xagb_bitmap_init(struct xagb_bitmap *bitmap) in xagb_bitmap_init() argument 17 xbitmap32_init(&bitmap->agbitmap); in xagb_bitmap_init() 20 static inline void xagb_bitmap_destroy(struct xagb_bitmap *bitmap) in xagb_bitmap_destroy() argument 22 xbitmap32_destroy(&bitmap->agbitmap); in xagb_bitmap_destroy() 25 static inline int xagb_bitmap_clear(struct xagb_bitmap *bitmap, in xagb_bitmap_clear() argument 28 return xbitmap32_clear(&bitmap->agbitmap, start, len); in xagb_bitmap_clear() 30 static inline int xagb_bitmap_set(struct xagb_bitmap *bitmap, in xagb_bitmap_set() argument 33 return xbitmap32_set(&bitmap->agbitmap, start, len); in xagb_bitmap_set() 36 static inline bool xagb_bitmap_test(struct xagb_bitmap *bitmap, in xagb_bitmap_test() argument 39 return xbitmap32_test(&bitmap->agbitmap, start, len); in xagb_bitmap_test() [all …]
|
| /linux/drivers/net/ethernet/mellanox/mlx4/ |
| H A 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 …]
|
| /linux/lib/ |
| H A 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; 35 static int __init test_find_first_bit(const void *bitmap, unsigned long len) in test_find_first_bit() argument 41 bitmap_copy(cp, bitmap, BITMAP_LEN); in test_find_first_bit() 54 static int __init test_find_first_and_bit(const void *bitmap, const void *bitmap2, in test_find_first_and_bit() argument 61 bitmap_copy(cp, bitmap, BITMAP_LEN); in test_find_first_and_bit() 74 static int __init test_find_next_bit(const void *bitmap, unsigned long len) in test_find_next_bit() argument 81 i = find_next_bit(bitmap, BITMAP_LEN, i) + 1; in test_find_next_bit() 88 static int __init test_find_next_zero_bit(const void *bitmap, unsigned long len) in test_find_next_zero_bit() argument [all …]
|
| H A D | idr.c | 2 #include <linux/bitmap.h> 336 * each entry. The XA_FREE_MARK is only cleared when all bits in the bitmap 343 * leaf bitmap before doing a radix tree lookup. 346 * leaf, instead of allocating a 128-byte bitmap, we store the bits 348 * because we can always convert them into a bitmap entry. 351 * single 128-byte bitmap, we currently switch to a 576-byte node, put 352 * the 128-byte bitmap in the first entry and then start allocating extra 354 * data as a bitmap before moving to that scheme. I do not believe this 363 * RCU head in the bitmap, which adds a 2-pointer overhead to each 128-byte 364 * bitmap, which is excessive. [all …]
|
| H A D | bitmap.c | 3 * lib/bitmap.c 4 * Helper functions for bitmap.h. 7 #include <linux/bitmap.h> 15 * DOC: bitmap introduction 19 * given bitmap does _not_ need to be an exact multiple of 23 * of a bitmap are 'don't care'. The implementation makes 26 * The bitmap operations that return Boolean (bitmap_empty, 83 * __bitmap_shift_right - logical right shift of the bits in a bitmap 84 * @dst : destination bitmap 85 * @src : source bitmap [all …]
|
| H A D | bitmap-str.c | 3 #include <linux/bitmap.h> 17 * bitmap_parse_user - convert an ASCII hex string in a user buffer into a bitmap 22 * @maskp: pointer to bitmap array that will contain result. 23 * @nmaskbits: size of bitmap, in bits. 44 * bitmap_print_to_buf - convert bitmap to list or hex format ASCII string 45 * @list: indicates whether the bitmap must be list 49 * @maskp: pointer to bitmap to convert 50 * @nmaskbits: size of bitmap, in bits 72 * bitmap_print_bitmask_to_buf - convert bitmap to hex bitmask format ASCII string 74 * @maskp: pointer to bitmap t 187 bitmap_set_region(const struct region * r,unsigned long * bitmap) bitmap_set_region() argument 445 u32 *bitmap = (u32 *)maskp; bitmap_parse() local [all...] |
| /linux/tools/testing/selftests/bpf/libarena/selftests/ |
| H A D | test_parallel_bitmap.bpf.c | 8 #include <libarena/bitmap.h> 16 static struct arena_bitmap __arena *bitmap; 60 * odds. Both should be able to operate on the bitmap oblivious of the 66 if (bmp_test_and_clear_bit(bit, bitmap)) in bitmap_test_bit_sequence() 69 if (bmp_test_and_set_bit(bit, bitmap)) in bitmap_test_bit_sequence() 71 if (!bmp_test_bit(bit, bitmap)) in bitmap_test_bit_sequence() 74 if (!bmp_test_and_set_bit(bit, bitmap)) in bitmap_test_bit_sequence() 76 if (!bmp_test_bit(bit, bitmap)) in bitmap_test_bit_sequence() 79 if (!bmp_test_and_clear_bit(bit, bitmap)) in bitmap_test_bit_sequence() 81 if (bmp_test_bit(bit, bitmap)) in bitmap_test_bit_sequence() 15 static struct arena_bitmap __arena *bitmap; global() variable [all...] |
| /linux/fs/afs/ |
| H A D | dir_edit.c | 20 * There are 64 slots, which means we can load the entire bitmap into a 26 u64 bitmap; in afs_find_contig_bits() local 30 bitmap = (u64)block->hdr.bitmap[0] << 0 * 8; in afs_find_contig_bits() 31 bitmap |= (u64)block->hdr.bitmap[1] << 1 * 8; in afs_find_contig_bits() 32 bitmap |= (u64)block->hdr.bitmap[2] << 2 * 8; in afs_find_contig_bits() 33 bitmap |= (u64)block->hdr.bitmap[3] << 3 * 8; in afs_find_contig_bits() 34 bitmap |= (u64)block->hdr.bitmap[4] << 4 * 8; in afs_find_contig_bits() 35 bitmap |= (u64)block->hdr.bitmap[5] << 5 * 8; in afs_find_contig_bits() 36 bitmap |= (u64)block->hdr.bitmap[6] << 6 * 8; in afs_find_contig_bits() 37 bitmap |= (u64)block->hdr.bitmap[7] << 7 * 8; in afs_find_contig_bits() [all …]
|
| /linux/include/linux/ |
| H A D | bitmap.h | 15 #include <linux/bitmap-str.h> 21 * longs. The bitmap interface and available operations are listed 22 * here, in bitmap.h 25 * lib/bitmap.c. Functions implementations that are architecture 29 * See lib/bitmap.c for more details. 33 * DOC: bitmap overview 35 * The available bitmap operations and their rough meaning in the 36 * case that the bitmap is a single unsigned long are thus: 60 * bitmap_weight_and(src1, src2, nbits) Hamming Weight of and'ed bitmap 61 * bitmap_weight_andnot(src1, src2, nbits) Hamming Weight of andnot'ed bitmap [all …]
|
| /linux/rust/kernel/ |
| H A D | bitmap.rs | 5 //! Rust API for bitmap. 7 //! C headers: [`include/linux/bitmap.h`](srctree/include/linux/bitmap.h). 19 /// Represents a C bitmap. Wraps underlying C bitmap API. 25 /// [`Bitmap`] functions fit in the `int` and `unsigned int` arguments of the C bitmap API. 29 pub struct Bitmap { 53 impl Bitmap { 54 /// Borrows a C bitmap 22 pub struct Bitmap { global() struct 26 impl Bitmap { global() implementation 35 from_raw<'a>(ptr: *const usize, nbits: usize) -> &'a Bitmap from_raw() argument 49 unsafe { &*(data as *const Bitmap) } from_raw() constant 60 from_raw_mut<'a>(ptr: *mut usize, nbits: usize) -> &'a mut Bitmap from_raw_mut() argument 164 deref(&self) -> &Bitmap deref() argument 183 deref_mut(&mut self) -> &mut Bitmap deref_mut() argument 292 impl Bitmap { global() implementation 416 copy_and_extend(&mut self, src: &Bitmap) copy_and_extend() argument [all...] |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/hws/ |
| H A D | pool.c | 196 unsigned long *bitmap; in hws_pool_create_and_init_bitmap() local 198 bitmap = bitmap_zalloc(1 << log_range, GFP_KERNEL); in hws_pool_create_and_init_bitmap() 199 if (!bitmap) in hws_pool_create_and_init_bitmap() 202 bitmap_fill(bitmap, 1 << log_range); in hws_pool_create_and_init_bitmap() 204 return bitmap; in hws_pool_create_and_init_bitmap() 209 unsigned long *bitmap; in hws_pool_bitmap_init() local 211 bitmap = hws_pool_create_and_init_bitmap(pool->alloc_log_sz); in hws_pool_bitmap_init() 212 if (!bitmap) { in hws_pool_bitmap_init() 213 mlx5hws_err(pool->ctx, "Failed to create bitmap order: %zu\n", in hws_pool_bitmap_init() 221 bitmap_free(bitmap); in hws_pool_bitmap_init() [all …]
|
| H A D | buddy.c | 13 buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1); in hws_buddy_init() 14 if (!buddy->bitmap) in hws_buddy_init() 26 buddy->bitmap[i] = bitmap_zalloc(s, GFP_KERNEL); in hws_buddy_init() 27 if (!buddy->bitmap[i]) { in hws_buddy_init() 33 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in hws_buddy_init() 40 bitmap_free(buddy->bitmap[i]); in hws_buddy_init() 45 kfree(buddy->bitmap); in hws_buddy_init() 72 bitmap_free(buddy->bitmap[i]); in mlx5hws_buddy_cleanup() 75 kfree(buddy->bitmap); in mlx5hws_buddy_cleanup() [all...] |
| /linux/arch/powerpc/sysdev/ |
| H A 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 …]
|
| /linux/drivers/block/drbd/ |
| H A D | drbd_bitmap.c | 15 #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/drivers/firmware/efi/libstub/ |
| H A D | unaccepted_memory.c | 49 * If unaccepted memory is present, allocate a bitmap to track what in allocate_unaccepted_bitmap() 52 * One bit in the bitmap represents 2MiB in the address space: in allocate_unaccepted_bitmap() 53 * A 4k bitmap can track 64GiB of physical address space. in allocate_unaccepted_bitmap() 59 * The bitmap will be populated in setup_e820() according to the memory in allocate_unaccepted_bitmap() 77 memset(unaccepted_table->bitmap, 0, bitmap_size); in allocate_unaccepted_bitmap() 90 * The accepted memory bitmap only works at unit_size granularity. Take 104 * Ensure that at least one bit will be set in the bitmap by in process_unaccepted_memory() 107 * have been represented in the bitmap. But, results in simpler in process_unaccepted_memory() 116 * represented in the bitmap. The 2MB->4MB region can be represented in in process_unaccepted_memory() 117 * the bitmap in process_unaccepted_memory() [all...] |
| /linux/drivers/net/ethernet/mellanox/mlx5/core/steering/sws/ |
| H A D | dr_buddy.c | 19 buddy->bitmap = kzalloc_objs(*buddy->bitmap, buddy->max_order + 1); in mlx5dr_buddy_init() 22 if (!buddy->bitmap || !buddy->num_free) in mlx5dr_buddy_init() 30 buddy->bitmap[i] = bitmap_zalloc(size, GFP_KERNEL); in mlx5dr_buddy_init() 31 if (!buddy->bitmap[i]) in mlx5dr_buddy_init() 39 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); in mlx5dr_buddy_init() 47 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_init() 51 kfree(buddy->bitmap); in mlx5dr_buddy_init() 62 bitmap_free(buddy->bitmap[i]); in mlx5dr_buddy_cleanup() 65 kfree(buddy->bitmap); in mlx5dr_buddy_cleanup() 81 seg = find_first_bit(buddy->bitmap[order_iter], m); in dr_buddy_find_free_seg() [all …]
|
| /linux/fs/hfs/ |
| H A D | bitmap.c | 2 * 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/net/ethtool/ |
| H A D | bitset.c | 4 #include <linux/bitmap.h> 27 * ethnl_bitmap32_clear() - Clear u32 based bitmap 28 * @dst: bitmap to clear 31 * @mod: set if bitmap was modified 33 * Clear @nbits bits of a bitmap with indices @start <= i < @end 80 * @map: bitmap to test 117 * ethnl_bitmap32_update() - Modify u32 based bitmap according to value/mask 119 * @dst: bitmap to update 120 * @nbits: bit size of the bitmap 123 * @mod: set to true if bitmap i 449 ethnl_update_bitset32_verbose(u32 * bitmap,unsigned int nbits,const struct nlattr * attr,struct nlattr ** tb,ethnl_string_array_t names,struct netlink_ext_ack * extack,bool * mod) ethnl_update_bitset32_verbose() argument 593 ethnl_update_bitset32(u32 * bitmap,unsigned int nbits,const struct nlattr * attr,ethnl_string_array_t names,struct netlink_ext_ack * extack,bool * mod) ethnl_update_bitset32() argument 812 ethnl_update_bitset(unsigned long * bitmap,unsigned int nbits,const struct nlattr * attr,ethnl_string_array_t names,struct netlink_ext_ack * extack,bool * mod) ethnl_update_bitset() argument 866 ethnl_update_bitset(unsigned long * bitmap,unsigned int nbits,const struct nlattr * attr,ethnl_string_array_t names,struct netlink_ext_ack * extack,bool * mod) ethnl_update_bitset() argument [all...] |
| /linux/fs/nfs/ |
| H A D | nfs4xdr.c | 414 1 /* bitmap size */ + \ 415 1 /* notification bitmap length */ + \ 416 1 /* notification bitmap, word 0 */) 421 1 /* notification bitmap length */ + \ 422 1 /* notification bitmap, word 0 */ + \ 995 const __u32 *bitmap, size_t len) in xdr_encode_bitmap4() argument 1000 while (len > 0 && bitmap[len-1] == 0) in xdr_encode_bitmap4() 1002 ret = xdr_stream_encode_uint32_array(xdr, bitmap, len); in xdr_encode_bitmap4() 1008 static size_t mask_bitmap4(const __u32 *bitmap, const __u32 *mask, in mask_bitmap4() argument 1014 while (len > 0 && (bitmap[le in mask_bitmap4() 1259 encode_getattr(struct xdr_stream * xdr,const __u32 * bitmap,const __u32 * mask,size_t len,struct compound_hdr * hdr) encode_getattr() argument 1718 __u32 bitmap[2]; encode_setacl() local 1748 uint32_t bitmap[3] = { 0 }; encode_delegattr() local 3310 decode_bitmap4(struct xdr_stream * xdr,uint32_t * bitmap,size_t sz) decode_bitmap4() argument 3322 decode_attr_bitmap(struct xdr_stream * xdr,uint32_t * bitmap) decode_attr_bitmap() argument 3341 decode_attr_supported(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * bitmask) decode_attr_supported() argument 3356 decode_attr_type(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * type) decode_attr_type() argument 3381 decode_attr_fh_expire_type(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * type) decode_attr_fh_expire_type() argument 3399 decode_attr_change(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * change) decode_attr_change() argument 3420 decode_attr_size(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * size) decode_attr_size() argument 3440 decode_attr_link_support(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_link_support() argument 3458 decode_attr_symlink_support(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_symlink_support() argument 3476 decode_attr_fsid(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs_fsid * fsid) decode_attr_fsid() argument 3500 decode_attr_lease_time(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_lease_time() argument 3518 decode_attr_error(struct xdr_stream * xdr,uint32_t * bitmap,int32_t * res) decode_attr_error() argument 3535 decode_attr_exclcreat_supported(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * bitmask) decode_attr_exclcreat_supported() argument 3550 decode_attr_filehandle(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs_fh * fh) decode_attr_filehandle() argument 3582 decode_attr_aclsupport(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_aclsupport() argument 3600 decode_attr_case_insensitive(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_case_insensitive() argument 3618 decode_attr_case_preserving(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_case_preserving() argument 3636 decode_attr_fileid(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * fileid) decode_attr_fileid() argument 3656 decode_attr_mounted_on_fileid(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * fileid) decode_attr_mounted_on_fileid() argument 3676 decode_attr_files_avail(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_files_avail() argument 3695 decode_attr_files_free(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_files_free() argument 3714 decode_attr_files_total(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_files_total() argument 3775 decode_attr_fs_locations(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs4_fs_locations * res) decode_attr_fs_locations() argument 3851 decode_attr_maxfilesize(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_maxfilesize() argument 3870 decode_attr_maxlink(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * maxlink) decode_attr_maxlink() argument 3889 decode_attr_maxname(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * maxname) decode_attr_maxname() argument 3908 decode_attr_maxread(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_maxread() argument 3931 decode_attr_maxwrite(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_maxwrite() argument 3954 decode_attr_mode(struct xdr_stream * xdr,uint32_t * bitmap,umode_t * mode) decode_attr_mode() argument 3976 decode_attr_nlink(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * nlink) decode_attr_nlink() argument 4009 decode_attr_owner(struct xdr_stream * xdr,uint32_t * bitmap,const struct nfs_server * server,kuid_t * uid,struct nfs4_string * owner_name) decode_attr_owner() argument 4043 decode_attr_group(struct xdr_stream * xdr,uint32_t * bitmap,const struct nfs_server * server,kgid_t * gid,struct nfs4_string * group_name) decode_attr_group() argument 4077 decode_attr_rdev(struct xdr_stream * xdr,uint32_t * bitmap,dev_t * rdev) decode_attr_rdev() argument 4104 decode_attr_space_avail(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_space_avail() argument 4123 decode_attr_space_free(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_space_free() argument 4142 decode_attr_space_total(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res) decode_attr_space_total() argument 4161 decode_attr_space_used(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * used) decode_attr_space_used() argument 4204 decode_attr_time_access(struct xdr_stream * xdr,uint32_t * bitmap,struct timespec64 * time) decode_attr_time_access() argument 4222 decode_attr_time_create(struct xdr_stream * xdr,uint32_t * bitmap,struct timespec64 * time) decode_attr_time_create() argument 4240 decode_attr_time_metadata(struct xdr_stream * xdr,uint32_t * bitmap,struct timespec64 * time) decode_attr_time_metadata() argument 4258 decode_attr_time_delta(struct xdr_stream * xdr,uint32_t * bitmap,struct timespec64 * time) decode_attr_time_delta() argument 4276 decode_attr_security_label(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs4_label * label) decode_attr_security_label() argument 4325 decode_attr_time_modify(struct xdr_stream * xdr,uint32_t * bitmap,struct timespec64 * time) decode_attr_time_modify() argument 4343 decode_attr_xattrsupport(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_xattrsupport() argument 4362 decode_attr_open_arguments(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs4_open_caps * res) decode_attr_open_arguments() argument 4384 decode_attr_uncacheable_file_data(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res,uint64_t * flags) decode_attr_uncacheable_file_data() argument 4547 uint32_t attrlen, bitmap[3] = {0}; decode_server_caps() local 4585 uint32_t attrlen, bitmap[3] = {0}; decode_statfs() local 4622 uint32_t attrlen, bitmap[3] = {0}; decode_pathconf() local 4644 decode_threshold_hint(struct xdr_stream * xdr,uint32_t * bitmap,uint64_t * res,uint32_t hint_bit) decode_threshold_hint() argument 4665 uint32_t bitmap[3] = {0,}, attrlen; decode_first_threshold_item4() local 4714 decode_attr_mdsthreshold(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs4_threshold * res) decode_attr_mdsthreshold() argument 4744 decode_getfattr_attrs(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs_fattr * fattr,struct nfs_fh * fh,struct nfs4_fs_locations * fs_loc,const struct nfs_server * server) decode_getfattr_attrs() argument 4890 bitmap[3] = {0}; decode_getfattr_generic() local 4960 decode_attr_pnfstype(struct xdr_stream * xdr,uint32_t * bitmap,struct nfs_fsinfo * fsinfo) decode_attr_pnfstype() argument 4978 decode_attr_layout_blksize(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_layout_blksize() argument 4998 decode_attr_clone_blksize(struct xdr_stream * xdr,uint32_t * bitmap,uint32_t * res) decode_attr_clone_blksize() argument 5016 decode_attr_change_attr_type(struct xdr_stream * xdr,uint32_t * bitmap,enum nfs4_change_attr_type * res) decode_attr_change_attr_type() argument 5044 uint32_t attrlen, bitmap[3]; decode_fsinfo() local 5529 bitmap[3] = {0}; decode_getacl() local 6040 u32 bitmap[1]; decode_get_dir_delegation() local 7642 uint32_t bitmap[3] = {0}; nfs4_decode_dirent() local [all...] |
| /linux/drivers/s390/cio/ |
| H A D | idset.c | 8 #include <linux/bitmap.h> 16 unsigned long bitmap[]; member 33 memset(set->bitmap, 0, idset_bitmap_size(num_ssid, num_id)); in idset_new() 45 memset(set->bitmap, 0xff, in idset_fill() 51 set_bit(ssid * set->num_id + id, set->bitmap); in idset_add() 56 clear_bit(ssid * set->num_id + id, set->bitmap); in idset_del() 61 return test_bit(ssid * set->num_id + id, set->bitmap); in idset_contains() 84 bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no); in idset_sch_del_subseq() 94 return bitmap_empty(set->bitmap, set->num_ssid * set->num_id); in idset_is_empty() 101 bitmap_or(to->bitmap, to->bitmap, from->bitmap, len); in idset_add_set()
|