Lines Matching refs:nslots
153 static unsigned int limit_nareas(unsigned int nareas, unsigned long nslots) in limit_nareas() argument
155 if (nslots < nareas * IO_TLB_SEGSIZE) in limit_nareas()
156 return nslots / IO_TLB_SEGSIZE; in limit_nareas()
659 unsigned int nslots = nr_slots(alloc_size), stride; in swiotlb_do_find_slots() local
666 BUG_ON(!nslots); in swiotlb_do_find_slots()
680 if (unlikely(nslots > mem->area_nslabs - area->used)) in swiotlb_do_find_slots()
701 if (!iommu_is_span_boundary(slot_index, nslots, in swiotlb_do_find_slots()
704 if (mem->slots[slot_index].list >= nslots) in swiotlb_do_find_slots()
715 for (i = slot_index; i < slot_index + nslots; i++) { 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()
732 area->used += nslots; in swiotlb_do_find_slots()
827 int nslots = nr_slots(mem->slots[index].alloc_size + offset); in swiotlb_release_slots() local
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()
864 area->used -= nslots; in swiotlb_release_slots()