• Home
  • Raw
  • Download

Lines Matching refs:npages

159 				    unsigned long npages)  in alloc_npages()  argument
163 entry = iommu_tbl_range_alloc(dev, &iommu->tbl, npages, NULL, in alloc_npages()
205 int npages, nid; in dma_4u_alloc_coherent() local
234 npages = size >> IO_PAGE_SHIFT; in dma_4u_alloc_coherent()
236 while (npages--) { in dma_4u_alloc_coherent()
252 unsigned long order, npages; in dma_4u_free_coherent() local
254 npages = IO_PAGE_ALIGN(size) >> IO_PAGE_SHIFT; in dma_4u_free_coherent()
257 iommu_tbl_range_free(&iommu->tbl, dvma, npages, IOMMU_ERROR_CODE); in dma_4u_free_coherent()
272 unsigned long flags, npages, oaddr; in dma_4u_map_page() local
284 npages = IO_PAGE_ALIGN(oaddr + sz) - (oaddr & IO_PAGE_MASK); in dma_4u_map_page()
285 npages >>= IO_PAGE_SHIFT; in dma_4u_map_page()
287 base = alloc_npages(dev, iommu, npages); in dma_4u_map_page()
308 for (i = 0; i < npages; i++, base++, base_paddr += IO_PAGE_SIZE) in dma_4u_map_page()
322 u32 vaddr, unsigned long ctx, unsigned long npages, in strbuf_flush() argument
357 for (i = 0; i < npages; i++, vaddr += IO_PAGE_SIZE) in strbuf_flush()
384 vaddr, ctx, npages); in strbuf_flush()
394 unsigned long flags, npages, ctx, i; in dma_4u_unmap_page() local
405 npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK); in dma_4u_unmap_page()
406 npages >>= IO_PAGE_SHIFT; in dma_4u_unmap_page()
421 npages, direction); in dma_4u_unmap_page()
424 for (i = 0; i < npages; i++) in dma_4u_unmap_page()
430 iommu_tbl_range_free(&iommu->tbl, bus_addr, npages, IOMMU_ERROR_CODE); in dma_4u_unmap_page()
480 unsigned long paddr, npages, entry, out_entry = 0, slen; in dma_4u_map_sg() local
491 npages = iommu_num_pages(paddr, slen, IO_PAGE_SIZE); in dma_4u_map_sg()
492 entry = iommu_tbl_range_alloc(dev, &iommu->tbl, npages, in dma_4u_map_sg()
499 " npages %lx\n", iommu, paddr, npages); in dma_4u_map_sg()
512 while (npages--) { in dma_4u_map_sg()
560 unsigned long vaddr, npages, entry, j; in dma_4u_map_sg() local
564 npages = iommu_num_pages(s->dma_address, s->dma_length, in dma_4u_map_sg()
571 for (j = 0; j < npages; j++) in dma_4u_map_sg()
574 iommu_tbl_range_free(&iommu->tbl, vaddr, npages, in dma_4u_map_sg()
631 unsigned long npages, entry; in dma_4u_unmap_sg() local
637 npages = iommu_num_pages(dma_handle, len, IO_PAGE_SIZE); in dma_4u_unmap_sg()
646 npages, direction); in dma_4u_unmap_sg()
648 for (i = 0; i < npages; i++) in dma_4u_unmap_sg()
651 iommu_tbl_range_free(&iommu->tbl, dma_handle, npages, in dma_4u_unmap_sg()
667 unsigned long flags, ctx, npages; in dma_4u_sync_single_for_cpu() local
677 npages = IO_PAGE_ALIGN(bus_addr + sz) - (bus_addr & IO_PAGE_MASK); in dma_4u_sync_single_for_cpu()
678 npages >>= IO_PAGE_SHIFT; in dma_4u_sync_single_for_cpu()
694 strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); in dma_4u_sync_single_for_cpu()
705 unsigned long flags, ctx, npages, i; in dma_4u_sync_sg_for_cpu() local
738 npages = (IO_PAGE_ALIGN(sgprv->dma_address + sgprv->dma_length) in dma_4u_sync_sg_for_cpu()
740 strbuf_flush(strbuf, iommu, bus_addr, ctx, npages, direction); in dma_4u_sync_sg_for_cpu()