Lines Matching refs:tce
374 static int tce_iommu_prereg_ua_to_hpa(unsigned long tce, unsigned long size, in tce_iommu_prereg_ua_to_hpa() argument
380 mem = mm_iommu_lookup(tce, size); in tce_iommu_prereg_ua_to_hpa()
384 ret = mm_iommu_ua_to_hpa(mem, tce, phpa); in tce_iommu_prereg_ua_to_hpa()
444 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa) in tce_iommu_use_page() argument
447 enum dma_data_direction direction = iommu_tce_direction(tce); in tce_iommu_use_page()
449 if (get_user_pages_fast(tce & PAGE_MASK, 1, in tce_iommu_use_page()
460 unsigned long entry, unsigned long tce, unsigned long pages, in tce_iommu_build() argument
469 unsigned long offset = tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK; in tce_iommu_build()
471 ret = tce_iommu_use_page(tce, &hpa); in tce_iommu_build()
488 tce, ret); in tce_iommu_build()
495 tce += IOMMU_PAGE_SIZE(tbl); in tce_iommu_build()
506 unsigned long entry, unsigned long tce, unsigned long pages, in tce_iommu_build_v2() argument
519 ret = tce_iommu_prereg_ua_to_hpa(tce, IOMMU_PAGE_SIZE(tbl), in tce_iommu_build_v2()
531 hpa |= tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK; in tce_iommu_build_v2()
544 tce, ret); in tce_iommu_build_v2()
551 *pua = tce; in tce_iommu_build_v2()
553 tce += IOMMU_PAGE_SIZE(tbl); in tce_iommu_build_v2()