Lines Matching refs:index
131 unsigned int nslots, stride, index, wrap; in map_single() local
153 wrap = index = ALIGN(io_tlb_index, stride); in map_single()
155 if (index >= io_tlb_nslabs) in map_single()
156 wrap = index = 0; in map_single()
164 if (io_tlb_list[index] >= nslots) { in map_single()
167 for (i = index; i < index + nslots; i++) in map_single()
169 for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) in map_single()
172 dma_addr = io_tlb_start + (index << IO_TLB_SHIFT); in map_single()
177 io_tlb_index = ((index + nslots) < io_tlb_nslabs in map_single()
178 ? (index + nslots) : 0); in map_single()
182 index += stride; in map_single()
183 if (index >= io_tlb_nslabs) in map_single()
184 index = 0; in map_single()
185 } while (index != wrap); in map_single()
200 io_tlb_orig_addr[index] = buffer; in map_single()
215 int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT; in unmap_single() local
216 char *buffer = io_tlb_orig_addr[index]; in unmap_single()
236 int count = ((index + nslots) < ALIGN(index + 1, IO_TLB_SEGSIZE) ? in unmap_single()
237 io_tlb_list[index + nslots] : 0); in unmap_single()
242 for (i = index + nslots - 1; i >= index; i--) in unmap_single()
248 for (i = index - 1; (OFFSET(i, IO_TLB_SEGSIZE) != IO_TLB_SEGSIZE -1) && in unmap_single()
258 int index = (dma_addr - io_tlb_start) >> IO_TLB_SHIFT; in sync_single() local
259 char *buffer = io_tlb_orig_addr[index]; in sync_single()