/linux/tools/testing/vma/ |
H A D | vma.c | 64 ret->vm_pgoff = pgoff; in alloc_vma() 253 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_merge() 284 ASSERT_EQ(vma->vm_pgoff, 1); in test_simple_modify() 296 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_modify() 305 ASSERT_EQ(vma->vm_pgoff, 1); in test_simple_modify() 314 ASSERT_EQ(vma->vm_pgoff, 2); in test_simple_modify() 342 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_expand() 363 ASSERT_EQ(vma->vm_pgoff, 0); in test_simple_shrink() 446 ASSERT_EQ(vma->vm_pgoff, 0); in test_merge_new() 463 ASSERT_EQ(vma->vm_pgoff, in test_merge_new() [all...] |
/linux/drivers/pci/ |
H A D | mmap.c | 32 if (vma->vm_pgoff + vma_pages(vma) > size) in pci_mmap_resource_range() 45 vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT); in pci_mmap_resource_range() 49 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in pci_mmap_resource_range() 68 start = vma->vm_pgoff; in pci_mmap_fits()
|
/linux/drivers/sbus/char/ |
H A D | flash.c | 62 if ((vma->vm_pgoff << PAGE_SHIFT) > size) in flash_mmap() 64 addr = vma->vm_pgoff + (addr >> PAGE_SHIFT); in flash_mmap() 66 if (vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)) > size) in flash_mmap() 67 size = vma->vm_end - (vma->vm_start + (vma->vm_pgoff << PAGE_SHIFT)); in flash_mmap()
|
/linux/drivers/infiniband/hw/cxgb4/ |
H A D | provider.c | 131 u32 key = vma->vm_pgoff << PAGE_SHIFT; in c4iw_mmap() 140 unsigned long vm_pgoff; in c4iw_mmap() local 143 pr_debug("pgoff 0x%lx key 0x%x len %d\n", vma->vm_pgoff, in c4iw_mmap() 179 vm_pgoff = vma->vm_pgoff; in c4iw_mmap() 180 vma->vm_pgoff = 0; in c4iw_mmap() 183 vma->vm_pgoff = vm_pgoff; in c4iw_mmap()
|
/linux/mm/ |
H A D | nommu.c | 968 fpos = vma->vm_pgoff; in do_mmap_private() 1048 region->vm_pgoff = pgoff; in do_mmap() 1051 vma->vm_pgoff = pgoff; in do_mmap() 1086 if (pregion->vm_pgoff >= pgend) in do_mmap() 1091 rpgend = pregion->vm_pgoff + rpglen; in do_mmap() 1097 if ((pregion->vm_pgoff != pgoff || rpglen != pglen) && in do_mmap() 1098 !(pgoff >= pregion->vm_pgoff && pgend <= rpgend)) { in do_mmap() 1109 start += (pgoff - pregion->vm_pgoff) << PAGE_SHIFT; in do_mmap() 1331 region->vm_pgoff = new->vm_pgoff += npages; in split_vma() 1348 vma->vm_region->vm_pgoff = vma->vm_pgoff += npages; in split_vma() [all …]
|
H A D | interval_tree.c | 15 return v->vm_pgoff; in vma_start_pgoff() 20 return v->vm_pgoff + vma_pages(v) - 1; in vma_last_pgoff()
|
H A D | vma.c | 154 if (vmg->next->vm_pgoff == vmg->pgoff + pglen) in can_vma_merge_before() 174 if (vmg->prev->vm_pgoff + vma_pages(vmg->prev) == vmg->pgoff) in can_vma_merge_after() 442 new->vm_pgoff += ((addr - vma->vm_start) >> PAGE_SHIFT); in __split_vma() 474 vma->vm_pgoff += (addr - new->vm_start) >> PAGE_SHIFT; in __split_vma() 667 adjust->vm_pgoff += PHYS_PFN(adj_start); in commit_merge() 822 vmg->pgoff = prev->vm_pgoff; in vma_merge_existing_range() 841 vmg->pgoff = prev->vm_pgoff; in vma_merge_existing_range() 867 vmg->pgoff = next->vm_pgoff - pglen; in vma_merge_existing_range() 878 vmg->pgoff = vma->vm_pgoff; in vma_merge_existing_range() 997 vmg->pgoff = prev->vm_pgoff; in vma_merge_new_range() [all …]
|
H A D | internal.h | 891 if (!in_range(pgoff, vma->vm_pgoff, vma_pglen)) in folio_within_range() 894 addr = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); in folio_within_range() 968 if (pgoff >= vma->vm_pgoff) { in vma_address() 970 ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); in vma_address() 974 } else if (pgoff + nr_pages - 1 >= vma->vm_pgoff) { in vma_address() 998 address = vma->vm_start + ((pgoff - vma->vm_pgoff) << PAGE_SHIFT); in vma_address_end() 1405 vma->vm_pgoff = pgoff; in vma_set_range()
|
/linux/drivers/char/ |
H A D | mem.c | 346 phys_addr_t offset = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; in mmap_mem() 349 if (offset >> PAGE_SHIFT != vma->vm_pgoff) in mmap_mem() 356 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) in mmap_mem() 362 if (!range_is_allowed(vma->vm_pgoff, size)) in mmap_mem() 365 if (!phys_mem_access_prot_allowed(file, vma->vm_pgoff, size, in mmap_mem() 369 vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, in mmap_mem() 378 vma->vm_pgoff, in mmap_mem()
|
/linux/arch/powerpc/platforms/powernv/ |
H A D | opal-prd.c | 119 vma->vm_start, vma->vm_end, vma->vm_pgoff, in opal_prd_mmap() 122 addr = vma->vm_pgoff << PAGE_SHIFT; in opal_prd_mmap() 129 page_prot = phys_mem_access_prot(file, vma->vm_pgoff, in opal_prd_mmap() 132 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, size, in opal_prd_mmap()
|
H A D | memtrace.c | 55 if (vma->vm_pgoff << PAGE_SHIFT >= ent->size) in memtrace_mmap() 59 return remap_pfn_range(vma, vma->vm_start, PHYS_PFN(ent->start) + vma->vm_pgoff, in memtrace_mmap()
|
/linux/drivers/vfio/cdx/ |
H A D | main.c | 241 pgoff = vma->vm_pgoff & in vfio_cdx_mmap_mmio() 248 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff; in vfio_cdx_mmap_mmio() 251 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in vfio_cdx_mmap_mmio() 263 index = vma->vm_pgoff >> (VFIO_CDX_OFFSET_SHIFT - PAGE_SHIFT); in vfio_cdx_mmap()
|
/linux/kernel/dma/ |
H A D | ops_helpers.c | 42 unsigned long off = vma->vm_pgoff; in dma_common_mmap() 55 page_to_pfn(page) + vma->vm_pgoff, in dma_common_mmap()
|
/linux/drivers/accel/habanalabs/common/ |
H A D | memory_mgr.c | 241 handle = vma->vm_pgoff << PAGE_SHIFT; 242 vma->vm_pgoff = 0; 297 vma->vm_pgoff = handle >> PAGE_SHIFT;
|
/linux/drivers/misc/uacce/ |
H A D | uacce.c | 207 if (vma->vm_pgoff < UACCE_MAX_REGION) { in uacce_vma_close() 208 struct uacce_qfile_region *qfr = q->qfrs[vma->vm_pgoff]; in uacce_vma_close() 211 q->qfrs[vma->vm_pgoff] = NULL; in uacce_vma_close() 229 if (vma->vm_pgoff < UACCE_MAX_REGION) in uacce_fops_mmap() 230 type = vma->vm_pgoff; in uacce_fops_mmap()
|
/linux/drivers/misc/ocxl/ |
H A D | context.c | 164 int irq_id = ocxl_irq_offset_to_id(ctx, vma->vm_pgoff << PAGE_SHIFT); in check_mmap_afu_irq() 190 if ((vma_pages(vma) + vma->vm_pgoff) > in check_mmap_mmio() 200 if ((vma->vm_pgoff << PAGE_SHIFT) < ctx->afu->irq_base_offset) in ocxl_context_mmap()
|
/linux/drivers/video/fbdev/core/ |
H A D | fb_io_fops.c | 154 if (vma->vm_pgoff >= mmio_pgoff) { in fb_io_mmap() 158 vma->vm_pgoff -= mmio_pgoff; in fb_io_mmap()
|
/linux/drivers/vfio/fsl-mc/ |
H A D | vfio_fsl_mc.c | 366 pgoff = vma->vm_pgoff & in vfio_fsl_mc_mmap_mmio() 378 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff; in vfio_fsl_mc_mmap_mmio() 380 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in vfio_fsl_mc_mmap_mmio() 392 index = vma->vm_pgoff >> (VFIO_FSL_MC_OFFSET_SHIFT - PAGE_SHIFT); in vfio_fsl_mc_mmap()
|
/linux/drivers/gpu/drm/tegra/ |
H A D | gem.c | 589 unsigned long vm_pgoff = vma->vm_pgoff; in __tegra_gem_mmap() local 598 vma->vm_pgoff = 0; in __tegra_gem_mmap() 607 vma->vm_pgoff = vm_pgoff; in __tegra_gem_mmap()
|
/linux/arch/arc/kernel/ |
H A D | arc_hostlink.c | 22 if (io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in arc_hl_mmap()
|
/linux/tools/testing/selftests/bpf/progs/ |
H A D | bpf_iter_vma_offset.c | 33 offset = address - vma->vm_start + (vma->vm_pgoff << page_shift); in get_vma_offset()
|
/linux/drivers/vfio/platform/ |
H A D | vfio_platform_common.c | 548 pgoff = vma->vm_pgoff & in vfio_platform_mmap_mmio() 556 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff; in vfio_platform_mmap_mmio() 558 return remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in vfio_platform_mmap_mmio() 568 index = vma->vm_pgoff >> (VFIO_PLATFORM_OFFSET_SHIFT - PAGE_SHIFT); in vfio_platform_mmap()
|
/linux/arch/xtensa/kernel/ |
H A D | pci.c | 85 vma->vm_pgoff += (ioaddr + pci_ctrl->io_space.start) >> PAGE_SHIFT; in pci_iobar_pfn()
|
/linux/kernel/bpf/ |
H A D | ringbuf.c | 269 if (vma->vm_pgoff != 0 || vma->vm_end - vma->vm_start != PAGE_SIZE) in ringbuf_map_mmap_kern() 276 vma->vm_pgoff + RINGBUF_PGOFF); in ringbuf_map_mmap_kern() 286 if (vma->vm_pgoff == 0) in ringbuf_map_mmap_user() 296 return remap_vmalloc_range(vma, rb_map->rb, vma->vm_pgoff + RINGBUF_PGOFF); in ringbuf_map_mmap_user()
|
/linux/drivers/xen/xenfs/ |
H A D | xenstored.c | 38 if ((size > PAGE_SIZE) || (vma->vm_pgoff != 0)) in xsd_kva_mmap()
|