Lines Matching refs:dma_ofs
270 long npages, dma_ofs, i; in pci_map_single_1() local
318 dma_ofs = iommu_arena_alloc(dev, arena, npages, align); in pci_map_single_1()
319 if (dma_ofs < 0) { in pci_map_single_1()
327 arena->ptes[i + dma_ofs] = mk_iommu_pte(paddr); in pci_map_single_1()
329 ret = arena->dma_base + dma_ofs * PAGE_SIZE; in pci_map_single_1()
391 long dma_ofs, npages; in alpha_pci_unmap_page() local
415 dma_ofs = (dma_addr - arena->dma_base) >> PAGE_SHIFT; in alpha_pci_unmap_page()
416 if (dma_ofs * PAGE_SIZE >= arena->size) { in alpha_pci_unmap_page()
428 iommu_arena_free(arena, dma_ofs, npages); in alpha_pci_unmap_page()
433 if (dma_ofs >= arena->next_entry) in alpha_pci_unmap_page()
575 long npages, dma_ofs, i; in sg_fill() local
609 dma_ofs = iommu_arena_alloc(dev, arena, npages, 0); in sg_fill()
610 if (dma_ofs < 0) { in sg_fill()
621 out->dma_address = arena->dma_base + dma_ofs*PAGE_SIZE + paddr; in sg_fill()
629 ptes = &arena->ptes[dma_ofs]; in sg_fill()