Home
last modified time | relevance | path

Searched refs:n_pages (Results 1 – 25 of 32) sorted by relevance

12

/linux/arch/xtensa/mm/
H A Dmmu.c24 static void * __init init_pmd(unsigned long vaddr, unsigned long n_pages) in init_pmd() argument
30 n_pages = ALIGN(n_pages, PTRS_PER_PTE); in init_pmd()
33 __func__, vaddr, n_pages); in init_pmd()
35 pte = memblock_alloc_low(n_pages * sizeof(pte_t), PAGE_SIZE); in init_pmd()
38 __func__, n_pages * sizeof(pte_t), PAGE_SIZE); in init_pmd()
40 for (i = 0; i < n_pages; ++i) in init_pmd()
43 for (i = 0; i < n_pages; i += PTRS_PER_PTE, ++pmd) { in init_pmd()
H A Dkasan_init.c37 unsigned long n_pages = (end - start) / PAGE_SIZE; in populate() local
38 unsigned long n_pmds = n_pages / PTRS_PER_PTE; in populate()
42 pte_t *pte = memblock_alloc(n_pages * sizeof(pte_t), PAGE_SIZE); in populate()
46 __func__, n_pages * sizeof(pte_t), PAGE_SIZE); in populate()
/linux/mm/
H A Dballoon_compaction.c45 size_t n_pages = 0; in balloon_page_list_enqueue() local
51 n_pages++; in balloon_page_list_enqueue()
54 return n_pages; in balloon_page_list_enqueue()
81 size_t n_pages = 0; in balloon_page_list_dequeue() local
85 if (n_pages == n_req_pages) in balloon_page_list_dequeue()
106 n_pages++; in balloon_page_list_dequeue()
110 return n_pages; in balloon_page_list_dequeue()
181 int n_pages; in balloon_page_dequeue() local
183 n_pages = balloon_page_list_dequeue(b_dev_info, &pages, 1); in balloon_page_dequeue()
185 if (n_pages != 1) { in balloon_page_dequeue()
/linux/drivers/xen/
H A Dgrant-dma-ops.c83 unsigned int i, n_pages = XEN_PFN_UP(size); in xen_grant_dma_alloc() local
95 ret = alloc_pages_exact(n_pages * XEN_PAGE_SIZE, gfp); in xen_grant_dma_alloc()
102 free_pages_exact(ret, n_pages * XEN_PAGE_SIZE); in xen_grant_dma_alloc()
106 for (i = 0; i < n_pages; i++) { in xen_grant_dma_alloc()
120 unsigned int i, n_pages = XEN_PFN_UP(size); in xen_grant_dma_free() local
132 for (i = 0; i < n_pages; i++) { in xen_grant_dma_free()
140 gnttab_free_grant_reference_seq(grant, n_pages); in xen_grant_dma_free()
142 free_pages_exact(vaddr, n_pages * XEN_PAGE_SIZE); in xen_grant_dma_free()
191 for (i = 0; i < n_pages; i++) { in xen_grant_dma_map_page()
223 for (i = 0; i < n_pages; i++) { in xen_grant_dma_unmap_page()
[all …]
H A Dprivcmd-buf.c34 unsigned int n_pages; member
60 for (i = 0; i < vma_priv->n_pages; i++) in privcmd_buf_vmapriv_free()
152 vma_priv->n_pages++; in privcmd_buf_mmap()
166 if (vma_priv->n_pages != count) in privcmd_buf_mmap()
170 vma_priv->n_pages); in privcmd_buf_mmap()
H A Dballoon.c544 long n_pages; in balloon_thread() local
546 n_pages = min(-credit, si_mem_available()); in balloon_thread()
547 balloon_state = decrease_reservation(n_pages, in balloon_thread()
549 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread()
550 n_pages < totalreserve_pages) in balloon_thread()
/linux/drivers/comedi/
H A Dcomedi_buf.c36 PAGE_SIZE * bm->n_pages, in comedi_buf_map_kref_release()
39 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release()
75 unsigned int n_pages) in comedi_buf_map_alloc() argument
110 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc()
116 bm->n_pages = i; in comedi_buf_map_alloc()
118 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc()
127 bm->n_pages = i; in comedi_buf_map_alloc()
128 if (i < n_pages) in comedi_buf_map_alloc()
141 unsigned int n_pages) in __comedi_buf_alloc() argument
176 for (i = 0; i < n_pages; i++) { in __comedi_buf_alloc()
[all …]
/linux/drivers/misc/
H A Dvmw_balloon.c244 unsigned int n_pages; member
690 ctl->n_pages = i; in vmballoon_alloc_page_list()
850 num_pages = ctl->n_pages; in vmballoon_lock()
891 ctl->n_pages--; in vmballoon_lock()
910 int *n_pages, in vmballoon_release_page_list() argument
920 if (n_pages) in vmballoon_release_page_list()
921 *n_pages = 0; in vmballoon_release_page_list()
987 unsigned int *n_pages, in vmballoon_enqueue_page_list() argument
1012 *n_pages = 0; in vmballoon_enqueue_page_list()
1058 *n_pages = i; in vmballoon_dequeue_page_list()
[all …]
/linux/drivers/gpu/drm/i915/gt/
H A Dshmem_utils.c61 size_t n_pages, i; in shmem_pin_map() local
64 n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT; in shmem_pin_map()
65 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in shmem_pin_map()
69 for (i = 0; i < n_pages; i++) { in shmem_pin_map()
76 vaddr = vmap(pages, n_pages, VM_MAP_PUT_PAGES, PAGE_KERNEL); in shmem_pin_map()
/linux/drivers/media/common/videobuf2/
H A Dvideobuf2-vmalloc.c78 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()
137 vm_unmap_ram((void *)vaddr, n_pages); in vb2_vmalloc_put_userptr()
142 for (i = 0; i < n_pages; i++) in vb2_vmalloc_put_userptr()
H A Dvideobuf2-dma-contig.c569 int n_pages, i; in vb2_dc_get_userptr() local
605 n_pages = frame_vector_count(vec); in vb2_dc_get_userptr()
614 for (i = 1; i < n_pages; i++) in vb2_dc_get_userptr()
633 ret = sg_alloc_table_from_pages(sgt, frame_vector_pages(vec), n_pages, in vb2_dc_get_userptr()
/linux/arch/arc/include/asm/
H A Darcregs.h154 #define PAGES_TO_KB(n_pages) ((n_pages) << (PAGE_SHIFT - 10)) argument
155 #define PAGES_TO_MB(n_pages) (PAGES_TO_KB(n_pages) >> 10) argument
/linux/drivers/gpu/drm/tests/
H A Ddrm_buddy_test.c263 unsigned long n_pages, total, i = 0; in drm_test_buddy_alloc_clear() local
295 n_pages = 10; in drm_test_buddy_alloc_clear()
313 } while (++i < n_pages); in drm_test_buddy_alloc_clear()
348 n_pages = mm_size / ps; in drm_test_buddy_alloc_clear()
361 } while (++i < n_pages); in drm_test_buddy_alloc_clear()
406 unsigned long i, n_pages, total; in drm_test_buddy_alloc_contiguous() local
425 n_pages = mm_size / ps; in drm_test_buddy_alloc_contiguous()
441 } while (++i < n_pages); in drm_test_buddy_alloc_contiguous()
/linux/include/linux/
H A Dscatterlist.h442 struct page **pages, unsigned int n_pages,
447 unsigned int n_pages, unsigned int offset,
473 unsigned int n_pages, in sg_alloc_table_from_pages() argument
477 return sg_alloc_table_from_pages_segment(sgt, pages, n_pages, offset, in sg_alloc_table_from_pages()
/linux/kernel/
H A Drelay.c61 static struct page **relay_alloc_page_array(unsigned int n_pages) in relay_alloc_page_array() argument
63 return kvcalloc(n_pages, sizeof(struct page *), GFP_KERNEL); in relay_alloc_page_array()
111 unsigned int i, j, n_pages; in relay_alloc_buf() local
114 n_pages = *size >> PAGE_SHIFT; in relay_alloc_buf()
116 buf->page_array = relay_alloc_page_array(n_pages); in relay_alloc_buf()
120 for (i = 0; i < n_pages; i++) { in relay_alloc_buf()
126 mem = vmap(buf->page_array, n_pages, VM_MAP, PAGE_KERNEL); in relay_alloc_buf()
131 buf->page_count = n_pages; in relay_alloc_buf()
/linux/kernel/trace/
H A Dtracing_map.c294 for (i = 0; i < a->n_pages; i++) in tracing_map_array_clear()
308 for (i = 0; i < a->n_pages; i++) { in tracing_map_array_free()
333 a->n_pages = n_elts / a->entries_per_page; in tracing_map_array_alloc()
334 if (!a->n_pages) in tracing_map_array_alloc()
335 a->n_pages = 1; in tracing_map_array_alloc()
339 a->pages = kcalloc(a->n_pages, sizeof(void *), GFP_KERNEL); in tracing_map_array_alloc()
343 for (i = 0; i < a->n_pages; i++) { in tracing_map_array_alloc()
H A Dtracing_map.h169 unsigned int n_pages; member
/linux/drivers/gpu/drm/i915/
H A Di915_ttm_buddy_manager.c42 unsigned long n_pages, lpfn; in i915_ttm_buddy_man_alloc() local
83 n_pages = size >> ilog2(mm->chunk_size); in i915_ttm_buddy_man_alloc()
86 if (lpfn <= bman->visible_size && n_pages > bman->visible_avail) { in i915_ttm_buddy_man_alloc()
94 (u64)n_pages << PAGE_SHIFT, in i915_ttm_buddy_man_alloc()
/linux/lib/
H A Dscatterlist.c456 struct page **pages, unsigned int n_pages, unsigned int offset, in sg_alloc_append_table_from_pages() argument
487 while (n_pages && pages_are_mergeable(pages[0], last_pg)) { in sg_alloc_append_table_from_pages()
493 n_pages--; in sg_alloc_append_table_from_pages()
495 if (!n_pages) in sg_alloc_append_table_from_pages()
503 for (i = 1; i < n_pages; i++) { in sg_alloc_append_table_from_pages()
519 for (j = cur_page + 1; j < n_pages; j++) { in sg_alloc_append_table_from_pages()
580 unsigned int n_pages, unsigned int offset, in sg_alloc_table_from_pages_segment() argument
587 err = sg_alloc_append_table_from_pages(&append, pages, n_pages, offset, in sg_alloc_table_from_pages_segment()
/linux/drivers/gpu/drm/i915/gem/
H A Di915_gem_pages.c274 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_map_page() local
302 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page()
311 if (n_pages > ARRAY_SIZE(stack)) { in i915_gem_object_map_page()
313 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in i915_gem_object_map_page()
321 vaddr = vmap(pages, n_pages, 0, pgprot); in i915_gem_object_map_page()
/linux/kernel/module/
H A Ddecompress.c296 unsigned int n_pages; in module_decompress() local
308 n_pages = DIV_ROUND_UP(size, PAGE_SIZE) * 2; in module_decompress()
309 error = module_extend_max_pages(info, n_pages); in module_decompress()
/linux/drivers/media/pci/intel/ipu6/
H A Dipu6-buttress.c558 unsigned long n_pages; in ipu6_buttress_map_fw_image() local
565 n_pages = PHYS_PFN(PAGE_ALIGN(fw->size)); in ipu6_buttress_map_fw_image()
567 pages = kmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in ipu6_buttress_map_fw_image()
572 for (i = 0; i < n_pages; i++) { in ipu6_buttress_map_fw_image()
584 ret = sg_alloc_table_from_pages(sgt, pages, n_pages, 0, fw->size, in ipu6_buttress_map_fw_image()
H A Dipu6-dma.c468 int n_pages; in ipu6_dma_get_sgtable() local
481 n_pages = PHYS_PFN(PAGE_ALIGN(size)); in ipu6_dma_get_sgtable()
483 ret = sg_alloc_table_from_pages(sgt, info->pages, n_pages, 0, size, in ipu6_dma_get_sgtable()
/linux/drivers/net/ethernet/sfc/
H A Dmcdi_mon.c309 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()
/linux/drivers/net/ethernet/sfc/siena/
H A Dmcdi_mon.c309 unsigned int n_pages, n_sensors, n_attrs, page; in efx_siena_mcdi_mon_probe() local
333 n_pages = page; in efx_siena_mcdi_mon_probe()
378 if (page == n_pages) in efx_siena_mcdi_mon_probe()

12