Lines Matching refs:tce
25 #include <asm/tce.h>
390 unsigned long tce, unsigned long shift,
396 mem = mm_iommu_lookup(container->mm, tce, 1ULL << shift);
400 ret = mm_iommu_ua_to_hpa(mem, tce, shift, phpa);
423 pr_debug("%s: tce %llx at #%lx was not cached, ret=%d\n",
484 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa)
487 enum dma_data_direction direction = iommu_tce_direction(tce);
489 if (pin_user_pages_fast(tce & PAGE_MASK, 1,
501 unsigned long entry, unsigned long tce, unsigned long pages,
509 unsigned long offset = tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK;
511 ret = tce_iommu_use_page(tce, &hpa);
527 pr_err("iommu_tce: %s failed ioba=%lx, tce=%lx, ret=%ld\n",
529 tce, ret);
536 tce += IOMMU_PAGE_SIZE(tbl);
549 unsigned long entry, unsigned long tce, unsigned long pages,
561 tce, tbl->it_page_shift, &hpa, &mem);
572 hpa |= tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK;
584 pr_err("iommu_tce: %s failed ioba=%lx, tce=%lx, ret=%ld\n",
586 tce, ret);
593 *pua = cpu_to_be64(tce);
595 tce += IOMMU_PAGE_SIZE(tbl);