Lines Matching refs:slots
195 mem->slots[i].list = IO_TLB_SEGSIZE - io_tlb_offset(i); in swiotlb_init_io_tlb_mem()
196 mem->slots[i].orig_addr = INVALID_PHYS_ADDR; in swiotlb_init_io_tlb_mem()
197 mem->slots[i].alloc_size = 0; in swiotlb_init_io_tlb_mem()
214 alloc_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), nslabs)); in swiotlb_init_with_tbl()
215 mem->slots = memblock_alloc(alloc_size, PAGE_SIZE); in swiotlb_init_with_tbl()
216 if (!mem->slots) in swiotlb_init_with_tbl()
316 mem->slots = (void *)__get_free_pages(GFP_KERNEL | __GFP_ZERO, in swiotlb_late_init_with_tbl()
317 get_order(array_size(sizeof(*mem->slots), nslabs))); in swiotlb_late_init_with_tbl()
318 if (!mem->slots) in swiotlb_late_init_with_tbl()
341 slots_size = PAGE_ALIGN(array_size(sizeof(*mem->slots), mem->nslabs)); in swiotlb_exit()
346 free_pages((unsigned long)mem->slots, get_order(slots_size)); in swiotlb_exit()
349 memblock_free_late(__pa(mem->slots), slots_size); in swiotlb_exit()
371 phys_addr_t orig_addr = mem->slots[index].orig_addr; in swiotlb_bounce()
372 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce()
509 if (mem->slots[index].list >= nslots) in swiotlb_find_slots()
521 mem->slots[i].list = 0; in swiotlb_find_slots()
522 mem->slots[i].alloc_size = in swiotlb_find_slots()
527 mem->slots[i].list; i--) in swiotlb_find_slots()
528 mem->slots[i].list = ++count; in swiotlb_find_slots()
582 mem->slots[index + i].orig_addr = slot_addr(orig_addr, i); in swiotlb_tbl_map_single()
596 int nslots = nr_slots(mem->slots[index].alloc_size + offset); in swiotlb_release_slots()
607 count = mem->slots[index + nslots].list; in swiotlb_release_slots()
616 mem->slots[i].list = ++count; in swiotlb_release_slots()
617 mem->slots[i].orig_addr = INVALID_PHYS_ADDR; in swiotlb_release_slots()
618 mem->slots[i].alloc_size = 0; in swiotlb_release_slots()
626 io_tlb_offset(i) != IO_TLB_SEGSIZE - 1 && mem->slots[i].list; in swiotlb_release_slots()
628 mem->slots[i].list = ++count; in swiotlb_release_slots()
802 mem->slots = kzalloc(array_size(sizeof(*mem->slots), nslabs), in rmem_swiotlb_device_init()
804 if (!mem->slots) { in rmem_swiotlb_device_init()