Lines Matching full:hpa
180 static bool tce_page_is_contained(struct mm_struct *mm, unsigned long hpa, in tce_page_is_contained() argument
186 if (mm_iommu_is_devmem(mm, hpa, it_page_shift, &size)) in tce_page_is_contained()
189 page = pfn_to_page(hpa >> PAGE_SHIFT); in tce_page_is_contained()
381 static void tce_iommu_unuse_page(unsigned long hpa) in tce_iommu_unuse_page() argument
385 page = pfn_to_page(hpa >> PAGE_SHIFT); in tce_iommu_unuse_page()
414 unsigned long hpa = 0; in tce_iommu_unuse_page_v2() local
421 tbl->it_page_shift, &hpa, &mem); in tce_iommu_unuse_page_v2()
484 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) in tce_iommu_use_page() argument
494 *hpa = __pa((unsigned long) page_address(page)); in tce_iommu_use_page()
505 unsigned long hpa; in tce_iommu_build() local
511 ret = tce_iommu_use_page(tce, &hpa); in tce_iommu_build()
515 if (!tce_page_is_contained(container->mm, hpa, in tce_iommu_build()
521 hpa |= offset; in tce_iommu_build()
524 &hpa, &dirtmp); in tce_iommu_build()
526 tce_iommu_unuse_page(hpa); in tce_iommu_build()
534 tce_iommu_unuse_page(hpa); in tce_iommu_build()
553 unsigned long hpa; in tce_iommu_build_v2() local
561 tce, tbl->it_page_shift, &hpa, &mem); in tce_iommu_build_v2()
565 if (!tce_page_is_contained(container->mm, hpa, in tce_iommu_build_v2()
572 hpa |= tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK; in tce_iommu_build_v2()
580 &hpa, &dirtmp); in tce_iommu_build_v2()