• Home
  • Raw
  • Download

Lines Matching refs:nr_bits

50 	uint64_t nr_bits;  member
88 struct axmap *axmap_new(unsigned long nr_bits) in axmap_new() argument
98 i = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT; in axmap_new()
106 axmap->nr_bits = nr_bits; in axmap_new()
112 al->map_size = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT; in axmap_new()
117 nr_bits = (nr_bits + BLOCKS_PER_UNIT - 1) >> UNIT_SHIFT; in axmap_new()
190 unsigned int nr_bits; member
221 unsigned int nr_bits; in axmap_set_fn() local
223 nr_bits = min(data->nr_bits, BLOCKS_PER_UNIT - bit); in axmap_set_fn()
225 mask = bit_masks[nr_bits] << bit; in axmap_set_fn()
239 nr_bits--; in axmap_set_fn()
248 data->set_bits = nr_bits; in axmap_set_fn()
250 data->nr_bits = 1; in axmap_set_fn()
257 unsigned int set_bits, nr_bits = data->nr_bits; in __axmap_set() local
260 axmap->first_free < bit_nr + data->nr_bits) in __axmap_set()
263 if (bit_nr > axmap->nr_bits) in __axmap_set()
265 else if (bit_nr + nr_bits > axmap->nr_bits) in __axmap_set()
266 nr_bits = axmap->nr_bits - bit_nr; in __axmap_set()
269 while (nr_bits) { in __axmap_set()
274 data->set_bits != (BLOCKS_PER_UNIT - nr_bits)) in __axmap_set()
277 nr_bits -= data->set_bits; in __axmap_set()
280 data->nr_bits = nr_bits; in __axmap_set()
288 struct axmap_set_data data = { .nr_bits = 1, }; in axmap_set()
293 unsigned int axmap_set_nr(struct axmap *axmap, uint64_t bit_nr, unsigned int nr_bits) in axmap_set_nr() argument
298 struct axmap_set_data data = { .nr_bits = nr_bits, }; in axmap_set_nr()
302 if (max_bits < nr_bits) in axmap_set_nr()
303 data.nr_bits = max_bits; in axmap_set_nr()
305 this_set = data.nr_bits; in axmap_set_nr()
311 nr_bits -= data.set_bits; in axmap_set_nr()
313 } while (nr_bits); in axmap_set_nr()
326 if (bit_nr <= axmap->nr_bits) in axmap_isset()
366 if (ret < axmap->nr_bits) in axmap_find_first_free()