| /lib/ |
| D | test_bitmap.c | 77 unsigned int nbits) in __check_eq_bitmap() argument 79 if (!bitmap_equal(exp_bmap, bmap, nbits)) { in __check_eq_bitmap() 82 nbits, exp_bmap, nbits, bmap); in __check_eq_bitmap() 91 const unsigned long *bitmap, unsigned int nbits) in __check_eq_pbl() argument 93 snprintf(pbl_buffer, sizeof(pbl_buffer), "%*pbl", nbits, bitmap); in __check_eq_pbl() 360 unsigned int nbits = 64; in test_replace() local 361 unsigned int nlongs = DIV_ROUND_UP(nbits, BITS_PER_LONG); in test_replace() 364 BUILD_BUG_ON(EXP2_IN_BITS < nbits * 2); in test_replace() 367 bitmap_replace(bmap, &exp2[0 * nlongs], &exp2[1 * nlongs], exp2_to_exp3_mask, nbits); in test_replace() 368 expect_eq_bitmap(bmap, exp3_0_1, nbits); in test_replace() [all …]
|
| D | bitmap.c | 93 unsigned shift, unsigned nbits) in __bitmap_shift_right() argument 95 unsigned k, lim = BITS_TO_LONGS(nbits); in __bitmap_shift_right() 97 unsigned long mask = BITMAP_LAST_WORD_MASK(nbits); in __bitmap_shift_right() 138 unsigned int shift, unsigned int nbits) in __bitmap_shift_left() argument 141 unsigned int lim = BITS_TO_LONGS(nbits); in __bitmap_shift_left() 200 unsigned int first, unsigned int cut, unsigned int nbits) in bitmap_cut() argument 202 unsigned int len = BITS_TO_LONGS(nbits); in bitmap_cut() 285 const unsigned long *mask, unsigned int nbits) in __bitmap_replace() argument 288 unsigned int nr = BITS_TO_LONGS(nbits); in __bitmap_replace() 457 static int bitmap_pos_to_ord(const unsigned long *buf, unsigned int pos, unsigned int nbits) in bitmap_pos_to_ord() argument [all …]
|
| D | find_bit.c | 143 unsigned long _find_next_bit(const unsigned long *addr, unsigned long nbits, unsigned long start) in _find_next_bit() argument 145 return FIND_NEXT_BIT(addr[idx], /* nop */, nbits, start); in _find_next_bit() 181 unsigned long nbits, unsigned long start) in _find_next_and_bit() argument 183 return FIND_NEXT_BIT(addr1[idx] & addr2[idx], /* nop */, nbits, start); in _find_next_and_bit() 190 unsigned long nbits, unsigned long start) in _find_next_andnot_bit() argument 192 return FIND_NEXT_BIT(addr1[idx] & ~addr2[idx], /* nop */, nbits, start); in _find_next_andnot_bit() 199 unsigned long nbits, unsigned long start) in _find_next_or_bit() argument 201 return FIND_NEXT_BIT(addr1[idx] | addr2[idx], /* nop */, nbits, start); in _find_next_or_bit() 207 unsigned long _find_next_zero_bit(const unsigned long *addr, unsigned long nbits, in _find_next_zero_bit() argument 210 return FIND_NEXT_BIT(~addr[idx], /* nop */, nbits, start); in _find_next_zero_bit()
|
| D | genalloc.c | 188 unsigned long nbits = size >> pool->min_alloc_order; in gen_pool_add_owner() local 190 BITS_TO_LONGS(nbits) * sizeof(long); in gen_pool_add_owner() 283 unsigned long nbits, start_bit, end_bit, remain; in gen_pool_alloc_algo_owner() local 295 nbits = (size + (1UL << order) - 1) >> order; in gen_pool_alloc_algo_owner() 305 nbits, data, pool, chunk->start_addr); in gen_pool_alloc_algo_owner() 308 remain = bitmap_set_ll(chunk->bits, start_bit, nbits); in gen_pool_alloc_algo_owner() 311 nbits - remain); in gen_pool_alloc_algo_owner() 317 size = nbits << order; in gen_pool_alloc_algo_owner() 492 unsigned long start_bit, nbits, remain; in gen_pool_free_owner() local 501 nbits = (size + (1UL << order) - 1) >> order; in gen_pool_free_owner() [all …]
|
| D | bitmap-str.c | 217 unsigned int nbits; member 233 if (r->end >= r->nbits) in bitmap_check_region() 297 unsigned int lastbit = r->nbits - 1; in bitmap_parse_region() 379 r.nbits = nmaskbits; in bitmap_parselist() 380 bitmap_zero(maskp, r.nbits); in bitmap_parselist()
|
| D | find_bit_benchmark.c | 151 unsigned long nbits = BITMAP_LEN / SPARSE; in find_bit_test() local 176 while (nbits--) { in find_bit_test()
|
| D | bch.c | 1014 unsigned int nbits; in bch_decode() local 1057 nbits = (len*8)+bch->ecc_bits; in bch_decode() 1059 if (errloc[i] >= nbits) { in bch_decode() 1063 errloc[i] = nbits-1-errloc[i]; in bch_decode() 1194 unsigned int i, j, nbits, r, word, *roots; in compute_generator_polynomial() local 1236 nbits = (n > 32) ? 32 : n; in compute_generator_polynomial() 1237 for (j = 0, word = 0; j < nbits; j++) { in compute_generator_polynomial() 1242 n -= nbits; in compute_generator_polynomial()
|
| D | test_printf.c | 546 const int nbits = 1 << 16; in large_bitmap() local 547 unsigned long *bits = bitmap_zalloc(nbits, GFP_KERNEL); in large_bitmap() 553 test("1-20,60000-60014", "%*pbl", nbits, bits); in large_bitmap()
|
| /lib/crypto/mpi/ |
| D | mpicoder.c | 39 unsigned nbits, nlimbs; in mpi_read_raw_data() local 48 nbits = nbytes * 8; in mpi_read_raw_data() 49 if (nbits > MAX_EXTERN_MPI_BITS) { in mpi_read_raw_data() 50 pr_info("MPI: mpi too large (%u bits)\n", nbits); in mpi_read_raw_data() 54 nbits -= count_leading_zeros(buffer[0]) - (BITS_PER_LONG - 8); in mpi_read_raw_data() 60 val->nbits = nbits; in mpi_read_raw_data() 84 unsigned int nbits, nbytes; in mpi_read_from_buffer() local 89 nbits = buffer[0] << 8 | buffer[1]; in mpi_read_from_buffer() 91 if (nbits > MAX_EXTERN_MPI_BITS) { in mpi_read_from_buffer() 92 pr_info("MPI: mpi too large (%u bits)\n", nbits); in mpi_read_from_buffer() [all …]
|
| D | mpi-bit.c | 107 unsigned int nbits = (n%BITS_PER_MPI_LIMB); in mpi_rshift() local 123 if (x->nlimbs && nbits) in mpi_rshift() 124 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift() 147 if (x->nlimbs && nbits) in mpi_rshift() 148 mpihelp_rshift(x->d, x->d, x->nlimbs, nbits); in mpi_rshift() 159 if (nbits) in mpi_rshift() 160 mpihelp_rshift(x->d, a->d, x->nlimbs, nbits); in mpi_rshift()
|
| D | mpiutil.c | 52 a->nbits = 0; in mpi_alloc()
|