Lines Matching refs:hpa
179 static bool tce_page_is_contained(struct mm_struct *mm, unsigned long hpa, in tce_page_is_contained() argument
185 if (mm_iommu_is_devmem(mm, hpa, it_page_shift, &size)) in tce_page_is_contained()
188 page = pfn_to_page(hpa >> PAGE_SHIFT); in tce_page_is_contained()
382 unsigned long hpa) in tce_iommu_unuse_page() argument
386 page = pfn_to_page(hpa >> PAGE_SHIFT); in tce_iommu_unuse_page()
415 unsigned long hpa = 0; in tce_iommu_unuse_page_v2() local
422 tbl->it_page_shift, &hpa, &mem); in tce_iommu_unuse_page_v2()
485 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) in tce_iommu_use_page() argument
495 *hpa = __pa((unsigned long) page_address(page)); in tce_iommu_use_page()
506 unsigned long hpa; in tce_iommu_build() local
512 ret = tce_iommu_use_page(tce, &hpa); in tce_iommu_build()
516 if (!tce_page_is_contained(container->mm, hpa, in tce_iommu_build()
522 hpa |= offset; in tce_iommu_build()
525 &hpa, &dirtmp); in tce_iommu_build()
527 tce_iommu_unuse_page(container, hpa); in tce_iommu_build()
535 tce_iommu_unuse_page(container, hpa); in tce_iommu_build()
554 unsigned long hpa; in tce_iommu_build_v2() local
562 tce, tbl->it_page_shift, &hpa, &mem); in tce_iommu_build_v2()
566 if (!tce_page_is_contained(container->mm, hpa, in tce_iommu_build_v2()
573 hpa |= tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK; in tce_iommu_build_v2()
581 &hpa, &dirtmp); in tce_iommu_build_v2()