Lines Matching refs:vma
80 static int hugetlbfs_file_mmap(struct file *file, struct vm_area_struct *vma) in hugetlbfs_file_mmap() argument
95 vma->vm_flags |= VM_HUGETLB | VM_RESERVED; in hugetlbfs_file_mmap()
96 vma->vm_ops = &hugetlb_vm_ops; in hugetlbfs_file_mmap()
98 if (vma->vm_pgoff & ~(huge_page_mask(h) >> PAGE_SHIFT)) in hugetlbfs_file_mmap()
101 vma_len = (loff_t)(vma->vm_end - vma->vm_start); in hugetlbfs_file_mmap()
107 len = vma_len + ((loff_t)vma->vm_pgoff << PAGE_SHIFT); in hugetlbfs_file_mmap()
110 vma->vm_pgoff >> huge_page_order(h), in hugetlbfs_file_mmap()
111 len >> huge_page_shift(h), vma, in hugetlbfs_file_mmap()
112 vma->vm_flags)) in hugetlbfs_file_mmap()
116 hugetlb_prefault_arch_hook(vma->vm_mm); in hugetlbfs_file_mmap()
117 if (vma->vm_flags & VM_WRITE && inode->i_size < len) in hugetlbfs_file_mmap()
135 struct vm_area_struct *vma; in hugetlb_get_unmapped_area() local
152 vma = find_vma(mm, addr); in hugetlb_get_unmapped_area()
154 (!vma || addr + len <= vma->vm_start)) in hugetlb_get_unmapped_area()
166 for (vma = find_vma(mm, addr); ; vma = vma->vm_next) { in hugetlb_get_unmapped_area()
180 if (!vma || addr + len <= vma->vm_start) in hugetlb_get_unmapped_area()
182 addr = ALIGN(vma->vm_end, huge_page_size(h)); in hugetlb_get_unmapped_area()
437 struct vm_area_struct *vma; in hugetlb_vmtruncate_list() local
440 vma_prio_tree_foreach(vma, &iter, root, pgoff, ULONG_MAX) { in hugetlb_vmtruncate_list()
449 if (vma->vm_pgoff < pgoff) in hugetlb_vmtruncate_list()
450 v_offset = (pgoff - vma->vm_pgoff) << PAGE_SHIFT; in hugetlb_vmtruncate_list()
454 __unmap_hugepage_range(vma, in hugetlb_vmtruncate_list()
455 vma->vm_start + v_offset, vma->vm_end, NULL); in hugetlb_vmtruncate_list()