Lines Matching refs:entry
312 unsigned long entry; in iommu_alloc() local
316 entry = iommu_range_alloc(dev, tbl, npages, NULL, mask, align_order); in iommu_alloc()
318 if (unlikely(entry == DMA_ERROR_CODE)) in iommu_alloc()
321 entry += tbl->it_offset; /* Offset into real TCE table */ in iommu_alloc()
322 ret = entry << tbl->it_page_shift; /* Set the return dma address */ in iommu_alloc()
325 build_fail = ppc_md.tce_build(tbl, entry, npages, in iommu_alloc()
352 unsigned long entry, free_entry; in iommu_free_check() local
354 entry = dma_addr >> tbl->it_page_shift; in iommu_free_check()
355 free_entry = entry - tbl->it_offset; in iommu_free_check()
358 (entry < tbl->it_offset)) { in iommu_free_check()
361 printk(KERN_INFO "\tentry = 0x%lx\n", entry); in iommu_free_check()
378 unsigned long entry) in get_pool() argument
384 if (entry >= largepool_start) { in get_pool()
387 unsigned int pool_nr = entry / tbl->poolsize; in get_pool()
399 unsigned long entry, free_entry; in __iommu_free() local
403 entry = dma_addr >> tbl->it_page_shift; in __iommu_free()
404 free_entry = entry - tbl->it_offset; in __iommu_free()
411 ppc_md.tce_free(tbl, entry, npages); in __iommu_free()
460 unsigned long vaddr, npages, entry, slen; in ppc_iommu_map_sg() local
475 entry = iommu_range_alloc(dev, tbl, npages, &handle, in ppc_iommu_map_sg()
481 if (unlikely(entry == DMA_ERROR_CODE)) { in ppc_iommu_map_sg()
490 entry += tbl->it_offset; in ppc_iommu_map_sg()
491 dma_addr = entry << tbl->it_page_shift; in ppc_iommu_map_sg()
495 npages, entry, dma_addr); in ppc_iommu_map_sg()
498 build_fail = ppc_md.tce_build(tbl, entry, npages, in ppc_iommu_map_sg()
975 unsigned long iommu_clear_tce(struct iommu_table *tbl, unsigned long entry) in iommu_clear_tce() argument
978 struct iommu_pool *pool = get_pool(tbl, entry); in iommu_clear_tce()
982 oldtce = ppc_md.tce_get(tbl, entry); in iommu_clear_tce()
984 ppc_md.tce_free(tbl, entry, 1); in iommu_clear_tce()
995 unsigned long entry, unsigned long pages) in iommu_clear_tces_and_put_pages() argument
1000 for ( ; pages; --pages, ++entry) { in iommu_clear_tces_and_put_pages()
1001 oldtce = iommu_clear_tce(tbl, entry); in iommu_clear_tces_and_put_pages()
1022 int iommu_tce_build(struct iommu_table *tbl, unsigned long entry, in iommu_tce_build() argument
1027 struct iommu_pool *pool = get_pool(tbl, entry); in iommu_tce_build()
1031 oldtce = ppc_md.tce_get(tbl, entry); in iommu_tce_build()
1034 ret = ppc_md.tce_build(tbl, entry, 1, hwaddr, direction, NULL); in iommu_tce_build()
1047 int iommu_put_tce_user_mode(struct iommu_table *tbl, unsigned long entry, in iommu_put_tce_user_mode() argument
1064 ret = iommu_tce_build(tbl, entry, hwaddr, direction); in iommu_put_tce_user_mode()
1070 __func__, entry << tbl->it_page_shift, tce, ret); in iommu_put_tce_user_mode()