/openbmc/linux/drivers/pci/ |
H A D | mmap.c | 30 if (vma->vm_pgoff + vma_pages(vma) > size) in pci_mmap_resource_range() 43 vma->vm_pgoff += (pci_resource_start(pdev, bar) >> PAGE_SHIFT); in pci_mmap_resource_range() 47 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in pci_mmap_resource_range()
|
/openbmc/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()
|
/openbmc/linux/arch/alpha/kernel/ |
H A D | pci-sysfs.c | 29 vma->vm_pgoff += base >> PAGE_SHIFT; in hose_mmap_page_range() 31 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in hose_mmap_page_range() 43 start = vma->vm_pgoff; in __pci_mmap_fits() 89 vma->vm_pgoff += bar.start >> (PAGE_SHIFT - (sparse ? 5 : 0)); in pci_mmap_resource() 263 start = vma->vm_pgoff; in __legacy_mmap_fits()
|
/openbmc/linux/mm/ |
H A D | mmap.c | 664 vma->vm_pgoff = pgoff; in vma_expand() 709 vma->vm_pgoff = pgoff; in vma_shrink() 774 pgoff_t vm_pgoff, struct vm_userfaultfd_ctx vm_userfaultfd_ctx, in can_vma_merge_before() argument 779 if (vma->vm_pgoff == vm_pgoff) in can_vma_merge_before() 797 pgoff_t vm_pgoff, struct vm_userfaultfd_ctx vm_userfaultfd_ctx, in can_vma_merge_after() argument 804 if (vma->vm_pgoff + vm_pglen == vm_pgoff) in can_vma_merge_after() 902 vma_pgoff = prev->vm_pgoff; in vma_merge() 984 vma_pgoff = next->vm_pgoff - pglen; in vma_merge() 986 vma_pgoff = curr->vm_pgoff; in vma_merge() 1020 vma->vm_pgoff = vma_pgoff; in vma_merge() [all …]
|
H A D | nommu.c | 979 fpos = vma->vm_pgoff; in do_mmap_private() 1059 region->vm_pgoff = pgoff; in do_mmap() 1062 vma->vm_pgoff = pgoff; in do_mmap() 1097 if (pregion->vm_pgoff >= pgend) in do_mmap() 1102 rpgend = pregion->vm_pgoff + rpglen; in do_mmap() 1108 if ((pregion->vm_pgoff != pgoff || rpglen != pglen) && in do_mmap() 1109 !(pgoff >= pregion->vm_pgoff && pgend <= rpgend)) { in do_mmap() 1120 start += (pgoff - pregion->vm_pgoff) << PAGE_SHIFT; in do_mmap() 1342 region->vm_pgoff = new->vm_pgoff += npages; in split_vma() 1359 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()
|
/openbmc/linux/drivers/vfio/cdx/ |
H A D | main.c | 126 pgoff = vma->vm_pgoff & in vfio_cdx_mmap_mmio() 133 vma->vm_pgoff = (region.addr >> PAGE_SHIFT) + pgoff; in vfio_cdx_mmap_mmio() 136 return io_remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in vfio_cdx_mmap_mmio() 148 index = vma->vm_pgoff >> (VFIO_CDX_OFFSET_SHIFT - PAGE_SHIFT); in vfio_cdx_mmap()
|
/openbmc/linux/drivers/char/ |
H A D | mem.c | 359 phys_addr_t offset = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; in mmap_mem() 362 if (offset >> PAGE_SHIFT != vma->vm_pgoff) in mmap_mem() 369 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) in mmap_mem() 375 if (!range_is_allowed(vma->vm_pgoff, size)) in mmap_mem() 378 if (!phys_mem_access_prot_allowed(file, vma->vm_pgoff, size, in mmap_mem() 382 vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, in mmap_mem() 391 vma->vm_pgoff, in mmap_mem()
|
/openbmc/linux/drivers/gpu/drm/vmwgfx/ |
H A D | vmwgfx_ttm_glue.c | 85 if (unlikely(vma->vm_pgoff < DRM_FILE_PAGE_OFFSET_START)) in vmw_mmap() 88 ret = vmw_bo_vm_lookup(bdev, file_priv, vma->vm_pgoff, vma_pages(vma), &bo); in vmw_mmap()
|
/openbmc/linux/arch/powerpc/platforms/powernv/ |
H A D | opal-prd.c | 117 vma->vm_start, vma->vm_end, vma->vm_pgoff, in opal_prd_mmap() 120 addr = vma->vm_pgoff << PAGE_SHIFT; in opal_prd_mmap() 127 page_prot = phys_mem_access_prot(file, vma->vm_pgoff, in opal_prd_mmap() 130 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()
|
/openbmc/linux/kernel/dma/ |
H A D | ops_helpers.c | 41 unsigned long off = vma->vm_pgoff; in dma_common_mmap() 54 page_to_pfn(page) + vma->vm_pgoff, in dma_common_mmap()
|
/openbmc/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;
|
/openbmc/linux/drivers/gpu/drm/ |
H A D | drm_vm.c | 128 if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) in drm_vm_fault() 470 vma->vm_start, vma->vm_end, vma->vm_pgoff); in drm_mmap_dma() 532 vma->vm_start, vma->vm_end, vma->vm_pgoff); in drm_mmap_locked() 541 if (!vma->vm_pgoff in drm_mmap_locked() 549 if (drm_ht_find_item(&dev->map_hash, vma->vm_pgoff, &hash)) { in drm_mmap_locked()
|
/openbmc/linux/arch/ia64/pci/ |
H A D | pci.c | 454 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) in pci_mmap_legacy_page_range() 456 prot = phys_mem_access_prot(NULL, vma->vm_pgoff, size, in pci_mmap_legacy_page_range() 463 vma->vm_pgoff += (unsigned long)addr >> PAGE_SHIFT; in pci_mmap_legacy_page_range() 466 if (remap_pfn_range(vma, vma->vm_start, vma->vm_pgoff, in pci_mmap_legacy_page_range()
|
/openbmc/linux/drivers/misc/uacce/ |
H A D | uacce.c | 204 if (vma->vm_pgoff < UACCE_MAX_REGION) { in uacce_vma_close() 205 struct uacce_qfile_region *qfr = q->qfrs[vma->vm_pgoff]; in uacce_vma_close() 208 q->qfrs[vma->vm_pgoff] = NULL; in uacce_vma_close() 226 if (vma->vm_pgoff < UACCE_MAX_REGION) in uacce_fops_mmap() 227 type = vma->vm_pgoff; in uacce_fops_mmap()
|
/openbmc/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()
|
/openbmc/linux/arch/arm/mm/ |
H A D | fault-armv.c | 144 pgoff = vma->vm_pgoff + ((addr - vma->vm_start) >> PAGE_SHIFT); in make_coherent() 162 offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; in make_coherent()
|
/openbmc/linux/drivers/gpu/drm/ttm/ |
H A D | ttm_bo_vm.c | 211 vma->vm_pgoff - drm_vma_node_start(&bo->base.vma_node); in ttm_bo_vm_fault_reserved() 212 page_last = vma_pages(vma) + vma->vm_pgoff - in ttm_bo_vm_fault_reserved() 413 ((vma->vm_pgoff - drm_vma_node_start(&bo->base.vma_node)) in ttm_bo_vm_access()
|
/openbmc/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()
|
/openbmc/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()
|
/openbmc/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()
|
/openbmc/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()
|
/openbmc/linux/drivers/gpu/drm/tegra/ |
H A D | gem.c | 570 unsigned long vm_pgoff = vma->vm_pgoff; in __tegra_gem_mmap() local 579 vma->vm_pgoff = 0; in __tegra_gem_mmap() 588 vma->vm_pgoff = vm_pgoff; in __tegra_gem_mmap()
|
/openbmc/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()
|