/drivers/staging/comedi/ |
D | comedi_buf.c | 37 PAGE_SIZE * bm->n_pages, in comedi_buf_map_kref_release() 40 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release() 76 unsigned int n_pages) in comedi_buf_map_alloc() argument 93 bm->page_list = vzalloc(sizeof(*buf) * n_pages); in comedi_buf_map_alloc() 106 PAGE_SIZE * n_pages, &dma_addr, in comedi_buf_map_alloc() 111 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc() 117 bm->n_pages = i; in comedi_buf_map_alloc() 119 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc() 128 bm->n_pages = i; in comedi_buf_map_alloc() 129 if (i < n_pages) in comedi_buf_map_alloc() [all …]
|
D | comedi_fops.c | 2326 int n_pages; in comedi_mmap() local 2376 n_pages = vma_pages(vma); in comedi_mmap() 2380 if (!bm || n_pages > bm->n_pages) { in comedi_mmap() 2391 buf->dma_addr, n_pages * PAGE_SIZE); in comedi_mmap() 2393 for (i = 0; i < n_pages; ++i) { in comedi_mmap()
|
D | comedidev.h | 252 unsigned int n_pages; member
|
/drivers/misc/ |
D | vmw_balloon.c | 246 unsigned int n_pages; member 706 ctl->n_pages = i; in vmballoon_alloc_page_list() 708 return req_n_pages == ctl->n_pages ? 0 : -ENOMEM; in vmballoon_alloc_page_list() 866 num_pages = ctl->n_pages; in vmballoon_lock() 877 batch_status = vmballoon_lock_op(b, ctl->n_pages, ctl->page_size, in vmballoon_lock() 907 ctl->n_pages--; in vmballoon_lock() 926 int *n_pages, in vmballoon_release_page_list() argument 936 if (n_pages) in vmballoon_release_page_list() 937 *n_pages = 0; in vmballoon_release_page_list() 1003 unsigned int *n_pages, in vmballoon_enqueue_page_list() argument [all …]
|
/drivers/gpu/drm/i915/gt/ |
D | shmem_utils.c | 55 size_t n_pages, i; in shmem_pin_map() local 58 n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT; in shmem_pin_map() 59 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in shmem_pin_map() 63 for (i = 0; i < n_pages; i++) { in shmem_pin_map() 70 vaddr = vmap(pages, n_pages, VM_MAP_PUT_PAGES, PAGE_KERNEL); in shmem_pin_map()
|
/drivers/xen/ |
D | privcmd-buf.c | 33 unsigned int n_pages; member 59 for (i = 0; i < vma_priv->n_pages; i++) in privcmd_buf_vmapriv_free() 151 vma_priv->n_pages++; in privcmd_buf_mmap() 165 if (vma_priv->n_pages != count) in privcmd_buf_mmap() 169 vma_priv->n_pages); in privcmd_buf_mmap()
|
D | balloon.c | 556 long n_pages; in balloon_thread() local 558 n_pages = min(-credit, si_mem_available()); in balloon_thread() 559 balloon_state = decrease_reservation(n_pages, in balloon_thread() 561 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread() 562 n_pages < totalreserve_pages) in balloon_thread()
|
/drivers/media/common/videobuf2/ |
D | videobuf2-vmalloc.c | 80 int n_pages, offset, i; in vb2_vmalloc_get_userptr() local 96 n_pages = frame_vector_count(vec); in vb2_vmalloc_get_userptr() 104 for (i = 1; i < n_pages; i++) in vb2_vmalloc_get_userptr() 110 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1); in vb2_vmalloc_get_userptr() 132 unsigned int n_pages; in vb2_vmalloc_put_userptr() local 135 n_pages = frame_vector_count(buf->vec); in vb2_vmalloc_put_userptr() 138 vm_unmap_ram((void *)vaddr, n_pages); in vb2_vmalloc_put_userptr() 141 for (i = 0; i < n_pages; i++) in vb2_vmalloc_put_userptr()
|
D | videobuf2-dma-contig.c | 462 int n_pages, i; in vb2_dc_get_userptr() local 496 n_pages = frame_vector_count(vec); in vb2_dc_get_userptr() 505 for (i = 1; i < n_pages; i++) in vb2_dc_get_userptr() 524 ret = sg_alloc_table_from_pages(sgt, frame_vector_pages(vec), n_pages, in vb2_dc_get_userptr()
|
/drivers/gpu/drm/i915/ |
D | intel_memory_region.c | 75 unsigned long n_pages; in __intel_memory_region_get_pages_buddy() local 93 n_pages = size >> ilog2(mem->mm.chunk_size); in __intel_memory_region_get_pages_buddy() 101 order = fls(n_pages) - 1; in __intel_memory_region_get_pages_buddy() 114 n_pages -= BIT(order); in __intel_memory_region_get_pages_buddy() 119 if (!n_pages) in __intel_memory_region_get_pages_buddy()
|
/drivers/gpu/drm/vgem/ |
D | vgem_drv.c | 298 long n_pages = obj->size >> PAGE_SHIFT; in vgem_prime_pin() local 308 drm_clflush_pages(pages, n_pages); in vgem_prime_pin() 363 long n_pages = obj->size >> PAGE_SHIFT; in vgem_prime_vmap() local 370 return vmap(pages, n_pages, 0, pgprot_writecombine(PAGE_KERNEL)); in vgem_prime_vmap()
|
/drivers/gpu/drm/i915/gem/ |
D | i915_gem_pages.c | 249 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_map_page() local 277 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page() 286 if (n_pages > ARRAY_SIZE(stack)) { in i915_gem_object_map_page() 288 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in i915_gem_object_map_page() 296 vaddr = vmap(pages, n_pages, 0, pgprot); in i915_gem_object_map_page()
|
/drivers/gpu/drm/vkms/ |
D | vkms_gem.c | 200 unsigned int n_pages = obj->size >> PAGE_SHIFT; in vkms_gem_vmap() local 208 vkms_obj->vaddr = vmap(pages, n_pages, VM_MAP, PAGE_KERNEL); in vkms_gem_vmap()
|
/drivers/net/ethernet/sfc/ |
D | mcdi_mon.c | 309 unsigned int n_pages, n_sensors, n_attrs, page; in efx_mcdi_mon_probe() local 332 n_pages = page; in efx_mcdi_mon_probe() 378 if (page == n_pages) in efx_mcdi_mon_probe()
|
/drivers/usb/gadget/function/ |
D | f_fs.c | 777 unsigned int n_pages; in ffs_build_sg_list() local 784 n_pages = PAGE_ALIGN(sz) >> PAGE_SHIFT; in ffs_build_sg_list() 785 pages = kvmalloc_array(n_pages, sizeof(struct page *), GFP_KERNEL); in ffs_build_sg_list() 791 for (i = 0, ptr = vaddr; i < n_pages; ++i, ptr += PAGE_SIZE) in ffs_build_sg_list() 794 if (sg_alloc_table_from_pages(sgt, pages, n_pages, 0, sz, GFP_KERNEL)) { in ffs_build_sg_list()
|
/drivers/md/ |
D | dm-integrity.c | 3398 static struct page_list *dm_integrity_alloc_page_list(unsigned n_pages) in dm_integrity_alloc_page_list() argument 3403 pl = kvmalloc_array(n_pages + 1, sizeof(struct page_list), GFP_KERNEL | __GFP_ZERO); in dm_integrity_alloc_page_list() 3407 for (i = 0; i < n_pages; i++) { in dm_integrity_alloc_page_list() 3446 unsigned n_pages; in dm_integrity_alloc_journal_scatterlist() local 3453 n_pages = (end_index - start_index + 1); in dm_integrity_alloc_journal_scatterlist() 3455 s = kvmalloc_array(n_pages, sizeof(struct scatterlist), in dm_integrity_alloc_journal_scatterlist() 3462 sg_init_table(s, n_pages); in dm_integrity_alloc_journal_scatterlist()
|