| /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/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/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/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()
|
| /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/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/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/lib/ |
| H A D | scatterlist.c | 458 struct page **pages, unsigned int n_pages, unsigned int offset, in sg_alloc_append_table_from_pages() argument 489 while (n_pages && pages_are_mergeable(pages[0], last_pg)) { in sg_alloc_append_table_from_pages() 495 n_pages--; in sg_alloc_append_table_from_pages() 497 if (!n_pages) in sg_alloc_append_table_from_pages() 505 for (i = 1; i < n_pages; i++) { in sg_alloc_append_table_from_pages() 521 for (j = cur_page + 1; j < n_pages; j++) { in sg_alloc_append_table_from_pages() 582 unsigned int n_pages, unsigned int offset, in sg_alloc_table_from_pages_segment() argument 589 err = sg_alloc_append_table_from_pages(&append, pages, n_pages, offset, in sg_alloc_table_from_pages_segment()
|
| /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-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/drivers/ata/ |
| H A D | libata-scsi.c | 3636 unsigned int n_pages; in ata_scsi_write_same_xlat() local 3687 n_pages = DIV_ROUND_UP(DIV_ROUND_UP(n_block, U16_MAX), in ata_scsi_write_same_xlat() 3689 n_pages = clamp(n_pages, 1U, max_pages); in ata_scsi_write_same_xlat() 3690 size = (size_t)n_pages * ATA_SECT_SIZE; in ata_scsi_write_same_xlat() 3705 tf->hob_feature = n_pages >> 8; in ata_scsi_write_same_xlat() 3706 tf->feature = n_pages; in ata_scsi_write_same_xlat() 3713 tf->hob_nsect = n_pages >> 8; in ata_scsi_write_same_xlat() 3714 tf->nsect = n_pages; in ata_scsi_write_same_xlat()
|
| /linux/include/linux/comedi/ |
| H A D | comedidev.h | 248 unsigned int n_pages; member
|
| /linux/drivers/md/ |
| H A D | dm-integrity.c | 4320 static struct page_list *dm_integrity_alloc_page_list(unsigned int n_pages) in dm_integrity_alloc_page_list() argument 4325 pl = kvmalloc_objs(struct page_list, n_pages + 1, in dm_integrity_alloc_page_list() 4330 for (i = 0; i < n_pages; i++) { in dm_integrity_alloc_page_list() 4369 unsigned int n_pages; in dm_integrity_alloc_journal_scatterlist() local 4376 n_pages = (end_index - start_index + 1); in dm_integrity_alloc_journal_scatterlist() 4378 s = kvmalloc_objs(struct scatterlist, n_pages); in dm_integrity_alloc_journal_scatterlist() 4384 sg_init_table(s, n_pages); in dm_integrity_alloc_journal_scatterlist()
|