Lines Matching refs:index
93 unsigned int index; member
305 mem->areas[i].index = 0; in swiotlb_init_io_tlb_mem()
555 int index = (tlb_addr - mem->start) >> IO_TLB_SHIFT; in swiotlb_bounce() local
556 phys_addr_t orig_addr = mem->slots[index].orig_addr; in swiotlb_bounce()
557 size_t alloc_size = mem->slots[index].alloc_size; in swiotlb_bounce()
636 static unsigned int wrap_area_index(struct io_tlb_mem *mem, unsigned int index) in wrap_area_index() argument
638 if (index >= mem->area_nslabs) in wrap_area_index()
640 return index; in wrap_area_index()
660 unsigned int index, wrap, count = 0, i; in swiotlb_do_find_slots() local
684 index = wrap = wrap_area_index(mem, ALIGN(area->index, stride)); in swiotlb_do_find_slots()
687 slot_index = slot_base + index; in swiotlb_do_find_slots()
692 index = wrap_area_index(mem, index + 1); in swiotlb_do_find_slots()
707 index = wrap_area_index(mem, index + stride); in swiotlb_do_find_slots()
708 } while (index != wrap); in swiotlb_do_find_slots()
728 if (index + nslots < mem->area_nslabs) in swiotlb_do_find_slots()
729 area->index = index + nslots; in swiotlb_do_find_slots()
731 area->index = 0; in swiotlb_do_find_slots()
742 int i = start, index; in swiotlb_find_slots() local
745 index = swiotlb_do_find_slots(dev, i, orig_addr, alloc_size, in swiotlb_find_slots()
747 if (index >= 0) in swiotlb_find_slots()
748 return index; in swiotlb_find_slots()
774 int index; in swiotlb_tbl_map_single() local
792 index = swiotlb_find_slots(dev, orig_addr, in swiotlb_tbl_map_single()
794 if (index == -1) { in swiotlb_tbl_map_single()
808 mem->slots[index + i].orig_addr = slot_addr(orig_addr, i); in swiotlb_tbl_map_single()
809 tlb_addr = slot_addr(mem->start, index) + offset; in swiotlb_tbl_map_single()
826 int index = (tlb_addr - offset - mem->start) >> IO_TLB_SHIFT; in swiotlb_release_slots() local
827 int nslots = nr_slots(mem->slots[index].alloc_size + offset); in swiotlb_release_slots()
828 int aindex = index / mem->area_nslabs; in swiotlb_release_slots()
841 if (index + nslots < ALIGN(index + 1, IO_TLB_SEGSIZE)) in swiotlb_release_slots()
842 count = mem->slots[index + nslots].list; in swiotlb_release_slots()
850 for (i = index + nslots - 1; i >= index; i--) { in swiotlb_release_slots()
860 for (i = index - 1; in swiotlb_release_slots()
997 int index; in swiotlb_alloc() local
1002 index = swiotlb_find_slots(dev, 0, size, 0); in swiotlb_alloc()
1003 if (index == -1) in swiotlb_alloc()
1006 tlb_addr = slot_addr(mem->start, index); in swiotlb_alloc()