Lines Matching refs:npages
215 unsigned long npages, in iommu_range_alloc() argument
222 int largealloc = npages > 15; in iommu_range_alloc()
234 if (unlikely(npages == 0)) { in iommu_range_alloc()
288 n = iommu_area_alloc(tbl->it_map, limit, start, npages, tbl->it_offset, in iommu_range_alloc()
324 end = n + npages; in iommu_range_alloc()
346 void *page, unsigned int npages, in iommu_alloc() argument
355 entry = iommu_range_alloc(dev, tbl, npages, NULL, mask, align_order); in iommu_alloc()
364 build_fail = tbl->it_ops->set(tbl, entry, npages, in iommu_alloc()
374 __iommu_free(tbl, ret, npages); in iommu_alloc()
389 unsigned int npages) in iommu_free_check() argument
396 if (((free_entry + npages) > tbl->it_size) || in iommu_free_check()
436 unsigned int npages) in __iommu_free() argument
447 if (!iommu_free_check(tbl, dma_addr, npages)) in __iommu_free()
450 tbl->it_ops->clear(tbl, entry, npages); in __iommu_free()
453 bitmap_clear(tbl->it_map, free_entry, npages); in __iommu_free()
458 unsigned int npages) in iommu_free() argument
460 __iommu_free(tbl, dma_addr, npages); in iommu_free()
499 unsigned long vaddr, npages, entry, slen; in ppc_iommu_map_sg() local
509 npages = iommu_num_pages(vaddr, slen, IOMMU_PAGE_SIZE(tbl)); in ppc_iommu_map_sg()
514 entry = iommu_range_alloc(dev, tbl, npages, &handle, in ppc_iommu_map_sg()
525 npages); in ppc_iommu_map_sg()
535 npages, entry, dma_addr); in ppc_iommu_map_sg()
538 build_fail = tbl->it_ops->set(tbl, entry, npages, in ppc_iommu_map_sg()
598 unsigned long vaddr, npages; in ppc_iommu_map_sg() local
601 npages = iommu_num_pages(s->dma_address, s->dma_length, in ppc_iommu_map_sg()
603 __iommu_free(tbl, vaddr, npages); in ppc_iommu_map_sg()
626 unsigned int npages; in ppc_iommu_unmap_sg() local
631 npages = iommu_num_pages(dma_handle, sg->dma_length, in ppc_iommu_unmap_sg()
633 __iommu_free(tbl, dma_handle, npages); in ppc_iommu_unmap_sg()
860 unsigned int npages, align; in iommu_map_page() local
868 npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl)); in iommu_map_page()
874 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, in iommu_map_page()
882 npages); in iommu_map_page()
895 unsigned int npages; in iommu_unmap_page() local
900 npages = iommu_num_pages(dma_handle, size, in iommu_unmap_page()
902 iommu_free(tbl, dma_handle, npages); in iommu_unmap_page()
1048 unsigned long ioba, unsigned long npages) in iommu_tce_check_ioba() argument