Lines Matching refs:npages

205                                        unsigned long npages,  in iommu_range_alloc()  argument
212 int largealloc = npages > 15; in iommu_range_alloc()
224 if (unlikely(npages == 0)) { in iommu_range_alloc()
278 n = iommu_area_alloc(tbl->it_map, limit, start, npages, tbl->it_offset, in iommu_range_alloc()
314 end = n + npages; in iommu_range_alloc()
336 void *page, unsigned int npages, in iommu_alloc() argument
345 entry = iommu_range_alloc(dev, tbl, npages, NULL, mask, align_order); in iommu_alloc()
354 build_fail = tbl->it_ops->set(tbl, entry, npages, in iommu_alloc()
364 __iommu_free(tbl, ret, npages); in iommu_alloc()
379 unsigned int npages) in iommu_free_check() argument
386 if (((free_entry + npages) > tbl->it_size) || in iommu_free_check()
426 unsigned int npages) in __iommu_free() argument
437 if (!iommu_free_check(tbl, dma_addr, npages)) in __iommu_free()
440 tbl->it_ops->clear(tbl, entry, npages); in __iommu_free()
443 bitmap_clear(tbl->it_map, free_entry, npages); in __iommu_free()
448 unsigned int npages) in iommu_free() argument
450 __iommu_free(tbl, dma_addr, npages); in iommu_free()
489 unsigned long vaddr, npages, entry, slen; in ppc_iommu_map_sg() local
499 npages = iommu_num_pages(vaddr, slen, IOMMU_PAGE_SIZE(tbl)); in ppc_iommu_map_sg()
504 entry = iommu_range_alloc(dev, tbl, npages, &handle, in ppc_iommu_map_sg()
515 npages); in ppc_iommu_map_sg()
525 npages, entry, dma_addr); in ppc_iommu_map_sg()
528 build_fail = tbl->it_ops->set(tbl, entry, npages, in ppc_iommu_map_sg()
588 unsigned long vaddr, npages; in ppc_iommu_map_sg() local
591 npages = iommu_num_pages(s->dma_address, s->dma_length, in ppc_iommu_map_sg()
593 __iommu_free(tbl, vaddr, npages); in ppc_iommu_map_sg()
616 unsigned int npages; in ppc_iommu_unmap_sg() local
621 npages = iommu_num_pages(dma_handle, sg->dma_length, in ppc_iommu_unmap_sg()
623 __iommu_free(tbl, dma_handle, npages); in ppc_iommu_unmap_sg()
850 unsigned int npages, align; in iommu_map_page() local
858 npages = iommu_num_pages(uaddr, size, IOMMU_PAGE_SIZE(tbl)); in iommu_map_page()
864 dma_handle = iommu_alloc(dev, tbl, vaddr, npages, direction, in iommu_map_page()
872 npages); in iommu_map_page()
885 unsigned int npages; in iommu_unmap_page() local
890 npages = iommu_num_pages(dma_handle, size, in iommu_unmap_page()
892 iommu_free(tbl, dma_handle, npages); in iommu_unmap_page()
1035 unsigned long ioba, unsigned long npages) in iommu_tce_check_ioba() argument