| /linux/arch/xtensa/mm/ |
| H A 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()
|
| H A 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_or_panic(n_pages * sizeof(pte_t), PAGE_SIZE); in populate()
|
| /linux/drivers/misc/ |
| H A D | vmw_balloon.c | 244 unsigned int n_pages; member 695 ctl->n_pages = i; in vmballoon_alloc_page_list() 697 return req_n_pages == ctl->n_pages ? 0 : -ENOMEM; in vmballoon_alloc_page_list() 855 num_pages = ctl->n_pages; in vmballoon_lock() 866 batch_status = vmballoon_lock_op(b, ctl->n_pages, ctl->page_size, in vmballoon_lock() 896 ctl->n_pages--; in vmballoon_lock() 915 int *n_pages, in vmballoon_release_page_list() argument 925 if (n_pages) in vmballoon_release_page_list() 926 *n_pages = 0; in vmballoon_release_page_list() 992 unsigned int *n_pages, in vmballoon_enqueue_page_list() argument [all …]
|
| /linux/drivers/comedi/ |
| H A D | comedi_buf.c | 30 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release() 37 for (i = 0; i < bm->n_pages; i++) { in comedi_buf_map_kref_release() 67 unsigned int n_pages) in comedi_buf_map_alloc() argument 84 bm->page_list = vzalloc(sizeof(*buf) * n_pages); in comedi_buf_map_alloc() 89 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc() 98 for (i = 0; i < n_pages; i++) { in comedi_buf_map_alloc() 107 bm->n_pages = i; in comedi_buf_map_alloc() 108 if (i < n_pages) in comedi_buf_map_alloc() 120 unsigned int n_pages) in __comedi_buf_alloc() argument 132 bm = comedi_buf_map_alloc(dev, s->async_dma_dir, n_pages); in __comedi_buf_alloc() [all …]
|
| H A D | comedi_fops.c | 2490 int n_pages; in comedi_mmap() local 2540 n_pages = vma_pages(vma); in comedi_mmap() 2544 if (!bm || n_pages > bm->n_pages) { in comedi_mmap() 2556 for (i = 0; i < n_pages; ++i) { in comedi_mmap() 2571 for (i = 0; i < n_pages; ++i) { in comedi_mmap() 2671 if (page == bm->n_pages) in comedi_buf_copy_to_user() 2699 if (page == bm->n_pages) in comedi_buf_copy_from_user()
|
| /linux/drivers/xen/ |
| H A D | privcmd-buf.c | 34 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 D | balloon.c | 548 long n_pages; in balloon_thread() local 550 n_pages = min(-credit, si_mem_available()); in balloon_thread() 551 balloon_state = decrease_reservation(n_pages, in balloon_thread() 553 if (balloon_state == BP_DONE && n_pages != -credit && in balloon_thread() 554 n_pages < totalreserve_pages) in balloon_thread()
|
| /linux/drivers/media/common/videobuf2/ |
| H A 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() 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 D | videobuf2-dma-contig.c | 570 int n_pages, i; in vb2_dc_get_userptr() local 606 n_pages = frame_vector_count(vec); in vb2_dc_get_userptr() 615 for (i = 1; i < n_pages; i++) in vb2_dc_get_userptr() 634 ret = sg_alloc_table_from_pages(sgt, frame_vector_pages(vec), n_pages, in vb2_dc_get_userptr()
|
| /linux/drivers/gpu/drm/i915/gt/ |
| H A D | shmem_utils.c | 62 size_t n_pages, i; in shmem_pin_map() local 65 n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT; in shmem_pin_map() 66 pages = kvmalloc_objs(*pages, n_pages); in shmem_pin_map() 70 for (i = 0; i < n_pages; i++) { in shmem_pin_map() 77 vaddr = vmap(pages, n_pages, VM_MAP_PUT_PAGES, PAGE_KERNEL); in shmem_pin_map()
|
| /linux/drivers/usb/host/ |
| H A D | xhci-sideband.c | 22 unsigned int n_pages; in xhci_ring_to_sgtable() local 30 n_pages = PAGE_ALIGN(sz) >> PAGE_SHIFT; in xhci_ring_to_sgtable() 31 pages = kvmalloc_objs(struct page *, n_pages); in xhci_ring_to_sgtable() 58 if (sg_alloc_table_from_pages(sgt, pages, n_pages, 0, sz, GFP_KERNEL)) in xhci_ring_to_sgtable()
|
| /linux/kernel/ |
| H A D | relay.c | 60 static struct page **relay_alloc_page_array(unsigned int n_pages) in relay_alloc_page_array() argument 62 return kvzalloc_objs(struct page *, n_pages); 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() 130 buf->page_count = n_pages; in relay_alloc_buf()
|
| /linux/kernel/trace/ |
| H A 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()
|
| H A D | tracing_map.h | 169 unsigned int n_pages; member
|
| /linux/drivers/gpu/drm/i915/gem/ |
| H A D | i915_gem_pages.c | 278 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_map_page() local 306 if (n_pages == 1 && !PageHighMem(sg_page(obj->mm.pages->sgl))) in i915_gem_object_map_page() 315 if (n_pages > ARRAY_SIZE(stack)) { in i915_gem_object_map_page() 317 pages = kvmalloc_objs(*pages, n_pages); in i915_gem_object_map_page() 325 vaddr = vmap(pages, n_pages, 0, pgprot); in i915_gem_object_map_page() 379 unsigned long n_pages = obj->base.size >> PAGE_SHIFT, i; in i915_gem_object_panic_pages() local 385 pages = kmalloc_objs(*pages, n_pages, GFP_ATOMIC); in i915_gem_object_panic_pages()
|
| /linux/drivers/media/pci/intel/ipu6/ |
| H A D | ipu6-buttress.c | 546 unsigned long n_pages; in ipu6_buttress_map_fw_image() local 553 n_pages = PFN_UP(fw->size); in ipu6_buttress_map_fw_image() 555 pages = kmalloc_objs(*pages, n_pages); in ipu6_buttress_map_fw_image() 560 for (i = 0; i < n_pages; i++) { in ipu6_buttress_map_fw_image() 572 ret = sg_alloc_table_from_pages(sgt, pages, n_pages, 0, fw->size, in ipu6_buttress_map_fw_image()
|
| H A D | ipu6-mmu.c | 416 unsigned int n_pages = PFN_UP(IPU6_MMUV2_TRASH_RANGE); in allocate_trash_buffer() local 424 iova = alloc_iova(&mmu->dmap->iovad, n_pages, in allocate_trash_buffer() 446 for (i = 0; i < n_pages; i++) { in allocate_trash_buffer()
|
| /linux/drivers/net/ethernet/sfc/ |
| H A 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() 377 if (page == n_pages) in efx_mcdi_mon_probe()
|
| /linux/drivers/net/ethernet/sfc/siena/ |
| H A 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() 377 if (page == n_pages) in efx_siena_mcdi_mon_probe()
|
| /linux/drivers/staging/media/ipu7/ |
| H A D | ipu7.c | 2267 unsigned long n_pages, i; in ipu7_map_fw_code_region() local 2272 n_pages = PFN_UP(size); in ipu7_map_fw_code_region() 2274 pages = kmalloc_objs(*pages, n_pages); in ipu7_map_fw_code_region() 2278 for (i = 0; i < n_pages; i++) { in ipu7_map_fw_code_region() 2290 ret = sg_alloc_table_from_pages(sgt, pages, n_pages, 0, size, in ipu7_map_fw_code_region() 2303 n_pages, sgt->nents); in ipu7_map_fw_code_region()
|
| H A D | ipu7-mmu.c | 399 unsigned int n_pages = PFN_UP(IPU_MMUV2_TRASH_RANGE); in allocate_trash_buffer() local 407 iova = alloc_iova(&mmu->dmap->iovad, n_pages, in allocate_trash_buffer() 429 for (i = 0; i < n_pages; i++) { in allocate_trash_buffer()
|
| /linux/include/linux/comedi/ |
| H A D | comedidev.h | 248 unsigned int n_pages; member
|
| /linux/drivers/net/ethernet/mediatek/ |
| H A D | mtk_wed.c | 644 int i, page_idx = 0, n_pages, ring_size; in mtk_wed_tx_buffer_alloc() local 657 n_pages = dev->tx_buf_ring.size / MTK_WED_BUF_PER_PAGE; in mtk_wed_tx_buffer_alloc() 659 page_list = kzalloc_objs(*page_list, n_pages); in mtk_wed_tx_buffer_alloc() 774 int n_pages = MTK_WED_RX_PG_BM_CNT / MTK_WED_RX_BUF_PER_PAGE; in mtk_wed_hwrro_buffer_alloc() local 783 page_list = kzalloc_objs(*page_list, n_pages); in mtk_wed_hwrro_buffer_alloc()
|
| /linux/drivers/usb/gadget/function/ |
| H A D | f_fs.c | 809 unsigned int n_pages; in ffs_build_sg_list() local 816 n_pages = PAGE_ALIGN(sz) >> PAGE_SHIFT; in ffs_build_sg_list() 817 pages = kvmalloc_objs(struct page *, n_pages); in ffs_build_sg_list() 823 for (i = 0, ptr = vaddr; i < n_pages; ++i, ptr += PAGE_SIZE) in ffs_build_sg_list() 826 if (sg_alloc_table_from_pages(sgt, pages, n_pages, 0, sz, GFP_KERNEL)) { in ffs_build_sg_list()
|