Home
last modified time | relevance | path

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

12

/kernel/linux/linux-5.10/arch/xtensa/mm/
Dmmu.c22 static void * __init init_pmd(unsigned long vaddr, unsigned long n_pages) in init_pmd() argument
28 n_pages = ALIGN(n_pages, PTRS_PER_PTE); in init_pmd()
31 __func__, vaddr, n_pages); in init_pmd()
33 pte = memblock_alloc_low(n_pages * sizeof(pte_t), PAGE_SIZE); in init_pmd()
36 __func__, n_pages * sizeof(pte_t), PAGE_SIZE); in init_pmd()
38 for (i = 0; i < n_pages; ++i) in init_pmd()
41 for (i = 0; i < n_pages; i += PTRS_PER_PTE, ++pmd) { in init_pmd()
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()
/kernel/linux/linux-5.10/mm/
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()
/kernel/linux/linux-5.10/drivers/staging/comedi/
Dcomedi_buf.c37 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 …]
/kernel/linux/linux-5.10/drivers/misc/
Dvmw_balloon.c246 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 …]
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gt/
Dshmem_utils.c55 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()
/kernel/linux/linux-5.10/drivers/xen/
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()
Dballoon.c556 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()
/kernel/linux/linux-5.10/drivers/media/common/videobuf2/
Dvideobuf2-vmalloc.c80 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()
Dvideobuf2-dma-contig.c462 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()
/kernel/linux/linux-5.10/arch/ia64/include/asm/
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);
/kernel/linux/linux-5.10/arch/ia64/kernel/
Duncached.c179 unsigned long uncached_alloc_page(int starting_nid, int n_pages) in uncached_alloc_page() argument
200 n_pages * PAGE_SIZE); in uncached_alloc_page()
220 void uncached_free_page(unsigned long uc_addr, int n_pages) in uncached_free_page() argument
231 gen_pool_free(pool, uc_addr, n_pages * PAGE_SIZE); in uncached_free_page()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/
Dintel_memory_region.c75 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()
/kernel/linux/linux-5.10/arch/riscv/mm/
Dkasan_init.c58 unsigned long n_pages = (vend - vaddr) / PAGE_SIZE; in populate() local
60 ((n_pages + PTRS_PER_PTE) & -PTRS_PER_PTE) / PTRS_PER_PTE; in populate()
70 for (i = 0; i < n_pages; i++) { in populate()
/kernel/linux/linux-5.10/arch/arc/include/asm/
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
/kernel/linux/linux-5.10/lib/
Dscatterlist.c429 struct page **pages, unsigned int n_pages, unsigned int offset, in __sg_alloc_table_from_pages() argument
459 while (n_pages && page_to_pfn(pages[0]) == paddr) { in __sg_alloc_table_from_pages()
465 n_pages--; in __sg_alloc_table_from_pages()
467 if (!n_pages) in __sg_alloc_table_from_pages()
474 for (i = 1; i < n_pages; i++) { in __sg_alloc_table_from_pages()
490 for (j = cur_page + 1; j < n_pages; j++) { in __sg_alloc_table_from_pages()
546 unsigned int n_pages, unsigned int offset, in sg_alloc_table_from_pages() argument
549 return PTR_ERR_OR_ZERO(__sg_alloc_table_from_pages(sgt, pages, n_pages, in sg_alloc_table_from_pages()
/kernel/linux/linux-5.10/include/linux/
Dfscache-cache.h151 atomic_t n_pages; /* number of pages to be retrieved */ member
193 int n_pages) in fscache_retrieval_complete() argument
195 if (atomic_sub_return_relaxed(n_pages, &op->n_pages) <= 0) in fscache_retrieval_complete()
Dscatterlist.h295 struct page **pages, unsigned int n_pages, unsigned int offset,
300 unsigned int n_pages, unsigned int offset,
/kernel/linux/linux-5.10/kernel/trace/
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()
/kernel/linux/linux-5.10/drivers/gpu/drm/vgem/
Dvgem_drv.c298 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()
/kernel/linux/linux-5.10/drivers/gpu/drm/i915/gem/
Di915_gem_pages.c249 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()
/kernel/linux/linux-5.10/kernel/
Drelay.c71 static struct page **relay_alloc_page_array(unsigned int n_pages) in relay_alloc_page_array() argument
73 const size_t pa_size = n_pages * sizeof(struct page *); in relay_alloc_page_array()
126 unsigned int i, j, n_pages; in relay_alloc_buf() local
129 n_pages = *size >> PAGE_SHIFT; in relay_alloc_buf()
131 buf->page_array = relay_alloc_page_array(n_pages); in relay_alloc_buf()
135 for (i = 0; i < n_pages; i++) { in relay_alloc_buf()
141 mem = vmap(buf->page_array, n_pages, VM_MAP, PAGE_KERNEL); in relay_alloc_buf()
146 buf->page_count = n_pages; in relay_alloc_buf()
/kernel/linux/linux-5.10/drivers/gpu/drm/vkms/
Dvkms_gem.c200 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()
/kernel/linux/linux-5.10/drivers/net/ethernet/sfc/
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()
/kernel/linux/linux-5.10/fs/fscache/
Dpage.c276 atomic_set(&op->n_pages, 0); in fscache_do_cancel_retrieval()
290 atomic_read(&op->n_pages), ==, 0); in fscache_release_retrieval_op()
464 atomic_set(&op->n_pages, 1); in __fscache_read_or_alloc_page()
593 atomic_set(&op->n_pages, *nr_pages); in __fscache_read_or_alloc_pages()
705 atomic_set(&op->n_pages, 1); in __fscache_alloc_page()

12