Lines Matching refs:atu
79 return iommu->atu && mask > DMA_BIT_MASK(32); in iommu_use_atu()
118 iotsb_num = pbm->iommu->atu->iotsb->iotsb_num; in iommu_batch_flush()
217 tbl = &iommu->atu->tbl; in dma_4v_alloc_coherent()
327 struct atu *atu; in dma_4v_free_coherent() local
336 atu = iommu->atu; in dma_4v_free_coherent()
343 tbl = &atu->tbl; in dma_4v_free_coherent()
344 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_free_coherent()
360 struct atu *atu; in dma_4v_map_page() local
370 atu = iommu->atu; in dma_4v_map_page()
383 tbl = &atu->tbl; in dma_4v_map_page()
434 struct atu *atu; in dma_4v_unmap_page() local
449 atu = iommu->atu; in dma_4v_unmap_page()
460 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_unmap_page()
461 tbl = &atu->tbl; in dma_4v_unmap_page()
479 struct atu *atu; in dma_4v_map_sg() local
490 atu = iommu->atu; in dma_4v_map_sg()
518 tbl = &atu->tbl; in dma_4v_map_sg()
632 struct atu *atu; in dma_4v_unmap_sg() local
641 atu = iommu->atu; in dma_4v_unmap_sg()
662 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_unmap_sg()
663 tbl = &atu->tbl; in dma_4v_unmap_sg()
743 struct atu *atu = pbm->iommu->atu; in pci_sun4v_atu_alloc_iotsb() local
756 atu->iotsb = iotsb; in pci_sun4v_atu_alloc_iotsb()
759 table_size = (atu->size / IO_PAGE_SIZE) * 8; in pci_sun4v_atu_alloc_iotsb()
768 iotsb->dvma_size = atu->size; in pci_sun4v_atu_alloc_iotsb()
769 iotsb->dvma_base = atu->base; in pci_sun4v_atu_alloc_iotsb()
804 struct atu *atu = pbm->iommu->atu; in pci_sun4v_atu_init() local
836 atu->ranges = (struct atu_ranges *)ranges; in pci_sun4v_atu_init()
837 atu->base = atu->ranges[3].base; in pci_sun4v_atu_init()
838 atu->size = ATU_64_SPACE_SIZE; in pci_sun4v_atu_init()
850 dma_mask = (roundup_pow_of_two(atu->size) - 1UL); in pci_sun4v_atu_init()
851 num_iotte = atu->size / IO_PAGE_SIZE; in pci_sun4v_atu_init()
853 atu->tbl.table_map_base = atu->base; in pci_sun4v_atu_init()
854 atu->dma_addr_mask = dma_mask; in pci_sun4v_atu_init()
855 atu->tbl.map = kzalloc(map_size, GFP_KERNEL); in pci_sun4v_atu_init()
856 if (!atu->tbl.map) in pci_sun4v_atu_init()
859 iommu_tbl_pool_init(&atu->tbl, num_iotte, IO_PAGE_SHIFT, in pci_sun4v_atu_init()
1207 if (pbm->iommu->atu) { in pci_sun4v_pbm_init()
1210 kfree(pbm->iommu->atu); in pci_sun4v_pbm_init()
1211 pbm->iommu->atu = NULL; in pci_sun4v_pbm_init()
1229 struct atu *atu; in pci_sun4v_probe() local
1302 iommu->atu = NULL; in pci_sun4v_probe()
1304 atu = kzalloc(sizeof(*atu), GFP_KERNEL); in pci_sun4v_probe()
1305 if (!atu) in pci_sun4v_probe()
1308 iommu->atu = atu; in pci_sun4v_probe()
1320 kfree(iommu->atu); in pci_sun4v_probe()