/Linux-v6.1/include/linux/ |
D | bitmap.h | 122 unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags); 123 unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags); 124 unsigned long *bitmap_alloc_node(unsigned int nbits, gfp_t flags, int node); 125 unsigned long *bitmap_zalloc_node(unsigned int nbits, gfp_t flags, int node); 130 unsigned int nbits, gfp_t flags); 132 unsigned int nbits, gfp_t flags); 139 const unsigned long *bitmap2, unsigned int nbits); 143 unsigned int nbits); 145 unsigned int nbits); 147 unsigned int shift, unsigned int nbits); [all …]
|
D | nodemask.h | 141 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() argument 167 bitmap_and(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_and() 173 const nodemask_t *src2p, unsigned int nbits) in __nodes_or() argument 175 bitmap_or(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_or() 181 const nodemask_t *src2p, unsigned int nbits) in __nodes_xor() argument 183 bitmap_xor(dstp->bits, src1p->bits, src2p->bits, nbits); in __nodes_xor() [all …]
|
/Linux-v6.1/tools/include/linux/ |
D | bitmap.h | 26 #define BITMAP_LAST_WORD_MASK(nbits) (~0UL >> (-(nbits) & (BITS_PER_LONG - 1))) argument 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 50 if (small_const_nbits(nbits)) in bitmap_empty() [all …]
|
/Linux-v6.1/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,
|
/Linux-v6.1/fs/ntfs3/ |
D | bitfunc.c | 33 bool are_bits_clear(const ulong *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 % BITS_IN_SIZE_T) >> 3; pos; pos--, map++) { in are_bits_clear() 69 pos = nbits & 7; in are_bits_clear() 81 bool are_bits_set(const ulong *lmap, size_t bit, size_t nbits) in are_bits_set() argument [all …]
|
/Linux-v6.1/lib/ |
D | test_bitmap.c | 78 unsigned int nbits) in __check_eq_bitmap() argument 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() argument 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() 345 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() 650 unsigned int nbits; member [all …]
|
D | find_bit.c | 131 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() 160 unsigned long nbits, unsigned long start) in _find_next_and_bit() argument 162 return FIND_NEXT_BIT(addr1[idx] & addr2[idx], /* nop */, nbits, start); in _find_next_and_bit() 169 unsigned long nbits, unsigned long start) in _find_next_andnot_bit() argument 171 return FIND_NEXT_BIT(addr1[idx] & ~addr2[idx], /* nop */, nbits, start); in _find_next_andnot_bit() 177 unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits, in _find_next_zero_bit() argument 180 return FIND_NEXT_BIT(~addr[idx], /* nop */, nbits, start); in _find_next_zero_bit()
|
/Linux-v6.1/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() 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()
|
/Linux-v6.1/fs/xfs/ |
D | xfs_buf_item.c | 64 int nbits) in xfs_buf_item_straddle() argument 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 + 1); in xfs_buf_item_size_segment() [all …]
|
/Linux-v6.1/drivers/soc/tegra/fuse/ |
D | fuse-tegra.c | 103 .nbits = 32, 109 .nbits = 32, 115 .nbits = 32, 121 .nbits = 32, 127 .nbits = 32, 133 .nbits = 2, 139 .nbits = 32, 145 .nbits = 32, 151 .nbits = 32, 157 .nbits = 32, [all …]
|
/Linux-v6.1/tools/lib/ |
D | find_bit.c | 103 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()
|
D | bitmap.c | 31 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()
|
/Linux-v6.1/include/asm-generic/ |
D | bitsperlong.h | 35 #define small_const_nbits(nbits) \ argument 36 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
|
/Linux-v6.1/tools/include/asm-generic/ |
D | bitsperlong.h | 21 #define small_const_nbits(nbits) \ argument 22 (__builtin_constant_p(nbits) && (nbits) <= BITS_PER_LONG && (nbits) > 0)
|
/Linux-v6.1/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()
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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)))
|
/Linux-v6.1/fs/btrfs/ |
D | subpage.c | 247 const int nbits = len >> fs_info->sectorsize_bits; in btrfs_subpage_start_reader() local 251 atomic_add(nbits, &subpage->readers); in btrfs_subpage_start_reader() 258 const int nbits = len >> fs_info->sectorsize_bits; in btrfs_subpage_end_reader() local 264 ASSERT(atomic_read(&subpage->readers) >= nbits); in btrfs_subpage_end_reader() 265 last = atomic_sub_and_test(nbits, &subpage->readers); in btrfs_subpage_end_reader() 300 const int nbits = (len >> fs_info->sectorsize_bits); in btrfs_subpage_start_writer() local 306 ret = atomic_add_return(nbits, &subpage->writers); in btrfs_subpage_start_writer() 307 ASSERT(ret == nbits); in btrfs_subpage_start_writer() 314 const int nbits = (len >> fs_info->sectorsize_bits); in btrfs_subpage_end_and_test_writer() local 328 ASSERT(atomic_read(&subpage->writers) >= nbits); in btrfs_subpage_end_and_test_writer() [all …]
|
/Linux-v6.1/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 …]
|
/Linux-v6.1/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
|