Lines Matching refs:nr_bits
50 uint64_t nr_bits;
88 struct axmap *axmap_new(unsigned long nr_bits)
98 i = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
106 axmap->nr_bits = nr_bits;
112 al->map_size = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
117 nr_bits = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT;
190 unsigned int nr_bits;
221 unsigned int nr_bits;
223 nr_bits = min(data->nr_bits, BLOCKS_PER_UNIT - bit);
225 mask = bit_masks[nr_bits] << bit;
239 nr_bits--;
248 data->set_bits = nr_bits;
250 data->nr_bits = 1;
257 unsigned int set_bits, nr_bits = data->nr_bits;
260 axmap->first_free < bit_nr + data->nr_bits)
263 if (bit_nr > axmap->nr_bits)
265 else if (bit_nr + nr_bits > axmap->nr_bits)
266 nr_bits = axmap->nr_bits - bit_nr;
269 while (nr_bits) {
274 data->set_bits != (BLOCKS_PER_UNIT - nr_bits))
277 nr_bits -= data->set_bits;
280 data->nr_bits = nr_bits;
288 struct axmap_set_data data = { .nr_bits = 1, };
294 unsigned int nr_bits)
299 struct axmap_set_data data = { .nr_bits = nr_bits, };
303 if (max_bits < nr_bits)
304 data.nr_bits = max_bits;
306 this_set = data.nr_bits;
312 nr_bits -= data.set_bits;
314 } while (nr_bits);
327 if (bit_nr <= axmap->nr_bits)
367 if (ret < axmap->nr_bits)