Lines Matching refs:vma
17 static int check_vma(struct dev_dax *dev_dax, struct vm_area_struct *vma, in check_vma() argument
27 if ((vma->vm_flags & VM_MAYSHARE) != VM_MAYSHARE) { in check_vma()
35 if (vma->vm_start & mask || vma->vm_end & mask) { in check_vma()
38 current->comm, func, vma->vm_start, vma->vm_end, in check_vma()
43 if (!vma_is_dax(vma)) { in check_vma()
80 struct file *filp = vmf->vma->vm_file; in dax_set_mapping()
88 pgoff = linear_page_index(vmf->vma, in dax_set_mapping()
111 if (check_vma(dev_dax, vmf->vma, __func__)) in __dev_dax_pte_fault()
133 return vmf_insert_mixed(vmf->vma, vmf->address, pfn); in __dev_dax_pte_fault()
146 if (check_vma(dev_dax, vmf->vma, __func__)) in __dev_dax_pmd_fault()
161 if (pmd_addr < vmf->vma->vm_start || in __dev_dax_pmd_fault()
162 (pmd_addr + PMD_SIZE) > vmf->vma->vm_end) in __dev_dax_pmd_fault()
165 pgoff = linear_page_index(vmf->vma, pmd_addr); in __dev_dax_pmd_fault()
191 if (check_vma(dev_dax, vmf->vma, __func__)) in __dev_dax_pud_fault()
206 if (pud_addr < vmf->vma->vm_start || in __dev_dax_pud_fault()
207 (pud_addr + PUD_SIZE) > vmf->vma->vm_end) in __dev_dax_pud_fault()
210 pgoff = linear_page_index(vmf->vma, pud_addr); in __dev_dax_pud_fault()
233 struct file *filp = vmf->vma->vm_file; in dev_dax_huge_fault()
240 vmf->vma->vm_start, vmf->vma->vm_end, order); in dev_dax_huge_fault()
262 static int dev_dax_may_split(struct vm_area_struct *vma, unsigned long addr) in dev_dax_may_split() argument
264 struct file *filp = vma->vm_file; in dev_dax_may_split()
272 static unsigned long dev_dax_pagesize(struct vm_area_struct *vma) in dev_dax_pagesize() argument
274 struct file *filp = vma->vm_file; in dev_dax_pagesize()
287 static int dax_mmap(struct file *filp, struct vm_area_struct *vma) in dax_mmap() argument
299 rc = check_vma(dev_dax, vma, __func__); in dax_mmap()
304 vma->vm_ops = &dax_vm_ops; in dax_mmap()
305 vm_flags_set(vma, VM_HUGEPAGE); in dax_mmap()