Lines Matching refs:npages
37 int npages = region->length >> PAGE_SHIFT; in afu_dma_pin_pages() local
41 ret = account_locked_vm(current->mm, npages, true); in afu_dma_pin_pages()
45 region->pages = kcalloc(npages, sizeof(struct page *), GFP_KERNEL); in afu_dma_pin_pages()
51 pinned = pin_user_pages_fast(region->user_addr, npages, FOLL_WRITE, in afu_dma_pin_pages()
56 } else if (pinned != npages) { in afu_dma_pin_pages()
70 account_locked_vm(current->mm, npages, false); in afu_dma_pin_pages()
85 long npages = region->length >> PAGE_SHIFT; in afu_dma_unpin_pages() local
88 unpin_user_pages(region->pages, npages); in afu_dma_unpin_pages()
90 account_locked_vm(current->mm, npages, false); in afu_dma_unpin_pages()
92 dev_dbg(dev, "%ld pages unpinned\n", npages); in afu_dma_unpin_pages()
104 int npages = region->length >> PAGE_SHIFT; in afu_dma_check_continuous_pages() local
107 for (i = 0; i < npages - 1; i++) in afu_dma_check_continuous_pages()