Lines Matching refs:tce
27 #include <asm/tce.h>
391 unsigned long tce, unsigned long shift,
397 mem = mm_iommu_lookup(container->mm, tce, 1ULL << shift);
401 ret = mm_iommu_ua_to_hpa(mem, tce, shift, phpa);
424 pr_debug("%s: tce %llx at #%lx was not cached, ret=%d\n",
485 static int tce_iommu_use_page(unsigned long tce, unsigned long *hpa)
488 enum dma_data_direction direction = iommu_tce_direction(tce);
490 if (pin_user_pages_fast(tce & PAGE_MASK, 1,
502 unsigned long entry, unsigned long tce, unsigned long pages,
510 unsigned long offset = tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK;
512 ret = tce_iommu_use_page(tce, &hpa);
528 pr_err("iommu_tce: %s failed ioba=%lx, tce=%lx, ret=%ld\n",
530 tce, ret);
537 tce += IOMMU_PAGE_SIZE(tbl);
550 unsigned long entry, unsigned long tce, unsigned long pages,
562 tce, tbl->it_page_shift, &hpa, &mem);
573 hpa |= tce & IOMMU_PAGE_MASK(tbl) & ~PAGE_MASK;
585 pr_err("iommu_tce: %s failed ioba=%lx, tce=%lx, ret=%ld\n",
587 tce, ret);
594 *pua = cpu_to_be64(tce);
596 tce += IOMMU_PAGE_SIZE(tbl);