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