/linux-master/fs/xfs/scrub/ |
H A D | off_bitmap.h | 15 static inline void xoff_bitmap_init(struct xoff_bitmap *bitmap) argument 17 xbitmap64_init(&bitmap->offbitmap); 20 static inline void xoff_bitmap_destroy(struct xoff_bitmap *bitmap) argument 22 xbitmap64_destroy(&bitmap->offbitmap); 25 static inline int xoff_bitmap_set(struct xoff_bitmap *bitmap, argument 28 return xbitmap64_set(&bitmap->offbitmap, off, len); 31 static inline int xoff_bitmap_walk(struct xoff_bitmap *bitmap, argument 34 return xbitmap64_walk(&bitmap->offbitmap, fn, priv);
|
H A D | fsb_bitmap.h | 15 static inline void xfsb_bitmap_init(struct xfsb_bitmap *bitmap) argument 17 xbitmap64_init(&bitmap->fsbitmap); 20 static inline void xfsb_bitmap_destroy(struct xfsb_bitmap *bitmap) argument 22 xbitmap64_destroy(&bitmap->fsbitmap); 25 static inline int xfsb_bitmap_set(struct xfsb_bitmap *bitmap, argument 28 return xbitmap64_set(&bitmap->fsbitmap, start, len); 31 static inline int xfsb_bitmap_walk(struct xfsb_bitmap *bitmap, argument 34 return xbitmap64_walk(&bitmap->fsbitmap, fn, priv);
|
H A D | agb_bitmap.h | 15 static inline void xagb_bitmap_init(struct xagb_bitmap *bitmap) argument 17 xbitmap32_init(&bitmap->agbitmap); 20 static inline void xagb_bitmap_destroy(struct xagb_bitmap *bitmap) argument 22 xbitmap32_destroy(&bitmap->agbitmap); 25 static inline int xagb_bitmap_clear(struct xagb_bitmap *bitmap, argument 28 return xbitmap32_clear(&bitmap->agbitmap, start, len); 30 static inline int xagb_bitmap_set(struct xagb_bitmap *bitmap, argument 33 return xbitmap32_set(&bitmap->agbitmap, start, len); 36 static inline bool xagb_bitmap_test(struct xagb_bitmap *bitmap, argument 39 return xbitmap32_test(&bitmap 42 xagb_bitmap_disunion(struct xagb_bitmap *bitmap, struct xagb_bitmap *sub) argument 48 xagb_bitmap_hweight(struct xagb_bitmap *bitmap) argument 52 xagb_bitmap_empty(struct xagb_bitmap *bitmap) argument 57 xagb_bitmap_walk(struct xagb_bitmap *bitmap, xbitmap32_walk_fn fn, void *priv) 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 whil [all...] |
H A D | reap.h | 12 int xrep_reap_agblocks(struct xfs_scrub *sc, struct xagb_bitmap *bitmap, 14 int xrep_reap_fsblocks(struct xfs_scrub *sc, struct xfsb_bitmap *bitmap,
|
H A D | bitmap.c | 15 #include "scrub/bitmap.h" 19 /* u64 bitmap */ 60 /* Iterate each interval of a bitmap. Do not change the bitmap. */ 61 #define for_each_xbitmap64_extent(bn, bitmap) \ 62 for ((bn) = rb_entry_safe(rb_first(&(bitmap)->xb_root.rb_root), \ 68 /* Clear a range of this bitmap. */ 71 struct xbitmap64 *bitmap, 79 while ((bn = xbitmap64_tree_iter_first(&bitmap->xb_root, start, last))) { 84 xbitmap64_tree_remove(bn, &bitmap 70 xbitmap64_clear( struct xbitmap64 *bitmap, uint64_t start, uint64_t len) argument 119 xbitmap64_set( struct xbitmap64 *bitmap, uint64_t start, uint64_t len) argument 179 xbitmap64_destroy( struct xbitmap64 *bitmap) argument 192 xbitmap64_init( struct xbitmap64 *bitmap) argument 213 xbitmap64_disunion( struct xbitmap64 *bitmap, struct xbitmap64 *sub) argument 235 xbitmap64_hweight( struct xbitmap64 *bitmap) argument 249 xbitmap64_walk( struct xbitmap64 *bitmap, xbitmap64_walk_fn fn, void *priv) argument 268 xbitmap64_empty( struct xbitmap64 *bitmap) argument 276 xbitmap64_test( struct xbitmap64 *bitmap, uint64_t start, uint64_t *len) argument 344 xbitmap32_clear( struct xbitmap32 *bitmap, uint32_t start, uint32_t len) argument 393 xbitmap32_set( struct xbitmap32 *bitmap, uint32_t start, uint32_t len) argument 453 xbitmap32_destroy( struct xbitmap32 *bitmap) argument 466 xbitmap32_init( struct xbitmap32 *bitmap) argument 487 xbitmap32_disunion( struct xbitmap32 *bitmap, struct xbitmap32 *sub) argument 509 xbitmap32_hweight( struct xbitmap32 *bitmap) argument 523 xbitmap32_walk( struct xbitmap32 *bitmap, xbitmap32_walk_fn fn, void *priv) argument 542 xbitmap32_empty( struct xbitmap32 *bitmap) argument 550 xbitmap32_test( struct xbitmap32 *bitmap, uint32_t start, uint32_t *len) argument 572 xbitmap32_count_set_regions( struct xbitmap32 *bitmap) argument [all...] |
H A D | agb_bitmap.c | 13 #include "bitmap.h" 51 /* Mark a btree block to the agblock bitmap. */ 58 struct xagb_bitmap *bitmap = priv; local 70 return xagb_bitmap_set(bitmap, agbno, 1); 73 /* Mark all (per-AG) btree blocks in the agblock bitmap. */ 76 struct xagb_bitmap *bitmap, 80 XFS_BTREE_VISIT_ALL, bitmap); 90 struct xagb_bitmap *bitmap, 97 error = xagb_bitmap_visit_btblock(cur, i, bitmap); 75 xagb_bitmap_set_btblocks( struct xagb_bitmap *bitmap, struct xfs_btree_cur *cur) argument 89 xagb_bitmap_set_btcur_path( struct xagb_bitmap *bitmap, struct xfs_btree_cur *cur) argument
|
/linux-master/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: 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; member in struct:iova_bitmap 130 iova_bitmap_offset_to_index(struct iova_bitmap *bitmap, unsigned long iova) argument 141 iova_bitmap_index_to_offset(struct iova_bitmap *bitmap, unsigned long index) argument 152 iova_bitmap_mapped_iova(struct iova_bitmap *bitmap) argument 164 iova_bitmap_get(struct iova_bitmap *bitmap) argument 217 iova_bitmap_put(struct iova_bitmap *bitmap) argument 245 struct iova_bitmap *bitmap; local 284 iova_bitmap_free(struct iova_bitmap *bitmap) argument 303 iova_bitmap_mapped_remaining(struct iova_bitmap *bitmap) argument 319 iova_bitmap_mapped_length(struct iova_bitmap *bitmap) argument 343 iova_bitmap_done(struct iova_bitmap *bitmap) argument 348 iova_bitmap_set_ahead(struct iova_bitmap *bitmap, size_t set_ahead_length) argument 379 iova_bitmap_advance(struct iova_bitmap *bitmap) argument 416 iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, iova_bitmap_fn_t fn) argument 443 iova_bitmap_set(struct iova_bitmap *bitmap, unsigned long iova, size_t length) argument [all...] |
/linux-master/lib/ |
H A D | memweight.c | 4 #include <linux/bitmap.h> 15 const unsigned char *bitmap = ptr; local 17 for (; bytes > 0 && ((unsigned long)bitmap) % sizeof(long); 18 bytes--, bitmap++) 19 ret += hweight8(*bitmap); 24 ret += bitmap_weight((unsigned long *)bitmap, 27 bitmap += longs * sizeof(long); 34 for (; bytes > 0; bytes--, bitmap++) 35 ret += hweight8(*bitmap);
|
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; 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) argument 43 i = find_first_bit(bitmap, len); 44 __clear_bit(i, bitmap); 52 static int __init test_find_first_and_bit(void *bitmap, const void *bitmap2, unsigned long len) argument 58 bitmap_copy(cp, bitmap, BITMAP_LE 71 test_find_next_bit(const void *bitmap, unsigned long len) argument 85 test_find_next_zero_bit(const void *bitmap, unsigned long len) argument 99 test_find_last_bit(const void *bitmap, unsigned long len) argument 118 test_find_nth_bit(const unsigned long *bitmap, unsigned long len) argument 134 test_find_next_and_bit(const void *bitmap, const void *bitmap2, unsigned long len) argument 177 __set_bit(get_random_u32_below(BITMAP_LEN), bitmap); local [all...] |
H A 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, whic 386 struct ida_bitmap *bitmap, *alloc = NULL; local 491 struct ida_bitmap *bitmap; local 544 struct ida_bitmap *bitmap; local 582 struct ida_bitmap *bitmap = entry; local [all...] |
/linux-master/drivers/md/ |
H A 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 ( 180 struct bitmap { struct 279 md_bitmap_enabled(struct bitmap *bitmap) argument [all...] |
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 33 #include "md-bitmap.h" 35 static inline char *bmname(struct bitmap *bitmap) argument 37 return bitmap 112 md_bitmap_checkfree(struct bitmap_counts *bitmap, unsigned long page) argument 224 __write_sb_page(struct md_rdev *rdev, struct bitmap *bitmap, unsigned long pg_index, struct page *page) argument 280 write_sb_page(struct bitmap *bitmap, unsigned long pg_index, struct page *page, bool wait) argument 300 write_file_page(struct bitmap *bitmap, struct page *page, int wait) argument 319 struct bitmap *bitmap = bh->b_private; local 351 read_file_page(struct file *file, unsigned long index, struct bitmap *bitmap, unsigned long count, struct page *page) argument 414 write_file_page(struct bitmap *bitmap, struct page *page, int wait) argument 417 read_file_page(struct file *file, unsigned long index, struct bitmap *bitmap, unsigned long count, struct page *page) argument 435 filemap_write_page(struct bitmap *bitmap, unsigned long pg_index, bool wait) argument 457 md_bitmap_wait_writes(struct bitmap *bitmap) argument 475 md_bitmap_update_sb(struct bitmap *bitmap) argument 516 md_bitmap_print_sb(struct bitmap *bitmap) argument 555 md_bitmap_new_disk_sb(struct bitmap *bitmap) argument 614 md_bitmap_read_sb(struct bitmap *bitmap) argument 893 md_bitmap_file_kick(struct bitmap *bitmap) argument 915 set_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) argument 921 clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) argument 927 test_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) argument 933 test_and_clear_page_attr(struct bitmap *bitmap, int pnum, enum bitmap_page_attr attr) argument 946 md_bitmap_file_set_bit(struct bitmap *bitmap, sector_t block) argument 977 md_bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block) argument 1007 md_bitmap_file_test_bit(struct bitmap *bitmap, sector_t block) argument 1031 md_bitmap_unplug(struct bitmap *bitmap) argument 1067 struct bitmap *bitmap; member in struct:bitmap_unplug_work 1080 md_bitmap_unplug_async(struct bitmap *bitmap) argument 1107 md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start) argument 1229 md_bitmap_write_all(struct bitmap *bitmap) argument 1248 md_bitmap_count_page(struct bitmap_counts *bitmap, sector_t offset, int inc) argument 1257 md_bitmap_set_pending(struct bitmap_counts *bitmap, sector_t offset) argument 1295 struct bitmap *bitmap; local 1464 md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int behind) argument 1528 md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int success, int behind) argument 1581 __bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) argument 1609 md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int degraded) argument 1633 md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted) argument 1664 md_bitmap_close_sync(struct bitmap *bitmap) argument 1681 md_bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force) argument 1715 struct bitmap *bitmap = mddev->bitmap; local 1732 md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed) argument 1759 md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e) argument 1781 struct bitmap *bitmap = mddev->bitmap; local 1805 md_bitmap_free(struct bitmap *bitmap) argument 1843 struct bitmap *bitmap = mddev->bitmap; local 1857 struct bitmap *bitmap = mddev->bitmap; local 1883 struct bitmap *bitmap; local 1973 struct bitmap *bitmap = mddev->bitmap; local 2030 struct bitmap *bitmap; local 2057 struct bitmap *bitmap; local 2097 md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap) argument 2124 md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, int chunksize, int init) argument 2380 struct bitmap *bitmap; local [all...] |
/linux-master/include/linux/ |
H A D | iova_bitmap.h | 14 typedef int (*iova_bitmap_fn_t)(struct iova_bitmap *bitmap, 22 void iova_bitmap_free(struct iova_bitmap *bitmap); 23 int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, 25 void iova_bitmap_set(struct iova_bitmap *bitmap, 36 static inline void iova_bitmap_free(struct iova_bitmap *bitmap) argument 40 static inline int iova_bitmap_for_each(struct iova_bitmap *bitmap, void *opaque, argument 46 static inline void iova_bitmap_set(struct iova_bitmap *bitmap, argument
|
/linux-master/fs/omfs/ |
H A D | Makefile | 5 omfs-y := bitmap.o dir.o file.o inode.o
|
/linux-master/fs/qnx4/ |
H A D | Makefile | 8 qnx4-objs := inode.o dir.o namei.o bitmap.o
|
/linux-master/drivers/net/ethernet/mellanox/mlx5/core/steering/ |
H A D | dr_buddy.c | 19 buddy->bitmap = kcalloc(buddy->max_order + 1, 20 sizeof(*buddy->bitmap), 26 if (!buddy->bitmap || !buddy->num_free) 34 buddy->bitmap[i] = bitmap_zalloc(size, GFP_KERNEL); 35 if (!buddy->bitmap[i]) 43 bitmap_set(buddy->bitmap[buddy->max_order], 0, 1); 51 bitmap_free(buddy->bitmap[i]); 55 kfree(buddy->bitmap); 66 bitmap_free(buddy->bitmap[i]); 69 kfree(buddy->bitmap); [all...] |
/linux-master/fs/afs/ |
H A D | dir_edit.c | 19 * There are 64 slots, which means we can load the entire bitmap into a 25 u64 bitmap; local 29 bitmap = (u64)block->hdr.bitmap[0] << 0 * 8; 30 bitmap |= (u64)block->hdr.bitmap[1] << 1 * 8; 31 bitmap |= (u64)block->hdr.bitmap[2] << 2 * 8; 32 bitmap |= (u64)block->hdr.bitmap[ 134 u64 bitmap; local [all...] |
/linux-master/drivers/s390/cio/ |
H A D | idset.c | 8 #include <linux/bitmap.h> 16 unsigned long bitmap[]; member in struct:idset 32 memset(set->bitmap, 0, bitmap_size(num_ssid, num_id)); 44 memset(set->bitmap, 0xff, bitmap_size(set->num_ssid, set->num_id)); 49 set_bit(ssid * set->num_id + id, set->bitmap); 54 clear_bit(ssid * set->num_id + id, set->bitmap); 59 return test_bit(ssid * set->num_id + id, set->bitmap); 82 bitmap_clear(set->bitmap, pos, set->num_id - schid.sch_no); 92 return bitmap_empty(set->bitmap, set->num_ssid * set->num_id); 99 bitmap_or(to->bitmap, t [all...] |
/linux-master/drivers/net/ethernet/mellanox/mlx4/ |
H A D | alloc.c | 38 #include <linux/bitmap.h> 44 u32 mlx4_bitmap_alloc(struct mlx4_bitmap *bitmap) argument 48 spin_lock(&bitmap->lock); 50 obj = find_next_zero_bit(bitmap->table, bitmap->max, bitmap->last); 51 if (obj >= bitmap->max) { 52 bitmap->top = (bitmap->top + bitmap 74 mlx4_bitmap_free(struct mlx4_bitmap *bitmap, u32 obj, int use_rr) argument 79 find_aligned_range(unsigned long *bitmap, u32 start, u32 nbits, int len, int align, u32 skip_mask) argument 109 mlx4_bitmap_alloc_range(struct mlx4_bitmap *bitmap, int cnt, int align, u32 skip_mask) argument 147 mlx4_bitmap_avail(struct mlx4_bitmap *bitmap) argument 152 mlx4_bitmap_masked_value(struct mlx4_bitmap *bitmap, u32 obj) argument 157 mlx4_bitmap_free_range(struct mlx4_bitmap *bitmap, u32 obj, int cnt, int use_rr) argument 173 mlx4_bitmap_init(struct mlx4_bitmap *bitmap, u32 num, u32 mask, u32 reserved_bot, u32 reserved_top) argument 197 mlx4_bitmap_cleanup(struct mlx4_bitmap *bitmap) argument 217 struct mlx4_bitmap *bitmap; member in struct:mlx4_zone_entry 241 mlx4_zone_add_one(struct mlx4_zone_allocator *zone_alloc, struct mlx4_bitmap *bitmap, u32 flags, int priority, int offset, u32 *puid) argument 441 struct mlx4_bitmap *bitmap; local [all...] |
/linux-master/fs/minix/ |
H A D | Makefile | 8 minix-objs := bitmap.o itree_v1.o itree_v2.o namei.o inode.o file.o dir.o
|
/linux-master/tools/testing/selftests/lib/ |
H A D | Makefile | 7 TEST_PROGS := printf.sh bitmap.sh prime_numbers.sh scanf.sh strscpy.sh
|
/linux-master/include/linux/soc/qcom/ |
H A D | qcom-pbs.h | 16 int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap); 19 static inline int qcom_pbs_trigger_event(struct pbs_dev *pbs, u8 bitmap) argument
|
/linux-master/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, 27 bitmap_set(bmp->bitmap, offset, num); 48 bitmap_clear(bmp->bitmap, offset, num); 60 bitmap_allocate_region(bmp->bitmap, hwirq, 0); 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)); 104 bitmap_release_region(bmp->bitmap, *p + j, 0); 121 pr_debug("msi_bitmap: allocator bitmap siz [all...] |
/linux-master/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) argument 40 curr = bitmap + (offset / 32); 41 end = bitmap + ((size + 31) / 32); 70 start = (curr - bitmap) * 32 + i; 108 *max = (curr - bitmap) * 32 + i - start; 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; local [all...] |