Home
last modified time | relevance | path

Searched refs:BITMAP_LAST_WORD_MASK (Results 1 – 11 of 11) sorted by relevance

/linux-6.12.1/tools/include/linux/
Dbitmap.h27 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) macro
47 dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits); in bitmap_fill()
53 return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_empty()
61 return ! (~(*src) & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_full()
69 return hweight_long(*src & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_weight()
121 return (*dst = *src1 & *src2 & BITMAP_LAST_WORD_MASK(nbits)) != 0; in bitmap_and()
136 return !((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_equal()
148 return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; in bitmap_intersects()
/linux-6.12.1/include/linux/
Dbitmap.h227 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) macro
270 dst[nbits / BITS_PER_LONG] &= BITMAP_LAST_WORD_MASK(nbits); in bitmap_copy_clear_tail()
281 to[copy - 1] &= BITMAP_LAST_WORD_MASK(count); in bitmap_copy_and_extend()
326 return (*dst = *src1 & *src2 & BITMAP_LAST_WORD_MASK(nbits)) != 0; in bitmap_and()
355 return (*dst = *src1 & ~(*src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; in bitmap_andnot()
379 return !((*src1 ^ *src2) & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_equal()
402 return !(((*src1 | *src2) ^ *src3) & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_or_equal()
409 return ((*src1 & *src2) & BITMAP_LAST_WORD_MASK(nbits)) != 0; in bitmap_intersects()
418 return ! ((*src1 & ~(*src2)) & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_subset()
427 return ! (*src & BITMAP_LAST_WORD_MASK(nbits)); in bitmap_empty()
[all …]
Dcpumask.h610 cpumask_bits(dstp)[0] = BITMAP_LAST_WORD_MASK(nr_cpumask_bits); in cpumask_setall()
1190 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
1198 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
1268 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
1274 [BITS_TO_LONGS(NR_CPUS)-1] = BITMAP_LAST_WORD_MASK(NR_CPUS) \
Dnodemask.h313 #define NODE_MASK_LAST_WORD BITMAP_LAST_WORD_MASK(MAX_NUMNODES)
/linux-6.12.1/tools/lib/
Dbitmap.c16 w += hweight_long(bitmap[k] & BITMAP_LAST_WORD_MASK(bits)); in __bitmap_weight()
71 BITMAP_LAST_WORD_MASK(bits)); in __bitmap_and()
84 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
99 if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_intersects()
119 mask_to_clear &= BITMAP_LAST_WORD_MASK(size); in __bitmap_clear()
/linux-6.12.1/lib/
Dbitmap.c46 if ((bitmap1[k] ^ bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_equal()
70 return (tmp & BITMAP_LAST_WORD_MASK(bits)) == 0; in __bitmap_or_equal()
97 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in __bitmap_shift_right()
240 BITMAP_LAST_WORD_MASK(bits)); in __bitmap_and()
278 BITMAP_LAST_WORD_MASK(bits)); in __bitmap_andnot()
304 if ((bitmap1[k] & bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_intersects()
319 if ((bitmap1[k] & ~bitmap2[k]) & BITMAP_LAST_WORD_MASK(bits)) in __bitmap_subset()
333 w += hweight_long((FETCH) & BITMAP_LAST_WORD_MASK(__bits)); \
373 mask_to_set &= BITMAP_LAST_WORD_MASK(size); in __bitmap_set()
394 mask_to_clear &= BITMAP_LAST_WORD_MASK(size); in __bitmap_clear()
[all …]
Dfind_bit.c88 tmp = (FETCH) & BITMAP_LAST_WORD_MASK(sz); \
219 unsigned long val = BITMAP_LAST_WORD_MASK(size); in _find_last_bit()
Dgenalloc.c101 mask_to_set &= BITMAP_LAST_WORD_MASK(size); in bitmap_set_ll()
137 mask_to_clear &= BITMAP_LAST_WORD_MASK(size); in bitmap_clear_ll()
/linux-6.12.1/drivers/firmware/efi/libstub/
Dbitmap.c18 mask_to_set &= BITMAP_LAST_WORD_MASK(size); in __bitmap_set()
38 mask_to_clear &= BITMAP_LAST_WORD_MASK(size); in __bitmap_clear()
/linux-6.12.1/fs/exfat/
Dballoc.c248 count += hweight_long(clu_bits & BITMAP_LAST_WORD_MASK(last_mask)); in exfat_count_used_clusters()
/linux-6.12.1/fs/ntfs3/
Dbitmap.c1534 mask_to_set &= cpu_to_ul(BITMAP_LAST_WORD_MASK(size)); in ntfs_bitmap_set_le()
1554 mask_to_clear &= cpu_to_ul(BITMAP_LAST_WORD_MASK(size)); in ntfs_bitmap_clear_le()
1570 BITMAP_LAST_WORD_MASK(bits)); in ntfs_bitmap_weight_le()