Home
last modified time | relevance | path

Searched refs:nbits (Results 1 - 25 of 202) sorted by relevance

123456789

/kernel/linux/linux-6.6/include/linux/
H A Dbitmap.h35 * The generated code is more efficient when nbits is known at
40 * bitmap_zero(dst, nbits) *dst = 0UL
41 * bitmap_fill(dst, nbits) *dst = ~0UL
42 * bitmap_copy(dst, src, nbits) *dst = *src
43 * bitmap_and(dst, src1, src2, nbits) *dst = *src1 & *src2
44 * bitmap_or(dst, src1, src2, nbits) *dst = *src1 | *src2
45 * bitmap_xor(dst, src1, src2, nbits) *dst = *src1 ^ *src2
46 * bitmap_andnot(dst, src1, src2, nbits) *dst = *src1 & ~(*src2)
47 * bitmap_complement(dst, src, nbits) *dst = ~(*src)
48 * bitmap_equal(src1, src2, nbits) Ar
240 bitmap_zero(unsigned long *dst, unsigned int nbits) bitmap_zero() argument
250 bitmap_fill(unsigned long *dst, unsigned int nbits) bitmap_fill() argument
260 bitmap_copy(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy() argument
274 bitmap_copy_clear_tail(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy_clear_tail() argument
318 bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_and() argument
326 bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_or() argument
335 bitmap_xor(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_xor() argument
344 bitmap_andnot(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_andnot() argument
352 bitmap_complement(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_complement() argument
368 bitmap_equal(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_equal() argument
388 bitmap_or_equal(const unsigned long *src1, const unsigned long *src2, const unsigned long *src3, unsigned int nbits) bitmap_or_equal() argument
399 bitmap_intersects(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_intersects() argument
409 bitmap_subset(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_subset() argument
418 bitmap_empty(const unsigned long *src, unsigned nbits) bitmap_empty() argument
426 bitmap_full(const unsigned long *src, unsigned int nbits) bitmap_full() argument
435 bitmap_weight(const unsigned long *src, unsigned int nbits) bitmap_weight() argument
443 bitmap_weight_and(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_weight_and() argument
451 bitmap_set(unsigned long *map, unsigned int start, unsigned int nbits) bitmap_set() argument
467 bitmap_clear(unsigned long *map, unsigned int start, unsigned int nbits) bitmap_clear() argument
483 bitmap_shift_right(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) bitmap_shift_right() argument
492 bitmap_shift_left(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) bitmap_shift_left() argument
501 bitmap_replace(unsigned long *dst, const unsigned long *old, const unsigned long *new, const unsigned long *mask, unsigned int nbits) bitmap_replace() argument
[all...]
H A Dnodemask.h141 static inline void __nodes_setall(nodemask_t *dstp, unsigned int nbits) in __nodes_setall() argument
143 bitmap_fill(dstp->bits, nbits); in __nodes_setall()
147 static inline void __nodes_clear(nodemask_t *dstp, unsigned int nbits) in __nodes_clear() argument
149 bitmap_zero(dstp->bits, nbits); in __nodes_clear()
165 const nodemask_t *src2p, unsigned int nbits) in __nodes_and()
167 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_and()
173 const nodemask_t *src2p, unsigned int nbits) in __nodes_or()
175 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_or()
181 const nodemask_t *src2p, unsigned int nbits) in __nodes_xor()
183 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_xor()
164 __nodes_and(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_and() argument
172 __nodes_or(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_or() argument
180 __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_xor() argument
188 __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_andnot() argument
196 __nodes_complement(nodemask_t *dstp, const nodemask_t *srcp, unsigned int nbits) __nodes_complement() argument
204 __nodes_equal(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_equal() argument
212 __nodes_intersects(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_intersects() argument
220 __nodes_subset(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_subset() argument
227 __nodes_empty(const nodemask_t *srcp, unsigned int nbits) __nodes_empty() argument
233 __nodes_full(const nodemask_t *srcp, unsigned int nbits) __nodes_full() argument
239 __nodes_weight(const nodemask_t *srcp, unsigned int nbits) __nodes_weight() argument
246 __nodes_shift_right(nodemask_t *dstp, const nodemask_t *srcp, int n, int nbits) __nodes_shift_right() argument
254 __nodes_shift_left(nodemask_t *dstp, const nodemask_t *srcp, int n, int nbits) __nodes_shift_left() argument
341 __nodemask_parse_user(const char __user *buf, int len, nodemask_t *dstp, int nbits) __nodemask_parse_user() argument
348 __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) __nodelist_parse() argument
355 __node_remap(int oldbit, const nodemask_t *oldp, const nodemask_t *newp, int nbits) __node_remap() argument
363 __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, const nodemask_t *oldp, const nodemask_t *newp, int nbits) __nodes_remap() argument
371 __nodes_onto(nodemask_t *dstp, const nodemask_t *origp, const nodemask_t *relmapp, int nbits) __nodes_onto() argument
379 __nodes_fold(nodemask_t *dstp, const nodemask_t *origp, int sz, int nbits) __nodes_fold() argument
[all...]
/kernel/linux/linux-5.10/include/linux/
H A Dbitmap.h33 * The generated code is more efficient when nbits is known at
38 * bitmap_zero(dst, nbits) *dst = 0UL
39 * bitmap_fill(dst, nbits) *dst = ~0UL
40 * bitmap_copy(dst, src, nbits) *dst = *src
41 * bitmap_and(dst, src1, src2, nbits) *dst = *src1 & *src2
42 * bitmap_or(dst, src1, src2, nbits) *dst = *src1 | *src2
43 * bitmap_xor(dst, src1, src2, nbits) *dst = *src1 ^ *src2
44 * bitmap_andnot(dst, src1, src2, nbits) *dst = *src1 & ~(*src2)
45 * bitmap_complement(dst, src, nbits) *dst = ~(*src)
46 * bitmap_equal(src1, src2, nbits) Ar
243 bitmap_zero(unsigned long *dst, unsigned int nbits) bitmap_zero() argument
249 bitmap_fill(unsigned long *dst, unsigned int nbits) bitmap_fill() argument
255 bitmap_copy(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy() argument
265 bitmap_copy_clear_tail(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy_clear_tail() argument
291 bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_and() argument
299 bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_or() argument
308 bitmap_xor(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_xor() argument
317 bitmap_andnot(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_andnot() argument
325 bitmap_complement(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_complement() argument
341 bitmap_equal(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_equal() argument
361 bitmap_or_equal(const unsigned long *src1, const unsigned long *src2, const unsigned long *src3, unsigned int nbits) bitmap_or_equal() argument
372 bitmap_intersects(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_intersects() argument
381 bitmap_subset(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_subset() argument
390 bitmap_empty(const unsigned long *src, unsigned nbits) bitmap_empty() argument
398 bitmap_full(const unsigned long *src, unsigned int nbits) bitmap_full() argument
406 bitmap_weight(const unsigned long *src, unsigned int nbits) bitmap_weight() argument
413 bitmap_set(unsigned long *map, unsigned int start, unsigned int nbits) bitmap_set() argument
427 bitmap_clear(unsigned long *map, unsigned int start, unsigned int nbits) bitmap_clear() argument
441 bitmap_shift_right(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) bitmap_shift_right() argument
450 bitmap_shift_left(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) bitmap_shift_left() argument
459 bitmap_replace(unsigned long *dst, const unsigned long *old, const unsigned long *new, const unsigned long *mask, unsigned int nbits) bitmap_replace() argument
[all...]
H A Dnodemask.h140 static inline void __nodes_setall(nodemask_t *dstp, unsigned int nbits) in __nodes_setall() argument
142 bitmap_fill(dstp->bits, nbits); in __nodes_setall()
146 static inline void __nodes_clear(nodemask_t *dstp, unsigned int nbits) in __nodes_clear() argument
148 bitmap_zero(dstp->bits, nbits); in __nodes_clear()
164 const nodemask_t *src2p, unsigned int nbits) in __nodes_and()
166 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_and()
172 const nodemask_t *src2p, unsigned int nbits) in __nodes_or()
174 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_or()
180 const nodemask_t *src2p, unsigned int nbits) in __nodes_xor()
182 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_xor()
163 __nodes_and(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_and() argument
171 __nodes_or(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_or() argument
179 __nodes_xor(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_xor() argument
187 __nodes_andnot(nodemask_t *dstp, const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_andnot() argument
195 __nodes_complement(nodemask_t *dstp, const nodemask_t *srcp, unsigned int nbits) __nodes_complement() argument
203 __nodes_equal(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_equal() argument
211 __nodes_intersects(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_intersects() argument
219 __nodes_subset(const nodemask_t *src1p, const nodemask_t *src2p, unsigned int nbits) __nodes_subset() argument
226 __nodes_empty(const nodemask_t *srcp, unsigned int nbits) __nodes_empty() argument
232 __nodes_full(const nodemask_t *srcp, unsigned int nbits) __nodes_full() argument
238 __nodes_weight(const nodemask_t *srcp, unsigned int nbits) __nodes_weight() argument
245 __nodes_shift_right(nodemask_t *dstp, const nodemask_t *srcp, int n, int nbits) __nodes_shift_right() argument
253 __nodes_shift_left(nodemask_t *dstp, const nodemask_t *srcp, int n, int nbits) __nodes_shift_left() argument
333 __nodemask_parse_user(const char __user *buf, int len, nodemask_t *dstp, int nbits) __nodemask_parse_user() argument
340 __nodelist_parse(const char *buf, nodemask_t *dstp, int nbits) __nodelist_parse() argument
347 __node_remap(int oldbit, const nodemask_t *oldp, const nodemask_t *newp, int nbits) __node_remap() argument
355 __nodes_remap(nodemask_t *dstp, const nodemask_t *srcp, const nodemask_t *oldp, const nodemask_t *newp, int nbits) __nodes_remap() argument
363 __nodes_onto(nodemask_t *dstp, const nodemask_t *origp, const nodemask_t *relmapp, int nbits) __nodes_onto() argument
371 __nodes_fold(nodemask_t *dstp, const nodemask_t *origp, int sz, int nbits) __nodes_fold() argument
[all...]
/kernel/linux/linux-5.10/tools/include/linux/
H A Dbitmap.h24 #define BITMAP_LAST_WORD_MASK(nbits) \
26 ((nbits) % BITS_PER_LONG) ? \
27 (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \
30 #define small_const_nbits(nbits) \
31 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
33 static inline void bitmap_zero(unsigned long *dst, int nbits) in bitmap_zero() argument
35 if (small_const_nbits(nbits)) in bitmap_zero()
38 int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); in bitmap_zero()
43 static inline void bitmap_fill(unsigned long *dst, unsigned int nbits) in bitmap_fill() argument
53 bitmap_empty(const unsigned long *src, unsigned nbits) bitmap_empty() argument
61 bitmap_full(const unsigned long *src, unsigned int nbits) bitmap_full() argument
69 bitmap_weight(const unsigned long *src, int nbits) bitmap_weight() argument
76 bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, int nbits) bitmap_or() argument
123 bitmap_alloc(int nbits) bitmap_alloc() argument
154 bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_and() argument
170 bitmap_equal(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_equal() argument
[all...]
/kernel/linux/linux-6.6/tools/include/linux/
H A Dbitmap.h26 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1)))
28 static inline void bitmap_zero(unsigned long *dst, unsigned int nbits) in bitmap_zero() argument
30 if (small_const_nbits(nbits)) in bitmap_zero()
33 int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); in bitmap_zero()
38 static inline void bitmap_fill(unsigned long *dst, unsigned int nbits) in bitmap_fill() argument
40 unsigned int nlongs = BITS_TO_LONGS(nbits); in bitmap_fill()
41 if (!small_const_nbits(nbits)) { in bitmap_fill()
45 dst[nlongs - 1] = BITMAP_LAST_WORD_MASK(nbits); in bitmap_fill()
48 static inline bool bitmap_empty(const unsigned long *src, unsigned int nbits) in bitmap_empty() argument
56 bitmap_full(const unsigned long *src, unsigned int nbits) bitmap_full() argument
64 bitmap_weight(const unsigned long *src, unsigned int nbits) bitmap_weight() argument
71 bitmap_or(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_or() argument
84 bitmap_zalloc(int nbits) bitmap_zalloc() argument
115 bitmap_and(unsigned long *dst, const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_and() argument
131 bitmap_equal(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_equal() argument
142 bitmap_intersects(const unsigned long *src1, const unsigned long *src2, unsigned int nbits) bitmap_intersects() argument
[all...]
/kernel/linux/linux-5.10/net/ethtool/
H A Dbitset.c32 * Clear @nbits bits of a bitmap with indices @start <= i < @end
119 * @nbits: bit size of the bitmap
128 static void ethnl_bitmap32_update(u32 *dst, unsigned int nbits, in ethnl_bitmap32_update() argument
131 while (nbits > 0) { in ethnl_bitmap32_update()
135 if (nbits < 32) in ethnl_bitmap32_update()
136 real_mask &= ethnl_lower_bits(nbits); in ethnl_bitmap32_update()
143 if (nbits <= 32) in ethnl_bitmap32_update()
146 nbits -= 32; in ethnl_bitmap32_update()
162 * @nbits: bit length of the bitset
171 int ethnl_bitset32_size(const u32 *val, const u32 *mask, unsigned int nbits, in ethnl_bitset32_size() argument
232 ethnl_put_bitset32(struct sk_buff *skb, int attrtype, const u32 *val, const u32 *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset32() argument
377 ethnl_parse_bit(unsigned int *index, bool *val, unsigned int nbits, const struct nlattr *bit_attr, bool no_mask, ethnl_string_array_t names, struct netlink_ext_ack *extack) ethnl_parse_bit() argument
429 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
480 ethnl_compact_sanity_checks(unsigned int nbits, const struct nlattr *nest, struct nlattr **tb, struct netlink_ext_ack *extack) ethnl_compact_sanity_checks() argument
552 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
604 ethnl_parse_bitset(unsigned long *val, unsigned long *mask, unsigned int nbits, const struct nlattr *attr, ethnl_string_array_t names, struct netlink_ext_ack *extack) ethnl_parse_bitset() argument
699 ethnl_bitset_size(const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_bitset_size() argument
734 ethnl_put_bitset(struct sk_buff *skb, int attrtype, const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset() argument
771 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
808 ethnl_bitset_size(const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_bitset_size() argument
816 ethnl_put_bitset(struct sk_buff *skb, int attrtype, const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset() argument
825 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...]
H A Dbitset.h12 unsigned int nbits, ethnl_string_array_t names,
14 int ethnl_bitset32_size(const u32 *val, const u32 *mask, unsigned int nbits,
18 unsigned int nbits, ethnl_string_array_t names,
21 const u32 *mask, unsigned int nbits,
23 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits,
26 int ethnl_update_bitset32(u32 *bitmap, unsigned int nbits,
30 unsigned int nbits, const struct nlattr *attr,
/kernel/linux/linux-6.6/net/ethtool/
H A Dbitset.c32 * Clear @nbits bits of a bitmap with indices @start <= i < @end
119 * @nbits: bit size of the bitmap
128 static void ethnl_bitmap32_update(u32 *dst, unsigned int nbits, in ethnl_bitmap32_update() argument
131 while (nbits > 0) { in ethnl_bitmap32_update()
135 if (nbits < 32) in ethnl_bitmap32_update()
136 real_mask &= ethnl_lower_bits(nbits); in ethnl_bitmap32_update()
143 if (nbits <= 32) in ethnl_bitmap32_update()
146 nbits -= 32; in ethnl_bitmap32_update()
162 * @nbits: bit length of the bitset
171 int ethnl_bitset32_size(const u32 *val, const u32 *mask, unsigned int nbits, in ethnl_bitset32_size() argument
232 ethnl_put_bitset32(struct sk_buff *skb, int attrtype, const u32 *val, const u32 *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset32() argument
377 ethnl_parse_bit(unsigned int *index, bool *val, unsigned int nbits, const struct nlattr *bit_attr, bool no_mask, ethnl_string_array_t names, struct netlink_ext_ack *extack) ethnl_parse_bit() argument
429 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
480 ethnl_compact_sanity_checks(unsigned int nbits, const struct nlattr *nest, struct nlattr **tb, struct netlink_ext_ack *extack) ethnl_compact_sanity_checks() argument
552 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
604 ethnl_parse_bitset(unsigned long *val, unsigned long *mask, unsigned int nbits, const struct nlattr *attr, ethnl_string_array_t names, struct netlink_ext_ack *extack) ethnl_parse_bitset() argument
699 ethnl_bitset_size(const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_bitset_size() argument
734 ethnl_put_bitset(struct sk_buff *skb, int attrtype, const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset() argument
771 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
808 ethnl_bitset_size(const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_bitset_size() argument
816 ethnl_put_bitset(struct sk_buff *skb, int attrtype, const unsigned long *val, const unsigned long *mask, unsigned int nbits, ethnl_string_array_t names, bool compact) ethnl_put_bitset() argument
825 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...]
H A Dbitset.h12 unsigned int nbits, ethnl_string_array_t names,
14 int ethnl_bitset32_size(const u32 *val, const u32 *mask, unsigned int nbits,
18 unsigned int nbits, ethnl_string_array_t names,
21 const u32 *mask, unsigned int nbits,
23 int ethnl_update_bitset(unsigned long *bitmap, unsigned int nbits,
26 int ethnl_update_bitset32(u32 *bitmap, unsigned int nbits,
30 unsigned int nbits, const struct nlattr *attr,
/kernel/linux/linux-5.10/lib/
H A Dtest_bitmap.c74 unsigned int nbits) in __check_eq_bitmap()
76 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
79 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
88 const unsigned long *bitmap, unsigned int nbits) in __check_eq_pbl()
90 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap); in __check_eq_pbl()
277 unsigned int nbits = 64; in test_replace() local
278 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); in test_replace()
281 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); in test_replace()
284 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
72 __check_eq_bitmap(const char *srcfile, unsigned int line, const unsigned long *exp_bmap, const unsigned long *bmap, unsigned int nbits) __check_eq_bitmap() argument
86 __check_eq_pbl(const char *srcfile, unsigned int line, const char *expected_pbl, const unsigned long *bitmap, unsigned int nbits) __check_eq_pbl() argument
307 const int nbits; global() member
472 unsigned int nbits, next_bit; test_bitmap_arr32() local
500 unsigned int start, nbits; test_mem_optimisations() local
569 unsigned int nbits; global() member
[all...]
H A Dbitmap.c97 * @nbits : bitmap size, in bits
104 unsigned shift, unsigned nbits) in __bitmap_shift_right()
106 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right()
108 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in __bitmap_shift_right()
141 * @nbits : bitmap size, in bits
149 unsigned int shift, unsigned int nbits) in __bitmap_shift_left()
152 unsigned int lim = BITS_TO_LONGS(nbits); in __bitmap_shift_left()
179 * @nbits: bitmap size, in bits
183 * m such that @first <= n < nbits, and m = n + @cut.
211 unsigned int first, unsigned int cut, unsigned int nbits) in bitmap_cut()
103 __bitmap_shift_right(unsigned long *dst, const unsigned long *src, unsigned shift, unsigned nbits) __bitmap_shift_right() argument
148 __bitmap_shift_left(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) __bitmap_shift_left() argument
210 bitmap_cut(unsigned long *dst, const unsigned long *src, unsigned int first, unsigned int cut, unsigned int nbits) bitmap_cut() argument
294 __bitmap_replace(unsigned long *dst, const unsigned long *old, const unsigned long *new, const unsigned long *mask, unsigned int nbits) __bitmap_replace() argument
504 bitmap_set_region(const struct region *r, unsigned long *bitmap, int nbits) bitmap_set_region() argument
798 bitmap_pos_to_ord(const unsigned long *buf, unsigned int pos, unsigned int nbits) bitmap_pos_to_ord() argument
824 bitmap_ord_to_pos(const unsigned long *buf, unsigned int ord, unsigned int nbits) bitmap_ord_to_pos() argument
868 bitmap_remap(unsigned long *dst, const unsigned long *src, const unsigned long *old, const unsigned long *new, unsigned int nbits) bitmap_remap() argument
1071 bitmap_fold(unsigned long *dst, const unsigned long *orig, unsigned int sz, unsigned int nbits) bitmap_fold() argument
1234 bitmap_copy_le(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy_le() argument
1248 bitmap_alloc(unsigned int nbits, gfp_t flags) bitmap_alloc() argument
1255 bitmap_zalloc(unsigned int nbits, gfp_t flags) bitmap_zalloc() argument
1274 devm_bitmap_alloc(struct device *dev, unsigned int nbits, gfp_t flags) devm_bitmap_alloc() argument
1292 devm_bitmap_zalloc(struct device *dev, unsigned int nbits, gfp_t flags) devm_bitmap_zalloc() argument
1306 bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, unsigned int nbits) bitmap_from_arr32() argument
1329 bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, unsigned int nbits) bitmap_to_arr32() argument
[all...]
/kernel/linux/linux-6.6/fs/ntfs3/
H A Dbitfunc.c31 * Return: True if all bits [bit, bit+nbits) are zeros "0".
33 bool are_bits_clear(const void *lmap, size_t bit, size_t nbits) in are_bits_clear() argument
39 if (8 - pos >= nbits) in are_bits_clear()
40 return !nbits || !(*map & fill_mask[pos + nbits] & in are_bits_clear()
45 nbits -= 8 - pos; in are_bits_clear()
51 if (nbits >= pos * 8) { in are_bits_clear()
52 for (nbits -= pos * 8; pos; pos--, map++) { in are_bits_clear()
59 for (pos = nbits / BITS_IN_SIZE_T; pos; pos--, map += sizeof(size_t)) { in are_bits_clear()
64 for (pos = (nbits in are_bits_clear()
81 are_bits_set(const void *lmap, size_t bit, size_t nbits) are_bits_set() argument
[all...]
/kernel/linux/linux-6.6/drivers/soc/tegra/fuse/
H A Dfuse-tegra30.c141 .nbits = 32,
147 .nbits = 32,
153 .nbits = 32,
159 .nbits = 32,
165 .nbits = 32,
171 .nbits = 32,
177 .nbits = 32,
183 .nbits = 32,
189 .nbits = 32,
195 .nbits
[all...]
/kernel/linux/linux-6.6/lib/
H A Dbitmap.c97 * @nbits : bitmap size, in bits
104 unsigned shift, unsigned nbits) in __bitmap_shift_right()
106 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right()
108 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in __bitmap_shift_right()
141 * @nbits : bitmap size, in bits
149 unsigned int shift, unsigned int nbits) in __bitmap_shift_left()
152 unsigned int lim = BITS_TO_LONGS(nbits); in __bitmap_shift_left()
179 * @nbits: bitmap size, in bits
183 * m such that @first <= n < nbits, and m = n + @cut.
211 unsigned int first, unsigned int cut, unsigned int nbits) in bitmap_cut()
103 __bitmap_shift_right(unsigned long *dst, const unsigned long *src, unsigned shift, unsigned nbits) __bitmap_shift_right() argument
148 __bitmap_shift_left(unsigned long *dst, const unsigned long *src, unsigned int shift, unsigned int nbits) __bitmap_shift_left() argument
210 bitmap_cut(unsigned long *dst, const unsigned long *src, unsigned int first, unsigned int cut, unsigned int nbits) bitmap_cut() argument
294 __bitmap_replace(unsigned long *dst, const unsigned long *old, const unsigned long *new, const unsigned long *mask, unsigned int nbits) __bitmap_replace() argument
650 unsigned int nbits; global() member
963 bitmap_pos_to_ord(const unsigned long *buf, unsigned int pos, unsigned int nbits) bitmap_pos_to_ord() argument
1003 bitmap_remap(unsigned long *dst, const unsigned long *src, const unsigned long *old, const unsigned long *new, unsigned int nbits) bitmap_remap() argument
1209 bitmap_fold(unsigned long *dst, const unsigned long *orig, unsigned int sz, unsigned int nbits) bitmap_fold() argument
1372 bitmap_copy_le(unsigned long *dst, const unsigned long *src, unsigned int nbits) bitmap_copy_le() argument
1386 bitmap_alloc(unsigned int nbits, gfp_t flags) bitmap_alloc() argument
1393 bitmap_zalloc(unsigned int nbits, gfp_t flags) bitmap_zalloc() argument
1399 bitmap_alloc_node(unsigned int nbits, gfp_t flags, int node) bitmap_alloc_node() argument
1406 bitmap_zalloc_node(unsigned int nbits, gfp_t flags, int node) bitmap_zalloc_node() argument
1425 devm_bitmap_alloc(struct device *dev, unsigned int nbits, gfp_t flags) devm_bitmap_alloc() argument
1443 devm_bitmap_zalloc(struct device *dev, unsigned int nbits, gfp_t flags) devm_bitmap_zalloc() argument
1457 bitmap_from_arr32(unsigned long *bitmap, const u32 *buf, unsigned int nbits) bitmap_from_arr32() argument
1480 bitmap_to_arr32(u32 *buf, const unsigned long *bitmap, unsigned int nbits) bitmap_to_arr32() argument
1505 bitmap_from_arr64(unsigned long *bitmap, const u64 *buf, unsigned int nbits) bitmap_from_arr64() argument
1535 bitmap_to_arr64(u64 *buf, const unsigned long *bitmap, unsigned int nbits) bitmap_to_arr64() argument
[all...]
H A Dtest_bitmap.c78 unsigned int nbits) in __check_eq_bitmap()
80 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap()
83 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
92 const unsigned long *bitmap, unsigned int nbits) in __check_eq_pbl()
94 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap); in __check_eq_pbl()
337 unsigned int nbits = 64; in test_replace() local
338 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); in test_replace()
341 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); in test_replace()
344 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace()
76 __check_eq_bitmap(const char *srcfile, unsigned int line, const unsigned long *exp_bmap, const unsigned long *bmap, unsigned int nbits) __check_eq_bitmap() argument
90 __check_eq_pbl(const char *srcfile, unsigned int line, const char *expected_pbl, const unsigned long *bitmap, unsigned int nbits) __check_eq_pbl() argument
367 const int nbits; global() member
611 unsigned int nbits, next_bit; test_bitmap_arr32() local
639 unsigned int nbits, next_bit; test_bitmap_arr64() local
675 unsigned int start, nbits; test_mem_optimisations() local
977 unsigned int nbits; global() member
1033 unsigned long nbits; global() member
[all...]
H A Dfind_bit.c131 unsigned long _find_next_bit(const unsigned long *addr, unsigned long nbits, unsigned long start) in _find_next_bit() argument
133 return FIND_NEXT_BIT(addr[idx], /* nop */, nbits, start); in _find_next_bit()
169 unsigned long nbits, unsigned long start) in _find_next_and_bit()
171 return FIND_NEXT_BIT(addr1[idx] & addr2[idx], /* nop */, nbits, start); in _find_next_and_bit()
178 unsigned long nbits, unsigned long start) in _find_next_andnot_bit()
180 return FIND_NEXT_BIT(addr1[idx] & ~addr2[idx], /* nop */, nbits, start); in _find_next_andnot_bit()
187 unsigned long nbits, unsigned long start) in _find_next_or_bit()
189 return FIND_NEXT_BIT(addr1[idx] | addr2[idx], /* nop */, nbits, start); in _find_next_or_bit()
195 unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits, in _find_next_zero_bit() argument
198 return FIND_NEXT_BIT(~addr[idx], /* nop */, nbits, star in _find_next_zero_bit()
168 _find_next_and_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start) _find_next_and_bit() argument
177 _find_next_andnot_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start) _find_next_andnot_bit() argument
186 _find_next_or_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start) _find_next_or_bit() argument
[all...]
/kernel/linux/linux-5.10/lib/mpi/
H A Dmpicoder.c40 unsigned nbits, nlimbs; in mpi_read_raw_data() local
49 nbits = nbytes * 8; in mpi_read_raw_data()
50 if (nbits > MAX_EXTERN_MPI_BITS) { in mpi_read_raw_data()
51 pr_info("MPI: mpi too large (%u bits)\n", nbits); in mpi_read_raw_data()
55 nbits -= count_leading_zeros(buffer[0]) - (BITS_PER_LONG - 8); in mpi_read_raw_data()
61 val->nbits = nbits; in mpi_read_raw_data()
85 unsigned int nbits, nbytes; in mpi_read_from_buffer() local
90 nbits = buffer[0] << 8 | buffer[1]; in mpi_read_from_buffer()
92 if (nbits > MAX_EXTERN_MPI_BIT in mpi_read_from_buffer()
121 unsigned int nbits, nbytes, nlimbs; mpi_fromstr() local
440 unsigned int nbits, nlimbs; mpi_read_raw_from_sgl() local
558 unsigned int nbits = mpi_get_nbits(a); mpi_print() local
[all...]
/kernel/linux/linux-6.6/lib/crypto/mpi/
H A Dmpicoder.c40 unsigned nbits, nlimbs; in mpi_read_raw_data() local
49 nbits = nbytes * 8; in mpi_read_raw_data()
50 if (nbits > MAX_EXTERN_MPI_BITS) { in mpi_read_raw_data()
51 pr_info("MPI: mpi too large (%u bits)\n", nbits); in mpi_read_raw_data()
55 nbits -= count_leading_zeros(buffer[0]) - (BITS_PER_LONG - 8); in mpi_read_raw_data()
61 val->nbits = nbits; in mpi_read_raw_data()
85 unsigned int nbits, nbytes; in mpi_read_from_buffer() local
90 nbits = buffer[0] << 8 | buffer[1]; in mpi_read_from_buffer()
92 if (nbits > MAX_EXTERN_MPI_BIT in mpi_read_from_buffer()
121 unsigned int nbits, nbytes, nlimbs; mpi_fromstr() local
440 unsigned int nbits, nlimbs; mpi_read_raw_from_sgl() local
558 unsigned int nbits = mpi_get_nbits(a); mpi_print() local
[all...]
/kernel/linux/linux-6.6/fs/xfs/
H A Dxfs_buf_item.c64 int nbits) in xfs_buf_item_straddle()
70 offset + ((first_bit + nbits) << XFS_BLF_SHIFT)); in xfs_buf_item_straddle()
72 if (last - first != nbits * XFS_BLF_CHUNK) in xfs_buf_item_straddle()
95 int nbits; in xfs_buf_item_size_segment() local
107 nbits = xfs_contig_bits(blfp->blf_data_map, in xfs_buf_item_size_segment()
109 ASSERT(nbits > 0); in xfs_buf_item_size_segment()
115 if (nbits > 1 && in xfs_buf_item_size_segment()
116 xfs_buf_item_straddle(bp, offset, first_bit, nbits)) in xfs_buf_item_size_segment()
120 *nbytes += nbits * XFS_BLF_CHUNK; in xfs_buf_item_size_segment()
129 (uint)first_bit + nbits in xfs_buf_item_size_segment()
60 xfs_buf_item_straddle( struct xfs_buf *bp, uint offset, int first_bit, int nbits) xfs_buf_item_straddle() argument
254 xfs_buf_item_copy_iovec( struct xfs_log_vec *lv, struct xfs_log_iovec **vecp, struct xfs_buf *bp, uint offset, int first_bit, uint nbits) xfs_buf_item_copy_iovec() argument
281 uint nbits; xfs_buf_item_format_segment() local
[all...]
/kernel/linux/linux-5.10/tools/lib/
H A Dfind_bit.c32 const unsigned long *addr2, unsigned long nbits, in _find_next_bit()
37 if (unlikely(start >= nbits)) in _find_next_bit()
38 return nbits; in _find_next_bit()
51 if (start >= nbits) in _find_next_bit()
52 return nbits; in _find_next_bit()
60 return min(start + __ffs(tmp), nbits); in _find_next_bit()
31 _find_next_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start, unsigned long invert) _find_next_bit() argument
/kernel/linux/linux-6.6/tools/lib/
H A Dfind_bit.c103 unsigned long _find_next_bit(const unsigned long *addr, unsigned long nbits, unsigned long start) in _find_next_bit() argument
105 return FIND_NEXT_BIT(addr[idx], /* nop */, nbits, start); in _find_next_bit()
111 unsigned long nbits, unsigned long start) in _find_next_and_bit()
113 return FIND_NEXT_BIT(addr1[idx] & addr2[idx], /* nop */, nbits, start); in _find_next_and_bit()
118 unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits, in _find_next_zero_bit() argument
121 return FIND_NEXT_BIT(~addr[idx], /* nop */, nbits, start); in _find_next_zero_bit()
110 _find_next_and_bit(const unsigned long *addr1, const unsigned long *addr2, unsigned long nbits, unsigned long start) _find_next_and_bit() argument
/kernel/linux/linux-6.6/include/asm-generic/
H A Dbitsperlong.h35 #define small_const_nbits(nbits) \
36 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
/kernel/linux/linux-5.10/fs/omfs/
H A Dbitmap.c13 int nbits = sb->s_blocksize * 8; in omfs_count_free() local
16 sum += nbits - bitmap_weight(sbi->s_imap[i], nbits); in omfs_count_free()
26 static int count_run(unsigned long **addr, int nbits, in count_run() argument
33 x = find_next_bit(*addr, nbits, bit); in count_run()
36 if (x < nbits || count > max) in count_run()
49 int nbits, int bit, int count, int set) in set_run()
62 if (bit >= nbits) { in set_run()
48 set_run(struct super_block *sb, int map, int nbits, int bit, int count, int set) set_run() argument
/kernel/linux/linux-6.6/fs/omfs/
H A Dbitmap.c13 int nbits = sb->s_blocksize * 8; in omfs_count_free() local
16 sum += nbits - bitmap_weight(sbi->s_imap[i], nbits); in omfs_count_free()
26 static int count_run(unsigned long **addr, int nbits, in count_run() argument
33 x = find_next_bit(*addr, nbits, bit); in count_run()
36 if (x < nbits || count > max) in count_run()
49 int nbits, int bit, int count, int set) in set_run()
62 if (bit >= nbits) { in set_run()
48 set_run(struct super_block *sb, int map, int nbits, int bit, int count, int set) set_run() argument

Completed in 21 milliseconds

123456789