Lines Matching full:bitmap

4 #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
124 * Set bits in @dst bitmap which are set in @mask to values from @value, leave
125 * the rest untouched. If destination bitmap was modified, set @mod to true,
160 * @val: value bitmap (u32 based)
161 * @mask: mask bitmap (u32 based, optional)
220 * @val: value bitmap (u32 based)
221 * @mask: mask bitmap (u32 based, optional)
227 * bitmap (bit list) is created, if @mask is provided, represent a value/mask
429 ethnl_update_bitset32_verbose(u32 *bitmap, unsigned int nbits, in ethnl_update_bitset32_verbose() argument
452 ethnl_bitmap32_clear(bitmap, 0, nbits, mod); in ethnl_update_bitset32_verbose()
467 old_val = bitmap[idx / 32] & ((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
470 bitmap[idx / 32] |= ((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
472 bitmap[idx / 32] &= ~((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
537 * ethnl_update_bitset32() - Apply a bitset nest to a u32 based bitmap
538 * @bitmap: bitmap to update
539 * @nbits: size of the updated bitmap in bits
543 * @mod: set this to true if bitmap is modified, leave as it is if not
545 * Apply bitset netsted attribute to a bitmap. If the attribute represents
546 * a bit list, @bitmap is set to its contents; otherwise, bits in mask are
552 int ethnl_update_bitset32(u32 *bitmap, unsigned int nbits, in ethnl_update_bitset32() argument
569 return ethnl_update_bitset32_verbose(bitmap, nbits, attr, tb, in ethnl_update_bitset32()
578 ethnl_bitmap32_update(bitmap, change_bits, in ethnl_update_bitset32()
584 ethnl_bitmap32_clear(bitmap, change_bits, nbits, mod); in ethnl_update_bitset32()
591 * @val: unsigned long based bitmap to put value into
592 * @mask: unsigned long based bitmap to put mask into
599 * x = (val & mask) | (x & ~mask) would modify any @nbits sized bitmap x
771 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits, in ethnl_update_bitset() argument
788 bitmap_to_arr32(bitmap32, bitmap, nbits); in ethnl_update_bitset()
792 bitmap_from_arr32(bitmap, bitmap32, nbits); in ethnl_update_bitset()
805 * based bitmap can be interpreted as u32 based one using a simple cast.
825 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits, in ethnl_update_bitset() argument
829 return ethnl_update_bitset32((u32 *)bitmap, nbits, attr, names, extack, in ethnl_update_bitset()