/openbmc/linux/drivers/s390/cio/ |
H A D | vfio_ccw_cp.c | 94 int unpinned = 0, npage = 1; in page_array_unpin() local 98 dma_addr_t *last = &first[npage]; in page_array_unpin() 100 if (unpinned + npage < pa_nr && in page_array_unpin() 101 *first + npage * PAGE_SIZE == *last && in page_array_unpin() 103 npage++; in page_array_unpin() 107 vfio_unpin_pages(vdev, *first, npage); in page_array_unpin() 108 unpinned += npage; in page_array_unpin() 109 npage = 1; in page_array_unpin() 133 int pinned = 0, npage = 1; in page_array_pin() local 138 dma_addr_t *last = &first[npage]; in page_array_pin() [all …]
|
/openbmc/linux/drivers/infiniband/hw/hns/ |
H A D | hns_roce_mr.c | 582 int count, npage; in mtr_map_region() local 590 npage = 0; in mtr_map_region() 591 while (offset < end && npage < max_count) { in mtr_map_region() 598 for (i = 0; i < count && npage < max_count; i++) { in mtr_map_region() 599 addr = pages[npage]; in mtr_map_region() 602 npage++; in mtr_map_region() 607 return npage; in mtr_map_region() 708 int npage; in mtr_map_bufs() local 717 npage = hns_roce_get_umem_bufs(pages, page_count, in mtr_map_bufs() 720 npage = hns_roce_get_kmem_bufs(hr_dev, pages, page_count, in mtr_map_bufs() [all …]
|
/openbmc/linux/drivers/vfio/ |
H A D | vfio.h | 217 int npage, int prot, 220 dma_addr_t user_iova, int npage); 248 dma_addr_t iova, int npage, 251 dma_addr_t iova, int npage); 293 dma_addr_t iova, int npage, in vfio_device_container_pin_pages() argument 300 dma_addr_t iova, int npage) in vfio_device_container_unpin_pages() argument
|
H A D | vfio_iommu_type1.c | 413 bool lock_cap, long npage) in mm_lock_acct() argument 420 ret = __account_locked_vm(mm, abs(npage), npage > 0, task, lock_cap); in mm_lock_acct() 425 static int vfio_lock_acct(struct vfio_dma *dma, long npage, bool async) in vfio_lock_acct() argument 430 if (!npage) in vfio_lock_acct() 437 ret = mm_lock_acct(dma->task, mm, dma->lock_cap, npage); in vfio_lock_acct() 439 dma->locked_vm += npage; in vfio_lock_acct() 614 long npage, unsigned long *pfn_base, in vfio_pin_pages_remote() argument 636 while (npage) { in vfio_pin_pages_remote() 639 long req_pages = min_t(long, npage, batch->capacity); in vfio_pin_pages_remote() 685 npage--; in vfio_pin_pages_remote() [all …]
|
H A D | container.c | 532 dma_addr_t iova, int npage, in vfio_device_container_pin_pages() argument 539 if (npage > VFIO_PIN_PAGES_MAX_ENTRIES) in vfio_device_container_pin_pages() 545 npage, prot, pages); in vfio_device_container_pin_pages() 549 dma_addr_t iova, int npage) in vfio_device_container_unpin_pages() argument 553 if (WARN_ON(npage <= 0 || npage > VFIO_PIN_PAGES_MAX_ENTRIES)) in vfio_device_container_unpin_pages() 557 npage); in vfio_device_container_unpin_pages()
|
H A D | vfio_main.c | 1534 int npage, int prot, struct page **pages) in vfio_pin_pages() argument 1537 if (!pages || !npage || WARN_ON(!vfio_assert_device_open(device))) in vfio_pin_pages() 1543 npage, prot, pages); in vfio_pin_pages() 1557 npage * PAGE_SIZE, pages, in vfio_pin_pages() 1561 return npage; in vfio_pin_pages() 1574 void vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova, int npage) in vfio_unpin_pages() argument 1582 vfio_device_container_unpin_pages(device, iova, npage); in vfio_unpin_pages() 1590 npage * PAGE_SIZE); in vfio_unpin_pages()
|
/openbmc/linux/fs/f2fs/ |
H A D | node.c | 764 struct page *npage[4]; in f2fs_get_dnode_of_data() local 777 npage[0] = dn->inode_page; in f2fs_get_dnode_of_data() 779 if (!npage[0]) { in f2fs_get_dnode_of_data() 780 npage[0] = f2fs_get_node_page(sbi, nids[0]); in f2fs_get_dnode_of_data() 781 if (IS_ERR(npage[0])) in f2fs_get_dnode_of_data() 782 return PTR_ERR(npage[0]); in f2fs_get_dnode_of_data() 788 f2fs_put_page(npage[0], 1); in f2fs_get_dnode_of_data() 792 parent = npage[0]; in f2fs_get_dnode_of_data() 795 dn->inode_page = npage[0]; in f2fs_get_dnode_of_data() 810 npage[i] = f2fs_new_node_page(dn, noffset[i]); in f2fs_get_dnode_of_data() [all …]
|
H A D | inline.c | 295 int f2fs_recover_inline_data(struct inode *inode, struct page *npage) in f2fs_recover_inline_data() argument 310 if (IS_INODE(npage)) in f2fs_recover_inline_data() 311 ri = F2FS_INODE(npage); in f2fs_recover_inline_data() 322 src_addr = inline_data_addr(inode, npage); in f2fs_recover_inline_data()
|
H A D | f2fs.h | 981 struct page *ipage, struct page *npage, nid_t nid) in set_new_dnode() argument 986 dn->node_page = npage; in set_new_dnode() 4149 int f2fs_recover_inline_data(struct inode *inode, struct page *npage);
|
/openbmc/linux/drivers/infiniband/hw/mthca/ |
H A D | mthca_allocator.c | 157 int npage = (nent * sizeof (void *) + PAGE_SIZE - 1) / PAGE_SIZE; in mthca_array_init() local 160 array->page_list = kmalloc_array(npage, sizeof(*array->page_list), in mthca_array_init() 165 for (i = 0; i < npage; ++i) { in mthca_array_init()
|
/openbmc/linux/lib/ |
H A D | kfifo.c | 315 struct page *npage; in setup_sgl_buf() local 319 npage = virt_to_page(buf); in setup_sgl_buf() 320 if (page_to_phys(page) != page_to_phys(npage) - l) { in setup_sgl_buf() 325 page = npage; in setup_sgl_buf()
|
/openbmc/linux/drivers/gpu/drm/i915/gvt/ |
H A D | kvmgt.c | 141 int npage; in gvt_pin_guest_page() local 148 for (npage = 0; npage < total_pages; npage++) { in gvt_pin_guest_page() 149 dma_addr_t cur_iova = (gfn + npage) << PAGE_SHIFT; in gvt_pin_guest_page() 160 if (npage == 0) in gvt_pin_guest_page() 162 else if (page_to_pfn(base_page) + npage != page_to_pfn(cur_page)) { in gvt_pin_guest_page() 164 npage++; in gvt_pin_guest_page() 172 if (npage) in gvt_pin_guest_page() 173 gvt_unpin_guest_page(vgpu, gfn, npage * PAGE_SIZE); in gvt_pin_guest_page()
|
/openbmc/linux/include/linux/ |
H A D | vfio.h | 315 int npage, int prot, struct page **pages); 316 void vfio_unpin_pages(struct vfio_device *device, dma_addr_t iova, int npage);
|
/openbmc/linux/drivers/iommu/iommufd/ |
H A D | pages.c | 671 unsigned int npage = 0; in batch_rw() local 677 copy_data_page(pfn_to_page(batch->pfns[cur] + npage), data, in batch_rw() 683 npage++; in batch_rw() 684 if (npage == batch->npfns[cur]) { in batch_rw() 685 npage = 0; in batch_rw()
|
/openbmc/linux/Documentation/driver-api/ |
H A D | vfio-mediated-device.rst | 256 int npage, int prot, struct page **pages); 259 int npage);
|