Lines Matching full:atu

80 	return iommu->atu && mask > DMA_BIT_MASK(32);  in iommu_use_atu()
119 iotsb_num = pbm->iommu->atu->iotsb->iotsb_num; in iommu_batch_flush()
127 pr_err_ratelimited("%s: ATU map of [%08lx:%lx:%llx:%lx:%lx] failed with status %ld\n", in iommu_batch_flush()
218 tbl = &iommu->atu->tbl; in dma_4v_alloc_coherent()
328 struct atu *atu; in dma_4v_free_coherent() local
337 atu = iommu->atu; in dma_4v_free_coherent()
344 tbl = &atu->tbl; in dma_4v_free_coherent()
345 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_free_coherent()
361 struct atu *atu; in dma_4v_map_page() local
371 atu = iommu->atu; in dma_4v_map_page()
384 tbl = &atu->tbl; in dma_4v_map_page()
435 struct atu *atu; in dma_4v_unmap_page() local
450 atu = iommu->atu; in dma_4v_unmap_page()
461 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_unmap_page()
462 tbl = &atu->tbl; in dma_4v_unmap_page()
480 struct atu *atu; in dma_4v_map_sg() local
491 atu = iommu->atu; in dma_4v_map_sg()
519 tbl = &atu->tbl; in dma_4v_map_sg()
631 struct atu *atu; in dma_4v_unmap_sg() local
640 atu = iommu->atu; in dma_4v_unmap_sg()
661 iotsb_num = atu->iotsb->iotsb_num; in dma_4v_unmap_sg()
662 tbl = &atu->tbl; in dma_4v_unmap_sg()
742 struct atu *atu = pbm->iommu->atu; in pci_sun4v_atu_alloc_iotsb() local
755 atu->iotsb = iotsb; in pci_sun4v_atu_alloc_iotsb()
758 table_size = (atu->size / IO_PAGE_SIZE) * 8; in pci_sun4v_atu_alloc_iotsb()
767 iotsb->dvma_size = atu->size; in pci_sun4v_atu_alloc_iotsb()
768 iotsb->dvma_base = atu->base; in pci_sun4v_atu_alloc_iotsb()
803 struct atu *atu = pbm->iommu->atu; in pci_sun4v_atu_init() local
835 atu->ranges = (struct atu_ranges *)ranges; in pci_sun4v_atu_init()
836 atu->base = atu->ranges[3].base; in pci_sun4v_atu_init()
837 atu->size = ATU_64_SPACE_SIZE; in pci_sun4v_atu_init()
842 pr_err(PFX "Error creating ATU IOTSB\n"); in pci_sun4v_atu_init()
846 /* Create ATU iommu map. in pci_sun4v_atu_init()
849 dma_mask = (roundup_pow_of_two(atu->size) - 1UL); in pci_sun4v_atu_init()
850 num_iotte = atu->size / IO_PAGE_SIZE; in pci_sun4v_atu_init()
852 atu->tbl.table_map_base = atu->base; in pci_sun4v_atu_init()
853 atu->dma_addr_mask = dma_mask; in pci_sun4v_atu_init()
854 atu->tbl.map = kzalloc(map_size, GFP_KERNEL); in pci_sun4v_atu_init()
855 if (!atu->tbl.map) in pci_sun4v_atu_init()
858 iommu_tbl_pool_init(&atu->tbl, num_iotte, IO_PAGE_SHIFT, in pci_sun4v_atu_init()
1206 if (pbm->iommu->atu) { in pci_sun4v_pbm_init()
1209 kfree(pbm->iommu->atu); in pci_sun4v_pbm_init()
1210 pbm->iommu->atu = NULL; in pci_sun4v_pbm_init()
1211 pr_err(PFX "ATU init failed, err=%d\n", err); in pci_sun4v_pbm_init()
1228 struct atu *atu; in pci_sun4v_probe() local
1256 * ATU group, but ATU hcalls won't be available. in pci_sun4v_probe()
1260 pr_info(PFX "Registered hvapi ATU major[%lu] minor[%lu]\n", in pci_sun4v_probe()
1301 iommu->atu = NULL; in pci_sun4v_probe()
1303 atu = kzalloc(sizeof(*atu), GFP_KERNEL); in pci_sun4v_probe()
1304 if (!atu) in pci_sun4v_probe()
1305 pr_err(PFX "Could not allocate atu\n"); in pci_sun4v_probe()
1307 iommu->atu = atu; in pci_sun4v_probe()
1319 kfree(iommu->atu); in pci_sun4v_probe()