Lines Matching full:slots
123 * contiguous slots tracking: free slots are treated contiguous no matter
142 * swiotlb_adjust_nareas() - adjust the number of areas and slots
167 * @nslots: Total number of slots in the memory pool.
286 mem->slots[i].list = IO_TLB_SEGSIZE - io_tlb_offset(i); in swiotlb_init_io_tlb_pool()
287 mem->slots[i].orig_addr = INVALID_PHYS_ADDR; in swiotlb_init_io_tlb_pool()
288 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_pool()
393 alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs)); in swiotlb_init_remap()
394 mem->slots = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_remap()
395 if (!mem->slots) { in swiotlb_init_remap()
499 mem->slots = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, in swiotlb_init_late()
500 get_order(array_size(sizeof(*mem->slots), nslabs))); in swiotlb_init_late()
501 if (!mem->slots) in swiotlb_init_late()
536 slots_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), mem->nslabs)); in swiotlb_exit()
544 free_pages((unsigned long)mem->slots, get_order(slots_size)); in swiotlb_exit()
549 memblock_free_late(__pa(mem->slots), slots_size); in swiotlb_exit()
701 slot_order = get_order(array_size(sizeof(*pool->slots), nslabs)); in swiotlb_alloc_pool()
702 pool->slots = (struct io_tlb_slot *) in swiotlb_alloc_pool()
704 if (!pool->slots) in swiotlb_alloc_pool()
745 size_t slots_size = array_size(sizeof(*pool->slots), pool->nslabs); in swiotlb_dyn_free()
748 free_pages((unsigned long)pool->slots, get_order(slots_size)); in swiotlb_dyn_free()
832 phys_addr_t orig_addr = mem->slots[index].orig_addr; in swiotlb_bounce()
833 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce()
918 * Track the total used slots with a global atomic value in order to have
952 * swiotlb_area_find_slots() - search for slots in one IO TLB memory area
998 * unaligned slots once we found an aligned one. in swiotlb_area_find_slots()
1023 if (pool->slots[slot_index].list >= nslots) in swiotlb_area_find_slots()
1041 pool->slots[i].list = 0; in swiotlb_area_find_slots()
1042 pool->slots[i].alloc_size = alloc_size - (offset + in swiotlb_area_find_slots()
1047 pool->slots[i].list; i--) in swiotlb_area_find_slots()
1048 pool->slots[i].list = ++count; in swiotlb_area_find_slots()
1062 * swiotlb_pool_find_slots() - search for slots in one memory pool
1070 * Search through one memory pool to find a sequence of slots that match the
1097 * swiotlb_find_slots() - search for slots in the whole swiotlb
1105 * Search through the whole software IO TLB to find a sequence of slots that
1197 * mem_used() - get number of used slots in an allocator
1203 * Return: Number of used slots.
1213 * mem_pool_used() - get number of used slots in a memory pool
1218 * Return: Approximate number of used slots.
1231 * mem_used() - get number of used slots in an allocator
1237 * Return: Approximate number of used slots.
1290 "swiotlb buffer is full (sz: %zd bytes), total %lu (slots), used %lu (slots)\n", in swiotlb_tbl_map_single()
1301 pool->slots[index + i].orig_addr = slot_addr(orig_addr, i); in swiotlb_tbl_map_single()
1320 int nslots = nr_slots(mem->slots[index].alloc_size + offset); in swiotlb_release_slots()
1329 * with slots below and above the pool being returned. in swiotlb_release_slots()
1335 count = mem->slots[index + nslots].list; in swiotlb_release_slots()
1340 * Step 1: return the slots to the free list, merging the slots with in swiotlb_release_slots()
1341 * superceeding slots in swiotlb_release_slots()
1344 mem->slots[i].list = ++count; in swiotlb_release_slots()
1345 mem->slots[i].orig_addr = INVALID_PHYS_ADDR; in swiotlb_release_slots()
1346 mem->slots[i].alloc_size = 0; in swiotlb_release_slots()
1350 * Step 2: merge the returned slots with the preceding slots, if in swiotlb_release_slots()
1354 io_tlb_offset(i) != IO_TLB_SEGSIZE - 1 && mem->slots[i].list; in swiotlb_release_slots()
1356 mem->slots[i].list = ++count; in swiotlb_release_slots()
1474 * swiotlb_find_slots() skips slots according to in swiotlb_max_mapping_size()
1654 pool->slots = kcalloc(nslabs, sizeof(*pool->slots), GFP_KERNEL); in rmem_swiotlb_device_init()
1655 if (!pool->slots) { in rmem_swiotlb_device_init()
1663 kfree(pool->slots); in rmem_swiotlb_device_init()