Lines Matching refs:npages
19 static void put_all_pages(struct page **pages, int npages) in put_all_pages() argument
23 for (i = 0; i < npages; i++) in put_all_pages()
46 int npages = region->length >> PAGE_SHIFT; in afu_dma_pin_pages() local
50 ret = account_locked_vm(current->mm, npages, true); in afu_dma_pin_pages()
54 region->pages = kcalloc(npages, sizeof(struct page *), GFP_KERNEL); in afu_dma_pin_pages()
60 pinned = get_user_pages_fast(region->user_addr, npages, FOLL_WRITE, in afu_dma_pin_pages()
65 } else if (pinned != npages) { in afu_dma_pin_pages()
79 account_locked_vm(current->mm, npages, false); in afu_dma_pin_pages()
94 long npages = region->length >> PAGE_SHIFT; in afu_dma_unpin_pages() local
97 put_all_pages(region->pages, npages); in afu_dma_unpin_pages()
99 account_locked_vm(current->mm, npages, false); in afu_dma_unpin_pages()
101 dev_dbg(dev, "%ld pages unpinned\n", npages); in afu_dma_unpin_pages()
113 int npages = region->length >> PAGE_SHIFT; in afu_dma_check_continuous_pages() local
116 for (i = 0; i < npages - 1; i++) in afu_dma_check_continuous_pages()