/linux-6.6.21/arch/xtensa/mm/ |
D | mmu.c | 24 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()
|
D | kasan_init.c | 37 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-6.6.21/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()
|
/linux-6.6.21/drivers/xen/ |
D | grant-dma-ops.c | 83 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() 101 if (gnttab_alloc_grant_reference_seq(n_pages, &grant)) { 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() 174 unsigned int i, n_pages = XEN_PFN_UP(dma_offset + size); in xen_grant_dma_map_page() local [all …]
|
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 | 540 long n_pages; in balloon_thread() local 542 n_pages = min(-credit, si_mem_available()); in balloon_thread() 543 balloon_state = decrease_reservation(n_pages, in balloon_thread() 545 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread() 546 n_pages < totalreserve_pages) in balloon_thread()
|
/linux-6.6.21/drivers/comedi/ |
D | comedi_buf.c | 36 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 92 bm->page_list = vzalloc(sizeof(*buf) * n_pages); in comedi_buf_map_alloc() 105 PAGE_SIZE * n_pages, &dma_addr, in comedi_buf_map_alloc() 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() [all …]
|
D | comedi_fops.c | 2331 int n_pages; in comedi_mmap() local 2381 n_pages = vma_pages(vma); in comedi_mmap() 2385 if (!bm || n_pages > bm->n_pages) { in comedi_mmap() 2396 buf->dma_addr, n_pages * PAGE_SIZE); in comedi_mmap() 2398 for (i = 0; i < n_pages; ++i) { in comedi_mmap()
|
/linux-6.6.21/drivers/misc/ |
D | vmw_balloon.c | 244 unsigned int n_pages; member 699 ctl->n_pages = i; in vmballoon_alloc_page_list() 701 return req_n_pages == ctl->n_pages ? 0 : -ENOMEM; in vmballoon_alloc_page_list() 859 num_pages = ctl->n_pages; in vmballoon_lock() 870 batch_status = vmballoon_lock_op(b, ctl->n_pages, ctl->page_size, 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 [all …]
|
/linux-6.6.21/drivers/gpu/drm/i915/gt/ |
D | shmem_utils.c | 60 size_t n_pages, i; in shmem_pin_map() local 63 n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT; in shmem_pin_map() 64 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in shmem_pin_map() 68 for (i = 0; i < n_pages; i++) { in shmem_pin_map() 75 vaddr = vmap(pages, n_pages, VM_MAP_PUT_PAGES, PAGE_KERNEL); in shmem_pin_map()
|
/linux-6.6.21/drivers/media/common/videobuf2/ |
D | videobuf2-vmalloc.c | 78 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 | 568 int n_pages, i; in vb2_dc_get_userptr() local 604 n_pages = frame_vector_count(vec); in vb2_dc_get_userptr() 613 for (i = 1; i < n_pages; i++) in vb2_dc_get_userptr() 632 ret = sg_alloc_table_from_pages(sgt, frame_vector_pages(vec), n_pages, in vb2_dc_get_userptr()
|
/linux-6.6.21/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);
|
/linux-6.6.21/arch/ia64/kernel/ |
D | uncached.c | 177 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.6.21/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
|
/linux-6.6.21/include/linux/ |
D | scatterlist.h | 442 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-6.6.21/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()
|
D | tracing_map.h | 169 unsigned int n_pages; member
|
/linux-6.6.21/drivers/gpu/drm/i915/ |
D | i915_ttm_buddy_manager.c | 42 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()
|
/linux-6.6.21/lib/ |
D | scatterlist.c | 455 struct page **pages, unsigned int n_pages, unsigned int offset, in sg_alloc_append_table_from_pages() argument 486 while (n_pages && pages_are_mergeable(pages[0], last_pg)) { in sg_alloc_append_table_from_pages() 492 n_pages--; in sg_alloc_append_table_from_pages() 494 if (!n_pages) in sg_alloc_append_table_from_pages() 502 for (i = 1; i < n_pages; i++) { in sg_alloc_append_table_from_pages() 518 for (j = cur_page + 1; j < n_pages; j++) { in sg_alloc_append_table_from_pages() 579 unsigned int n_pages, unsigned int offset, in sg_alloc_table_from_pages_segment() argument 586 err = sg_alloc_append_table_from_pages(&append, pages, n_pages, offset, in sg_alloc_table_from_pages_segment()
|
/linux-6.6.21/kernel/ |
D | relay.c | 61 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.6.21/drivers/gpu/drm/i915/gem/ |
D | i915_gem_pages.c | 273 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_map_page() local 301 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page() 310 if (n_pages > ARRAY_SIZE(stack)) { in i915_gem_object_map_page() 312 pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL); in i915_gem_object_map_page() 320 vaddr = vmap(pages, n_pages, 0, pgprot); in i915_gem_object_map_page()
|
/linux-6.6.21/kernel/module/ |
D | decompress.c | 296 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-6.6.21/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()
|
/linux-6.6.21/drivers/net/ethernet/sfc/siena/ |
D | mcdi_mon.c | 309 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()
|