Lines Matching refs:dma_ofs
223 long npages, dma_ofs, i; in pci_map_single_1() local
270 dma_ofs = iommu_arena_alloc(arena, npages, pdev ? 0 : 8); in pci_map_single_1()
271 if (dma_ofs < 0) { in pci_map_single_1()
279 arena->ptes[i + dma_ofs] = mk_iommu_pte(paddr); in pci_map_single_1()
281 ret = arena->dma_base + dma_ofs * PAGE_SIZE; in pci_map_single_1()
329 long dma_ofs, npages; in pci_unmap_single() local
354 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT; in pci_unmap_single()
355 if (dma_ofs * PAGE_SIZE >= arena->size) { in pci_unmap_single()
367 iommu_arena_free(arena, dma_ofs, npages); in pci_unmap_single()
372 if (dma_ofs >= arena->next_entry) in pci_unmap_single()
515 long npages, dma_ofs, i; in sg_fill() local
549 dma_ofs = iommu_arena_alloc(arena, npages, 0); in sg_fill()
550 if (dma_ofs < 0) { in sg_fill()
561 out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr; in sg_fill()
569 ptes = &arena->ptes[dma_ofs]; in sg_fill()