Lines Matching refs:alloc_bits

341 static int pcpu_next_hint(struct pcpu_block_md *block, int alloc_bits)  in pcpu_next_hint()  argument
352 alloc_bits > block->scan_hint) in pcpu_next_hint()
424 static void pcpu_next_fit_region(struct pcpu_chunk *chunk, int alloc_bits, in pcpu_next_fit_region() argument
437 if (*bits >= alloc_bits) in pcpu_next_fit_region()
452 block->contig_hint >= *bits + alloc_bits) { in pcpu_next_fit_region()
453 int start = pcpu_next_hint(block, alloc_bits); in pcpu_next_fit_region()
455 *bits += alloc_bits + block->contig_hint_start - in pcpu_next_fit_region()
467 if (*bits >= alloc_bits) in pcpu_next_fit_region()
487 #define pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) \ argument
488 for (pcpu_next_fit_region((chunk), (alloc_bits), (align), &(bit_off), \
492 pcpu_next_fit_region((chunk), (alloc_bits), (align), &(bit_off), \
1106 static int pcpu_find_block_fit(struct pcpu_chunk *chunk, int alloc_bits, in pcpu_find_block_fit() argument
1117 if (!pcpu_check_block_hint(chunk_md, alloc_bits, align)) in pcpu_find_block_fit()
1120 bit_off = pcpu_next_hint(chunk_md, alloc_bits); in pcpu_find_block_fit()
1122 pcpu_for_each_fit_region(chunk, alloc_bits, align, bit_off, bits) { in pcpu_find_block_fit()
1212 static int pcpu_alloc_area(struct pcpu_chunk *chunk, int alloc_bits, in pcpu_alloc_area() argument
1227 end = min_t(int, start + alloc_bits + PCPU_BITMAP_BLOCK_BITS, in pcpu_alloc_area()
1229 bit_off = pcpu_find_zero_area(chunk->alloc_map, end, start, alloc_bits, in pcpu_alloc_area()
1238 bitmap_set(chunk->alloc_map, bit_off, alloc_bits); in pcpu_alloc_area()
1242 bitmap_clear(chunk->bound_map, bit_off + 1, alloc_bits - 1); in pcpu_alloc_area()
1243 set_bit(bit_off + alloc_bits, chunk->bound_map); in pcpu_alloc_area()
1245 chunk->free_bytes -= alloc_bits * PCPU_MIN_ALLOC_SIZE; in pcpu_alloc_area()
1252 bit_off + alloc_bits); in pcpu_alloc_area()
1254 pcpu_block_update_hint_alloc(chunk, bit_off, alloc_bits); in pcpu_alloc_area()