• Home
  • Raw
  • Download

Lines Matching refs:vma

332 static inline int private_mapping_ok(struct vm_area_struct *vma)  in private_mapping_ok()  argument
334 return vma->vm_flags & VM_MAYSHARE; in private_mapping_ok()
338 static inline int private_mapping_ok(struct vm_area_struct *vma) in private_mapping_ok() argument
350 static int mmap_mem(struct file *file, struct vm_area_struct *vma) in mmap_mem() argument
352 size_t size = vma->vm_end - vma->vm_start; in mmap_mem()
353 phys_addr_t offset = (phys_addr_t)vma->vm_pgoff << PAGE_SHIFT; in mmap_mem()
359 if (!valid_mmap_phys_addr_range(vma->vm_pgoff, size)) in mmap_mem()
362 if (!private_mapping_ok(vma)) in mmap_mem()
365 if (!range_is_allowed(vma->vm_pgoff, size)) in mmap_mem()
368 if (!phys_mem_access_prot_allowed(file, vma->vm_pgoff, size, in mmap_mem()
369 &vma->vm_page_prot)) in mmap_mem()
372 vma->vm_page_prot = phys_mem_access_prot(file, vma->vm_pgoff, in mmap_mem()
374 vma->vm_page_prot); in mmap_mem()
376 vma->vm_ops = &mmap_mem_ops; in mmap_mem()
379 if (remap_pfn_range(vma, in mmap_mem()
380 vma->vm_start, in mmap_mem()
381 vma->vm_pgoff, in mmap_mem()
383 vma->vm_page_prot)) { in mmap_mem()
389 static int mmap_kmem(struct file *file, struct vm_area_struct *vma) in mmap_kmem() argument
394 pfn = __pa((u64)vma->vm_pgoff << PAGE_SHIFT) >> PAGE_SHIFT; in mmap_kmem()
406 vma->vm_pgoff = pfn; in mmap_kmem()
407 return mmap_mem(file, vma); in mmap_kmem()
698 static int mmap_zero(struct file *file, struct vm_area_struct *vma) in mmap_zero() argument
703 if (vma->vm_flags & VM_SHARED) in mmap_zero()
704 return shmem_zero_setup(vma); in mmap_zero()