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
430 * @map1: first bitmap
431 * @map2: second bitmap
448 ethnl_update_bitset32_verbose(u32 *bitmap, unsigned int nbits, in ethnl_update_bitset32_verbose() argument
476 /* The bitmap size is only the size of the map part without in ethnl_update_bitset32_verbose()
482 memcpy(saved_bitmap, bitmap, nbytes); in ethnl_update_bitset32_verbose()
483 ethnl_bitmap32_clear(bitmap, 0, nbits, &dummy); in ethnl_update_bitset32_verbose()
502 old_val = bitmap[idx / 32] & ((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
505 bitmap[idx / 32] |= ((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
507 bitmap[idx / 32] &= ~((u32)1 << (idx % 32)); in ethnl_update_bitset32_verbose()
513 if (no_mask && !ethnl_bitmap32_equal(saved_bitmap, bitmap, nbits)) in ethnl_update_bitset32_verbose()
577 * ethnl_update_bitset32() - Apply a bitset nest to a u32 based bitmap
578 * @bitmap: bitmap to update
579 * @nbits: size of the updated bitmap in bits
583 * @mod: set this to true if bitmap is modified, leave as it is if not
585 * Apply bitset netsted attribute to a bitmap. If the attribute represents
586 * a bit list, @bitmap is set to its contents; otherwise, bits in mask are
592 int ethnl_update_bitset32(u32 *bitmap, unsigned int nbits, in ethnl_update_bitset32() argument
609 return ethnl_update_bitset32_verbose(bitmap, nbits, attr, tb, in ethnl_update_bitset32()
618 ethnl_bitmap32_update(bitmap, change_bits, in ethnl_update_bitset32()
624 ethnl_bitmap32_clear(bitmap, change_bits, nbits, mod); in ethnl_update_bitset32()
631 * @val: unsigned long based bitmap to put value into
632 * @mask: unsigned long based bitmap to put mask into
639 * x = (val & mask) | (x & ~mask) would modify any @nbits sized bitmap x
811 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits, in ethnl_update_bitset() argument
828 bitmap_to_arr32(bitmap32, bitmap, nbits); in ethnl_update_bitset()
832 bitmap_from_arr32(bitmap, bitmap32, nbits); in ethnl_update_bitset()
845 * based bitmap can be interpreted as u32 based one using a simple cast.
865 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits, in ethnl_update_bitset() argument
869 return ethnl_update_bitset32((u32 *)bitmap, nbits, attr, names, extack, in ethnl_update_bitset()