Home
last modified time | relevance | path

Searched refs:nbits (Results 1 – 25 of 136) sorted by relevance

123456

/openbmc/linux/include/linux/
H A Dbitmap.h244 #define bitmap_size(nbits) (ALIGN(nbits, BITS_PER_LONG) / BITS_PER_BYTE) argument
285 dst[nbits / BITS_PER_LONG] &= BITMAP_LAST_WORD_MASK(nbits); in bitmap_copy_clear_tail()
441 return find_first_bit(src, nbits) == nbits; in bitmap_empty()
449 return find_first_zero_bit(src, nbits) == nbits; in bitmap_full()
470 unsigned int nbits) in bitmap_set() argument
472 if (__builtin_constant_p(nbits) && nbits == 1) in bitmap_set()
486 unsigned int nbits) in bitmap_clear() argument
488 if (__builtin_constant_p(nbits) && nbits == 1) in bitmap_clear()
639 if (unlikely(!nbits || nbits > BITS_PER_LONG)) in bitmap_read()
642 if (space >= nbits) in bitmap_read()
[all …]
H A Dnodemask.h143 bitmap_fill(dstp->bits, nbits); in __nodes_setall()
149 bitmap_zero(dstp->bits, nbits); in __nodes_clear()
197 const nodemask_t *srcp, unsigned int nbits) in __nodes_complement() argument
229 return bitmap_empty(srcp->bits, nbits); in __nodes_empty()
235 return bitmap_full(srcp->bits, nbits); in __nodes_full()
241 return bitmap_weight(srcp->bits, nbits); in __nodes_weight()
247 const nodemask_t *srcp, int n, int nbits) in __nodes_shift_right() argument
255 const nodemask_t *srcp, int n, int nbits) in __nodes_shift_left() argument
342 nodemask_t *dstp, int nbits) in __nodemask_parse_user() argument
372 const nodemask_t *relmapp, int nbits) in __nodes_onto() argument
[all …]
/openbmc/linux/tools/include/linux/
H A Dbitmap.h27 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) argument
29 #define bitmap_size(nbits) (ALIGN(nbits, BITS_PER_LONG) / BITS_PER_BYTE) argument
33 if (small_const_nbits(nbits)) in bitmap_zero()
52 if (small_const_nbits(nbits)) in bitmap_empty()
55 return find_first_bit(src, nbits) == nbits; in bitmap_empty()
60 if (small_const_nbits(nbits)) in bitmap_full()
63 return find_first_zero_bit(src, nbits) == nbits; in bitmap_full()
68 if (small_const_nbits(nbits)) in bitmap_weight()
76 if (small_const_nbits(nbits)) in bitmap_or()
120 if (small_const_nbits(nbits)) in bitmap_and()
[all …]
/openbmc/qemu/include/qemu/
H A Dbitmap.h67 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) argument
107 if (small_nbits(nbits)) { in bitmap_zero()
128 if (small_nbits(nbits)) { in bitmap_copy()
139 if (small_nbits(nbits)) { in bitmap_and()
148 if (small_nbits(nbits)) { in bitmap_or()
158 if (small_nbits(nbits)) { in bitmap_xor()
168 if (small_nbits(nbits)) { in bitmap_andnot()
178 if (small_nbits(nbits)) { in bitmap_complement()
188 if (small_nbits(nbits)) { in bitmap_equal()
197 if (small_nbits(nbits)) { in bitmap_empty()
[all …]
/openbmc/linux/net/ethtool/
H A Dbitset.c131 while (nbits > 0) { in ethnl_bitmap32_update()
135 if (nbits < 32) in ethnl_bitmap32_update()
143 if (nbits <= 32) in ethnl_bitmap32_update()
146 nbits -= 32; in ethnl_bitmap32_update()
257 if (nbits % 32) in ethnl_put_bitset32()
266 if (nbits % 32) in ethnl_put_bitset32()
394 if (idx >= nbits) { in ethnl_parse_bit()
523 if (attr_nbits <= nbits) in ethnl_compact_sanity_checks()
631 if (change_bits > nbits) in ethnl_parse_bitset()
632 change_bits = nbits; in ethnl_parse_bitset()
[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,
/openbmc/linux/fs/ntfs3/
H A Dbitfunc.c39 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()
69 pos = nbits & 7; in are_bits_clear()
88 if (8 - pos >= nbits) { in are_bits_set()
90 return !nbits || (*map & mask) == mask; in are_bits_set()
96 nbits -= 8 - pos; in are_bits_set()
102 if (nbits >= pos * 8) { in are_bits_set()
[all …]
/openbmc/linux/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 = 32,
[all …]
/openbmc/linux/lib/
H A Dtest_bitmap.c78 unsigned int nbits) in __check_eq_bitmap() argument
83 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap()
367 const int nbits; member
617 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) { in test_bitmap_arr32()
623 round_up(nbits, BITS_PER_LONG), nbits); in test_bitmap_arr32()
645 for (nbits = 0; nbits < EXP1_IN_BITS; ++nbits) { in test_bitmap_arr64()
659 (arr[(nbits - 1) / 64] & ~GENMASK_ULL((nbits - 1) % 64, 0))) { in test_bitmap_arr64()
661 nbits, arr[(nbits - 1) / 64], in test_bitmap_arr64()
678 for (nbits = 0; nbits < 1024 - start; nbits += 8) { in test_mem_optimisations()
701 nbits); in test_mem_optimisations()
[all …]
H A Dbitmap.c650 unsigned int nbits; member
666 if (r->end >= r->nbits) in bitmap_check_region()
812 r.nbits = nmaskbits; in bitmap_parselist()
813 bitmap_zero(maskp, r.nbits); in bitmap_parselist()
1005 unsigned int nbits) in bitmap_remap() argument
1011 bitmap_zero(dst, nbits); in bitmap_remap()
1216 bitmap_zero(dst, nbits); in bitmap_fold()
1469 if (nbits % BITS_PER_LONG) in bitmap_from_arr32()
1492 if (nbits % BITS_PER_LONG) in bitmap_to_arr32()
1524 if (nbits % BITS_PER_LONG) in bitmap_from_arr64()
[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() argument
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() argument
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() argument
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, start); in _find_next_zero_bit()
/openbmc/qemu/util/
H A Dbitmap.c412 if (nbits % BITS_PER_LONG) { in slow_bitmap_count_one()
422 long len = BITS_TO_LONGS(nbits); in bitmap_to_from_le()
440 long nbits) in bitmap_from_le() argument
446 long nbits) in bitmap_to_le() argument
467 bitmap_copy(dst, src, nbits); in bitmap_copy_with_src_offset()
474 while (nbits >= BITS_PER_LONG) { in bitmap_copy_with_src_offset()
479 nbits -= BITS_PER_LONG; in bitmap_copy_with_src_offset()
487 } else if (nbits) { in bitmap_copy_with_src_offset()
517 while (nbits >= BITS_PER_LONG) { in bitmap_copy_with_dst_offset()
522 nbits -= BITS_PER_LONG; in bitmap_copy_with_dst_offset()
[all …]
H A Dthread-context.c92 int nbits = 0, ret; in thread_context_set_cpu_affinity() local
109 nbits = MAX(nbits, l->value + 1); in thread_context_set_cpu_affinity()
111 bitmap = bitmap_new(nbits); in thread_context_set_cpu_affinity()
128 tc->init_cpu_nbits = nbits; in thread_context_set_cpu_affinity()
139 unsigned long *bitmap, nbits, value; in thread_context_get_cpu_affinity() local
156 value = find_first_bit(bitmap, nbits); in thread_context_get_cpu_affinity()
157 while (value < nbits) { in thread_context_get_cpu_affinity()
194 bitmap = bitmap_new(nbits); in thread_context_set_node_affinity()
203 for (i = 0; i < nbits; i++) { in thread_context_set_node_affinity()
211 if (bitmap_empty(bitmap, nbits)) { in thread_context_set_node_affinity()
[all …]
/openbmc/u-boot/include/linux/
H A Dbitmap.h9 #define small_const_nbits(nbits) \ argument
10 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG)
12 static inline void bitmap_zero(unsigned long *dst, int nbits) in bitmap_zero() argument
14 if (small_const_nbits(nbits)) { in bitmap_zero()
17 int len = BITS_TO_LONGS(nbits) * sizeof(unsigned long); in bitmap_zero()
/openbmc/linux/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()
61 val->nbits = nbits; in mpi_read_raw_data()
133 nbits = strlen(str); in mpi_fromstr()
138 nbits *= 4; in mpi_fromstr()
139 if ((nbits % 8)) in mpi_fromstr()
142 nbytes = (nbits+7) / 8; in mpi_fromstr()
476 nbits = nbytes * 8; in mpi_read_raw_from_sgl()
493 val->nbits = nbits; in mpi_read_raw_from_sgl()
656 s[0] = nbits >> 8; in mpi_print()
[all …]
H A Dmpi-bit.c183 unsigned int nbits = (n%BITS_PER_MPI_LIMB); in mpi_rshift() local
198 if (x->nlimbs && nbits) in mpi_rshift()
199 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift()
222 if (x->nlimbs && nbits) in mpi_rshift()
223 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift()
232 if (nbits) in mpi_rshift()
233 mpihelp_rshift(x->d, a->d, x->nlimbs, nbits); in mpi_rshift()
276 unsigned int nbits = (n%BITS_PER_MPI_LIMB); in mpi_lshift() local
296 if (nlimbs && !nbits) { in mpi_lshift()
304 mpi_rshift(x, x, BITS_PER_MPI_LIMB - nbits); in mpi_lshift()
/openbmc/linux/fs/xfs/
H A Dxfs_buf_item.c64 int nbits) in xfs_buf_item_straddle() argument
95 int nbits; in xfs_buf_item_size_segment() local
109 ASSERT(nbits > 0); in xfs_buf_item_size_segment()
115 if (nbits > 1 && in xfs_buf_item_size_segment()
160 nbits = 1; in xfs_buf_item_size_segment()
163 nbits++; in xfs_buf_item_size_segment()
260 uint nbits) in xfs_buf_item_copy_iovec() argument
281 uint nbits; in xfs_buf_item_format_segment() local
353 nbits = 1; in xfs_buf_item_format_segment()
382 nbits = 1; in xfs_buf_item_format_segment()
[all …]
/openbmc/linux/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() argument
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()
H A Dbitmap.c31 size_t bitmap_scnprintf(unsigned long *bitmap, unsigned int nbits, in bitmap_scnprintf() argument
39 rbot = cur = find_first_bit(bitmap, nbits); in bitmap_scnprintf()
40 while (cur < nbits) { in bitmap_scnprintf()
42 cur = find_next_bit(bitmap, nbits, cur + 1); in bitmap_scnprintf()
43 if (cur < nbits && cur <= rtop + 1) in bitmap_scnprintf()
/openbmc/linux/include/asm-generic/
H A Dbitsperlong.h35 #define small_const_nbits(nbits) \ argument
36 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
/openbmc/linux/tools/include/asm-generic/
H A Dbitsperlong.h21 #define small_const_nbits(nbits) \ argument
22 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
/openbmc/linux/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() argument
62 if (bit >= nbits) { in set_run()
/openbmc/linux/drivers/firmware/efi/libstub/
H A Dfind.c34 unsigned long _find_next_bit(const unsigned long *addr, unsigned long nbits, unsigned long start) in _find_next_bit() argument
36 return FIND_NEXT_BIT(addr[idx], /* nop */, nbits, start); in _find_next_bit()
39 unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits, in _find_next_zero_bit() argument
42 return FIND_NEXT_BIT(~addr[idx], /* nop */, nbits, start); in _find_next_zero_bit()
/openbmc/linux/fs/btrfs/
H A Dmisc.h146 unsigned long nbits) in bitmap_test_range_all_set() argument
150 found_zero = find_next_zero_bit(addr, start + nbits, start); in bitmap_test_range_all_set()
151 return (found_zero == start + nbits); in bitmap_test_range_all_set()
156 unsigned long nbits) in bitmap_test_range_all_zero() argument
160 found_set = find_next_bit(addr, start + nbits, start); in bitmap_test_range_all_zero()
161 return (found_set == start + nbits); in bitmap_test_range_all_zero()
/openbmc/linux/arch/ia64/mm/
H A Dtlb.c273 ia64_ptcga(start, (nbits << 2)); in ia64_global_tlb_purge()
275 start += (1UL << nbits); in ia64_global_tlb_purge()
316 unsigned long nbits; in __flush_tlb_range() local
325 nbits = ia64_fls(size + 0xfff); in __flush_tlb_range()
327 (nbits < purge.max_bits)) in __flush_tlb_range()
328 ++nbits; in __flush_tlb_range()
329 if (nbits > purge.max_bits) in __flush_tlb_range()
330 nbits = purge.max_bits; in __flush_tlb_range()
331 start &= ~((1UL << nbits) - 1); in __flush_tlb_range()
342 ia64_ptcl(start, (nbits<<2)); in __flush_tlb_range()
[all …]

123456