/kernel/linux/linux-5.10/include/linux/ |
D | bitmap.h | 123 extern unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags); 124 extern unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags); 129 unsigned int nbits, gfp_t flags); 131 unsigned int nbits, gfp_t flags); 137 extern int __bitmap_empty(const unsigned long *bitmap, unsigned int nbits); 138 extern int __bitmap_full(const unsigned long *bitmap, unsigned int nbits); 140 const unsigned long *bitmap2, unsigned int nbits); 144 unsigned int nbits); 146 unsigned int nbits); 148 unsigned int shift, unsigned int nbits); [all …]
|
D | nodemask.h | 140 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() argument 166 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_and() 172 const nodemask_t *src2p, unsigned int nbits) in __nodes_or() argument 174 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_or() 180 const nodemask_t *src2p, unsigned int nbits) in __nodes_xor() argument 182 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_xor() [all …]
|
/kernel/linux/linux-5.10/tools/include/linux/ |
D | bitmap.h | 24 #define BITMAP_LAST_WORD_MASK(nbits) \ argument 26 ((nbits) % BITS_PER_LONG) ? \ 27 (1UL<<((nbits) % BITS_PER_LONG))-1 : ~0UL \ 30 #define small_const_nbits(nbits) \ argument 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 45 unsigned int nlongs = BITS_TO_LONGS(nbits); in bitmap_fill() [all …]
|
/kernel/linux/linux-5.10/net/ethtool/ |
D | bitset.c | 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() 171 int ethnl_bitset32_size(const u32 *val, const u32 *mask, unsigned int nbits, in ethnl_bitset32_size() argument 183 unsigned int nwords = DIV_ROUND_UP(nbits, 32); in ethnl_bitset32_size() 191 for (i = 0; i < nbits; i++) { in ethnl_bitset32_size() 233 const u32 *mask, unsigned int nbits, in ethnl_put_bitset32() argument [all …]
|
D | bitset.h | 12 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/ |
D | test_bitmap.c | 74 unsigned int nbits) in __check_eq_bitmap() argument 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() argument 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() 285 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace() [all …]
|
D | bitmap.c | 104 unsigned shift, unsigned nbits) in __bitmap_shift_right() argument 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() 149 unsigned int shift, unsigned int nbits) in __bitmap_shift_left() argument 152 unsigned int lim = BITS_TO_LONGS(nbits); in __bitmap_shift_left() 211 unsigned int first, unsigned int cut, unsigned int nbits) in bitmap_cut() argument 213 unsigned int len = BITS_TO_LONGS(nbits); in bitmap_cut() 296 const unsigned long *mask, unsigned int nbits) in __bitmap_replace() argument 299 unsigned int nr = BITS_TO_LONGS(nbits); in __bitmap_replace() 505 unsigned long *bitmap, int nbits) in bitmap_set_region() argument [all …]
|
D | find_bit.c | 32 const unsigned long *addr2, unsigned long nbits, in _find_next_bit() argument 37 if (unlikely(start >= nbits)) in _find_next_bit() 38 return nbits; in _find_next_bit() 56 if (start >= nbits) in _find_next_bit() 57 return nbits; in _find_next_bit() 68 return min(start + __ffs(tmp), nbits); in _find_next_bit()
|
D | genalloc.c | 187 unsigned long nbits = size >> pool->min_alloc_order; in gen_pool_add_owner() local 189 BITS_TO_LONGS(nbits) * sizeof(long); in gen_pool_add_owner() 282 unsigned long nbits, start_bit, end_bit, remain; in gen_pool_alloc_algo_owner() local 294 nbits = (size + (1UL << order) - 1) >> order; in gen_pool_alloc_algo_owner() 304 nbits, data, pool, chunk->start_addr); in gen_pool_alloc_algo_owner() 307 remain = bitmap_set_ll(chunk->bits, start_bit, nbits); in gen_pool_alloc_algo_owner() 310 nbits - remain); in gen_pool_alloc_algo_owner() 316 size = nbits << order; in gen_pool_alloc_algo_owner() 491 unsigned long start_bit, nbits, remain; in gen_pool_free_owner() local 500 nbits = (size + (1UL << order) - 1) >> order; in gen_pool_free_owner() [all …]
|
/kernel/linux/linux-5.10/lib/mpi/ |
D | mpicoder.c | 40 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_BITS) { in mpi_read_from_buffer() 93 pr_info("MPI: mpi too large (%u bits)\n", nbits); in mpi_read_from_buffer() [all …]
|
D | mpi-bit.c | 183 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() 275 unsigned int nbits = (n%BITS_PER_MPI_LIMB); in mpi_lshift() local 295 if (nlimbs && !nbits) { in mpi_lshift() 303 mpi_rshift(x, x, BITS_PER_MPI_LIMB - nbits); in mpi_lshift()
|
/kernel/linux/linux-5.10/tools/lib/ |
D | find_bit.c | 32 const unsigned long *addr2, unsigned long nbits, in _find_next_bit() argument 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()
|
D | bitmap.c | 31 size_t bitmap_scnprintf(unsigned long *bitmap, 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()
|
/kernel/linux/linux-5.10/drivers/soc/tegra/fuse/ |
D | fuse-tegra.c | 101 .nbits = 32, 107 .nbits = 32, 113 .nbits = 32, 119 .nbits = 32, 125 .nbits = 32, 131 .nbits = 2, 137 .nbits = 32, 143 .nbits = 32, 149 .nbits = 32, 155 .nbits = 32, [all …]
|
/kernel/linux/linux-5.10/fs/omfs/ |
D | bitmap.c | 13 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()
|
/kernel/linux/linux-5.10/arch/ia64/mm/ |
D | tlb.c | 250 unsigned long end, unsigned long nbits) in ia64_global_tlb_purge() argument 273 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() 326 while (unlikely (((1UL << nbits) & purge.mask) == 0) && 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() [all …]
|
/kernel/linux/linux-5.10/drivers/regulator/ |
D | da903x-regulator.c | 309 #define DA903x_LDO(_pmic, _id, min, max, step, vreg, shift, nbits, ereg, ebit) \ argument 324 .vol_nbits = (nbits), \ 329 #define DA903x_DVC(_pmic, _id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \ argument 344 .vol_nbits = (nbits), \ 351 #define DA9034_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \ argument 352 DA903x_LDO(DA9034, _id, min, max, step, vreg, shift, nbits, ereg, ebit) 354 #define DA9030_LDO(_id, min, max, step, vreg, shift, nbits, ereg, ebit) \ argument 355 DA903x_LDO(DA9030, _id, min, max, step, vreg, shift, nbits, ereg, ebit) 357 #define DA9030_DVC(_id, min, max, step, vreg, nbits, ureg, ubit, ereg, ebit) \ argument 358 DA903x_DVC(DA9030, _id, min, max, step, vreg, nbits, ureg, ubit, \ [all …]
|
D | tps6586x-regulator.c | 109 #define TPS6586X_REGULATOR(_id, _ops, _pin_name, vdata, vreg, shift, nbits, \ argument 123 .vsel_mask = ((1 << (nbits)) - 1) << (shift), \ 133 uv_step, vreg, shift, nbits, ereg0, \ argument 148 .vsel_mask = ((1 << (nbits)) - 1) << (shift), \ 157 #define TPS6586X_LDO(_id, _pname, vdata, vreg, shift, nbits, \ argument 160 TPS6586X_REGULATOR(_id, rw, _pname, vdata, vreg, shift, nbits, \ 165 shift, nbits, ereg0, ebit0, ereg1, ebit1) \ argument 168 min_uv, uv_step, vreg, shift, nbits, \ 172 #define TPS6586X_FIXED_LDO(_id, _pname, vdata, vreg, shift, nbits, \ argument 175 TPS6586X_REGULATOR(_id, ro, _pname, vdata, vreg, shift, nbits, \ [all …]
|
/kernel/linux/linux-5.10/drivers/net/ethernet/tehuti/ |
D | tehuti.h | 127 #define BITS_MASK(nbits) ((1<<nbits)-1) argument 128 #define GET_BITS_SHIFT(x, nbits, nshift) (((x)>>nshift)&BITS_MASK(nbits)) argument 129 #define BITS_SHIFT_MASK(nbits, nshift) (BITS_MASK(nbits)<<nshift) argument 130 #define BITS_SHIFT_VAL(x, nbits, nshift) (((x)&BITS_MASK(nbits))<<nshift) argument 131 #define BITS_SHIFT_CLEAR(x, nbits, nshift) \ argument 132 ((x)&(~BITS_SHIFT_MASK(nbits, nshift)))
|
/kernel/linux/linux-5.10/drivers/media/usb/pwc/ |
D | pwc-dec23.c | 298 pdec->nbits = 7; /* More bits, mean more bits to encode the stream, but better quality */ in pwc_dec23_init() 300 pdec->nbits = 8; in pwc_dec23_init() 302 pdec->nbits = 6; in pwc_dec23_init() 312 pdec->nbits = 7; in pwc_dec23_init() 314 pdec->nbits = 8; in pwc_dec23_init() 316 pdec->nbits = 6; in pwc_dec23_init() 324 shift = 8 - pdec->nbits; in pwc_dec23_init() 496 __get_nbits(pdec, pdec->nbits, primary_color); in decode_block() 542 unsigned int nbits, col1; in decode_block() local 550 nbits = ptable8004[offset1 * 2]; in decode_block() [all …]
|
/kernel/linux/linux-5.10/drivers/net/wireless/broadcom/brcm80211/include/ |
D | brcmu_utils.h | 44 #define NBITVAL(nbits) (1 << (nbits)) argument 45 #define MAXBITVAL(nbits) ((1 << (nbits)) - 1) argument 46 #define NBITMASK(nbits) MAXBITVAL(nbits) argument
|
/kernel/linux/linux-5.10/fs/xfs/ |
D | xfs_buf_item_recover.c | 445 int nbits; in xlog_recover_do_reg_buffer() local 458 nbits = xfs_contig_bits(buf_f->blf_data_map, in xlog_recover_do_reg_buffer() 460 ASSERT(nbits > 0); in xlog_recover_do_reg_buffer() 464 ((uint)bit << XFS_BLF_SHIFT) + (nbits << XFS_BLF_SHIFT)); in xlog_recover_do_reg_buffer() 474 if (item->ri_buf[i].i_len < (nbits << XFS_BLF_SHIFT)) in xlog_recover_do_reg_buffer() 475 nbits = item->ri_buf[i].i_len >> XFS_BLF_SHIFT; in xlog_recover_do_reg_buffer() 508 nbits<<XFS_BLF_SHIFT); /* length */ in xlog_recover_do_reg_buffer() 511 bit += nbits; in xlog_recover_do_reg_buffer() 586 int nbits = 0; in xlog_recover_do_inode_buffer() local 616 bit += nbits; in xlog_recover_do_inode_buffer() [all …]
|
/kernel/linux/linux-5.10/sound/mips/ |
D | ad1843.c | 31 char nbits; member 178 return w >> field->lo_bit & ((1 << field->nbits) - 1); in ad1843_read_bits() 192 mask = ((1 << field->nbits) - 1) << field->lo_bit; in ad1843_write_bits() 229 mask = (1 << fp->nbits) - 1; in ad1843_read_multi() 266 m = ((1 << fp->nbits) - 1) << fp->lo_bit; in ad1843_write_multi() 285 ret = (1 << gp->lfield->nbits); in ad1843_get_gain_max() 300 unsigned short mask = (1 << gp->lfield->nbits) - 1; in ad1843_get_gain() 326 unsigned short mask = (1 << gp->lfield->nbits) - 1; in ad1843_set_gain()
|
/kernel/liteos_a/kernel/include/ |
D | los_bitmap.h | 61 #define BITMAP_LAST_WORD_MASK(nbits) \ argument 62 (((nbits) % BITMAP_BITS_PER_WORD) ? (1UL << ((nbits) % BITMAP_BITS_PER_WORD)) - 1 : ~0UL)
|
/kernel/linux/linux-5.10/arch/c6x/platforms/ |
D | dscr.c | 71 u8 nbits; /* number of bits per device */ member 89 u8 nbits; /* number of bits per device */ member 209 ctl_shift = ctl->shift + ctl->nbits * (id - ctl->start_id); in dscr_set_devstate() 210 ctl_mask = ((1 << ctl->nbits) - 1) << ctl_shift; in dscr_set_devstate() 238 ctl_shift = stat->shift + stat->nbits * (id - stat->start_id); in dscr_set_devstate() 248 val &= ((1 << stat->nbits) - 1); in dscr_set_devstate() 491 r->nbits = be32_to_cpup(p++); in dscr_parse_devstate_ctl_regs() 545 r->nbits = be32_to_cpup(p++); in dscr_parse_devstate_stat_regs()
|