/kernel/linux/linux-5.10/arch/xtensa/mm/ |
D | mmu.c | 22 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()
|
D | kasan_init.c | 39 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/ |
D | balloon_compaction.c | 45 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/ |
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 …]
|
/kernel/linux/linux-5.10/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 …]
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/arch/ia64/include/asm/ |
D | uncached.h | 8 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/ |
D | uncached.c | 179 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/ |
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()
|
/kernel/linux/linux-5.10/arch/riscv/mm/ |
D | kasan_init.c | 58 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/ |
D | arcregs.h | 154 #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/ |
D | scatterlist.c | 429 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/ |
D | fscache-cache.h | 151 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()
|
D | scatterlist.h | 295 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/ |
D | tracing_map.c | 294 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/ |
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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/kernel/ |
D | relay.c | 71 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/ |
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()
|
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-5.10/fs/fscache/ |
D | page.c | 276 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()
|