Home
last modified time | relevance | path

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

12

/linux-6.3-rc2/arch/xtensa/mm/
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()
A Dkasan_init.c39 unsigned long n_pages = (end - start) / PAGE_SIZE; in populate() local
40 unsigned long n_pmds = n_pages / PTRS_PER_PTE; in populate()
44 pte_t *pte = memblock_alloc(n_pages * sizeof(pte_t), PAGE_SIZE); in populate()
48 __func__, n_pages * sizeof(pte_t), PAGE_SIZE); in populate()
/linux-6.3-rc2/mm/
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-6.3-rc2/drivers/xen/
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 …]
A Dprivcmd-buf.c33 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()
A Dballoon.c558 long n_pages; in balloon_thread() local
560 n_pages = min(-credit, si_mem_available()); in balloon_thread()
561 balloon_state = decrease_reservation(n_pages, in balloon_thread()
563 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread()
564 n_pages < totalreserve_pages) in balloon_thread()
/linux-6.3-rc2/drivers/comedi/
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 …]
A Dcomedi_fops.c2327 int n_pages; in comedi_mmap() local
2377 n_pages = vma_pages(vma); in comedi_mmap()
2381 if (!bm || n_pages > bm->n_pages) { in comedi_mmap()
2392 buf->dma_addr, n_pages * PAGE_SIZE); in comedi_mmap()
2394 for (i = 0; i < n_pages; ++i) { in comedi_mmap()
/linux-6.3-rc2/drivers/misc/
A Dvmw_balloon.c244 unsigned int n_pages; member
699 ctl->n_pages = i; in vmballoon_alloc_page_list()
859 num_pages = ctl->n_pages; in vmballoon_lock()
900 ctl->n_pages--; in vmballoon_lock()
919 int *n_pages, in vmballoon_release_page_list() argument
929 if (n_pages) in vmballoon_release_page_list()
930 *n_pages = 0; in vmballoon_release_page_list()
996 unsigned int *n_pages, in vmballoon_enqueue_page_list() argument
1021 *n_pages = 0; in vmballoon_enqueue_page_list()
1067 *n_pages = i; in vmballoon_dequeue_page_list()
[all …]
/linux-6.3-rc2/drivers/gpu/drm/i915/gt/
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-6.3-rc2/drivers/media/common/videobuf2/
A Dvideobuf2-vmalloc.c79 int n_pages, offset, i; in vb2_vmalloc_get_userptr() local
97 n_pages = frame_vector_count(vec); in vb2_vmalloc_get_userptr()
105 for (i = 1; i < n_pages; i++) in vb2_vmalloc_get_userptr()
111 buf->vaddr = vm_map_ram(frame_vector_pages(vec), n_pages, -1); in vb2_vmalloc_get_userptr()
133 unsigned int n_pages; in vb2_vmalloc_put_userptr() local
136 n_pages = frame_vector_count(buf->vec); in vb2_vmalloc_put_userptr()
139 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()
A Dvideobuf2-dma-contig.c571 int n_pages, i; in vb2_dc_get_userptr() local
607 n_pages = frame_vector_count(vec); in vb2_dc_get_userptr()
616 for (i = 1; i < n_pages; i++) in vb2_dc_get_userptr()
635 ret = sg_alloc_table_from_pages(sgt, frame_vector_pages(vec), n_pages, in vb2_dc_get_userptr()
/linux-6.3-rc2/arch/ia64/include/asm/
A Duncached.h8 extern unsigned long uncached_alloc_page(int starting_nid, int n_pages);
9 extern void uncached_free_page(unsigned long uc_addr, int n_pages);
/linux-6.3-rc2/arch/ia64/kernel/
A Duncached.c177 unsigned long uncached_alloc_page(int starting_nid, int n_pages) in uncached_alloc_page() argument
198 n_pages * PAGE_SIZE); in uncached_alloc_page()
218 void uncached_free_page(unsigned long uc_addr, int n_pages) in uncached_free_page() argument
229 gen_pool_free(pool, uc_addr, n_pages * PAGE_SIZE); in uncached_free_page()
/linux-6.3-rc2/arch/arc/include/asm/
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-6.3-rc2/lib/
A Dscatterlist.c452 struct page **pages, unsigned int n_pages, unsigned int offset, in sg_alloc_append_table_from_pages() argument
483 while (n_pages && pages_are_mergeable(pages[0], last_pg)) { in sg_alloc_append_table_from_pages()
489 n_pages--; in sg_alloc_append_table_from_pages()
491 if (!n_pages) in sg_alloc_append_table_from_pages()
499 for (i = 1; i < n_pages; i++) { in sg_alloc_append_table_from_pages()
515 for (j = cur_page + 1; j < n_pages; j++) { in sg_alloc_append_table_from_pages()
576 unsigned int n_pages, unsigned int offset, in sg_alloc_table_from_pages_segment() argument
583 err = sg_alloc_append_table_from_pages(&append, pages, n_pages, offset, in sg_alloc_table_from_pages_segment()
/linux-6.3-rc2/include/linux/
A Dscatterlist.h382 struct page **pages, unsigned int n_pages,
387 unsigned int n_pages, unsigned int offset,
413 unsigned int n_pages, in sg_alloc_table_from_pages() argument
417 return sg_alloc_table_from_pages_segment(sgt, pages, n_pages, offset, in sg_alloc_table_from_pages()
/linux-6.3-rc2/drivers/gpu/drm/i915/
A Di915_ttm_buddy_manager.c42 unsigned long n_pages, lpfn; in i915_ttm_buddy_man_alloc() local
92 n_pages = size >> ilog2(mm->chunk_size); in i915_ttm_buddy_man_alloc()
95 if (lpfn <= bman->visible_size && n_pages > bman->visible_avail) { in i915_ttm_buddy_man_alloc()
103 (u64)n_pages << PAGE_SHIFT, in i915_ttm_buddy_man_alloc()
142 if (place->lpfn - place->fpfn == n_pages) in i915_ttm_buddy_man_alloc()
/linux-6.3-rc2/kernel/trace/
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()
A Dtracing_map.h169 unsigned int n_pages; member
/linux-6.3-rc2/kernel/
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-6.3-rc2/drivers/gpu/drm/i915/gem/
A Di915_gem_pages.c270 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_map_page() local
298 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page()
307 if (n_pages > ARRAY_SIZE(stack)) { in i915_gem_object_map_page()
309 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in i915_gem_object_map_page()
317 vaddr = vmap(pages, n_pages, 0, pgprot); in i915_gem_object_map_page()
/linux-6.3-rc2/kernel/module/
A Ddecompress.c296 unsigned int n_pages; in module_decompress() local
304 n_pages = DIV_ROUND_UP(size, PAGE_SIZE) * 2; in module_decompress()
305 error = module_extend_max_pages(info, n_pages); in module_decompress()
/linux-6.3-rc2/drivers/net/ethernet/sfc/siena/
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()
/linux-6.3-rc2/drivers/net/ethernet/sfc/
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()

Completed in 50 milliseconds

12