Home
last modified time | relevance | path

Searched refs:vmf (Results 1 – 25 of 171) sorted by relevance

1234567

/linux-6.6.21/mm/
Dmemory.c106 static vm_fault_t do_fault(struct vm_fault *vmf);
107 static vm_fault_t do_anonymous_page(struct vm_fault *vmf);
108 static bool vmf_pte_changed(struct vm_fault *vmf);
114 static bool vmf_orig_pte_uffd_wp(struct vm_fault *vmf) in vmf_orig_pte_uffd_wp() argument
116 if (!(vmf->flags & FAULT_FLAG_ORIG_PTE_VALID)) in vmf_orig_pte_uffd_wp()
119 return pte_marker_uffd_wp(vmf->orig_pte); in vmf_orig_pte_uffd_wp()
2784 static inline int pte_unmap_same(struct vm_fault *vmf) in pte_unmap_same() argument
2789 spin_lock(vmf->ptl); in pte_unmap_same()
2790 same = pte_same(ptep_get(vmf->pte), vmf->orig_pte); in pte_unmap_same()
2791 spin_unlock(vmf->ptl); in pte_unmap_same()
[all …]
Dhuge_memory.c646 static vm_fault_t __do_huge_pmd_anonymous_page(struct vm_fault *vmf, in __do_huge_pmd_anonymous_page() argument
649 struct vm_area_struct *vma = vmf->vma; in __do_huge_pmd_anonymous_page()
652 unsigned long haddr = vmf->address & HPAGE_PMD_MASK; in __do_huge_pmd_anonymous_page()
671 clear_huge_page(page, vmf->address, HPAGE_PMD_NR); in __do_huge_pmd_anonymous_page()
679 vmf->ptl = pmd_lock(vma->vm_mm, vmf->pmd); in __do_huge_pmd_anonymous_page()
680 if (unlikely(!pmd_none(*vmf->pmd))) { in __do_huge_pmd_anonymous_page()
691 spin_unlock(vmf->ptl); in __do_huge_pmd_anonymous_page()
694 ret = handle_userfault(vmf, VM_UFFD_MISSING); in __do_huge_pmd_anonymous_page()
703 pgtable_trans_huge_deposit(vma->vm_mm, vmf->pmd, pgtable); in __do_huge_pmd_anonymous_page()
704 set_pmd_at(vma->vm_mm, haddr, vmf->pmd, entry); in __do_huge_pmd_anonymous_page()
[all …]
Dfilemap.c1678 vm_fault_t __folio_lock_or_retry(struct folio *folio, struct vm_fault *vmf) in __folio_lock_or_retry() argument
1680 unsigned int flags = vmf->flags; in __folio_lock_or_retry()
1690 release_fault_lock(vmf); in __folio_lock_or_retry()
1702 release_fault_lock(vmf); in __folio_lock_or_retry()
3108 static int lock_folio_maybe_drop_mmap(struct vm_fault *vmf, struct folio *folio, in lock_folio_maybe_drop_mmap() argument
3119 if (vmf->flags & FAULT_FLAG_RETRY_NOWAIT) in lock_folio_maybe_drop_mmap()
3122 *fpin = maybe_unlock_mmap_for_io(vmf, *fpin); in lock_folio_maybe_drop_mmap()
3123 if (vmf->flags & FAULT_FLAG_KILLABLE) { in lock_folio_maybe_drop_mmap()
3132 mmap_read_unlock(vmf->vma->vm_mm); in lock_folio_maybe_drop_mmap()
3148 static struct file *do_sync_mmap_readahead(struct vm_fault *vmf) in do_sync_mmap_readahead() argument
[all …]
Dsecretmem.c50 static vm_fault_t secretmem_fault(struct vm_fault *vmf) in secretmem_fault() argument
52 struct address_space *mapping = vmf->vma->vm_file->f_mapping; in secretmem_fault()
53 struct inode *inode = file_inode(vmf->vma->vm_file); in secretmem_fault()
54 pgoff_t offset = vmf->pgoff; in secretmem_fault()
55 gfp_t gfp = vmf->gfp_mask; in secretmem_fault()
62 if (((loff_t)vmf->pgoff << PAGE_SHIFT) >= i_size_read(inode)) in secretmem_fault()
105 vmf->page = page; in secretmem_fault()
Dswap_state.c621 struct vm_fault *vmf) in swap_cluster_readahead() argument
632 struct vm_area_struct *vma = vmf->vma; in swap_cluster_readahead()
633 unsigned long addr = vmf->address; in swap_cluster_readahead()
716 static void swap_ra_info(struct vm_fault *vmf, in swap_ra_info() argument
719 struct vm_area_struct *vma = vmf->vma; in swap_ra_info()
732 faddr = vmf->address; in swap_ra_info()
781 struct vm_fault *vmf) in swap_vma_readahead() argument
785 struct vm_area_struct *vma = vmf->vma; in swap_vma_readahead()
796 swap_ra_info(vmf, &ra_info); in swap_vma_readahead()
800 addr = vmf->address - (ra_info.offset * PAGE_SIZE); in swap_vma_readahead()
[all …]
Dswap.h56 struct vm_fault *vmf);
58 struct vm_fault *vmf);
84 gfp_t gfp_mask, struct vm_fault *vmf) in swap_cluster_readahead() argument
90 struct vm_fault *vmf) in swapin_readahead() argument
/linux-6.6.21/include/trace/events/
Dfs_dax.h11 TP_PROTO(struct inode *inode, struct vm_fault *vmf,
13 TP_ARGS(inode, vmf, max_pgoff, result),
29 __entry->vm_start = vmf->vma->vm_start;
30 __entry->vm_end = vmf->vma->vm_end;
31 __entry->vm_flags = vmf->vma->vm_flags;
32 __entry->address = vmf->address;
33 __entry->flags = vmf->flags;
34 __entry->pgoff = vmf->pgoff;
56 TP_PROTO(struct inode *inode, struct vm_fault *vmf, \
58 TP_ARGS(inode, vmf, max_pgoff, result))
[all …]
/linux-6.6.21/drivers/dax/
Ddevice.c76 static void dax_set_mapping(struct vm_fault *vmf, pfn_t pfn, in dax_set_mapping() argument
80 struct file *filp = vmf->vma->vm_file; in dax_set_mapping()
88 pgoff = linear_page_index(vmf->vma, in dax_set_mapping()
89 ALIGN(vmf->address, fault_size)); in dax_set_mapping()
104 struct vm_fault *vmf) in __dev_dax_pte_fault() argument
111 if (check_vma(dev_dax, vmf->vma, __func__)) in __dev_dax_pte_fault()
123 phys = dax_pgoff_to_phys(dev_dax, vmf->pgoff, PAGE_SIZE); in __dev_dax_pte_fault()
125 dev_dbg(dev, "pgoff_to_phys(%#lx) failed\n", vmf->pgoff); in __dev_dax_pte_fault()
131 dax_set_mapping(vmf, pfn, fault_size); in __dev_dax_pte_fault()
133 return vmf_insert_mixed(vmf->vma, vmf->address, pfn); in __dev_dax_pte_fault()
[all …]
/linux-6.6.21/fs/
Ddax.c830 static int copy_cow_page_dax(struct vm_fault *vmf, const struct iomap_iter *iter) in copy_cow_page_dax() argument
844 vto = kmap_atomic(vmf->cow_page); in copy_cow_page_dax()
845 copy_user_page(vto, kaddr, vmf->address, vmf->cow_page); in copy_cow_page_dax()
869 static void *dax_insert_entry(struct xa_state *xas, struct vm_fault *vmf, in dax_insert_entry() argument
873 struct address_space *mapping = vmf->vma->vm_file->f_mapping; in dax_insert_entry()
876 bool dirty = write && !dax_fault_is_synchronous(iter, vmf->vma); in dax_insert_entry()
898 dax_associate_entry(new_entry, mapping, vmf->vma, vmf->address, in dax_insert_entry()
1186 static vm_fault_t dax_load_hole(struct xa_state *xas, struct vm_fault *vmf, in dax_load_hole() argument
1190 unsigned long vaddr = vmf->address; in dax_load_hole()
1194 *entry = dax_insert_entry(xas, vmf, iter, *entry, pfn, DAX_ZERO_PAGE); in dax_load_hole()
[all …]
/linux-6.6.21/drivers/gpu/drm/ttm/
Dttm_bo_vm.c42 struct vm_fault *vmf) in ttm_bo_vm_fault_idle() argument
57 if (fault_flag_allow_retry_first(vmf->flags)) { in ttm_bo_vm_fault_idle()
58 if (vmf->flags & FAULT_FLAG_RETRY_NOWAIT) in ttm_bo_vm_fault_idle()
62 mmap_read_unlock(vmf->vma->vm_mm); in ttm_bo_vm_fault_idle()
117 struct vm_fault *vmf) in ttm_bo_vm_reserve() argument
131 if (fault_flag_allow_retry_first(vmf->flags)) { in ttm_bo_vm_reserve()
132 if (!(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) { in ttm_bo_vm_reserve()
134 mmap_read_unlock(vmf->vma->vm_mm); in ttm_bo_vm_reserve()
181 vm_fault_t ttm_bo_vm_fault_reserved(struct vm_fault *vmf, in ttm_bo_vm_fault_reserved() argument
185 struct vm_area_struct *vma = vmf->vma; in ttm_bo_vm_fault_reserved()
[all …]
/linux-6.6.21/drivers/video/fbdev/core/
Dfb_defio.c94 static vm_fault_t fb_deferred_io_fault(struct vm_fault *vmf) in fb_deferred_io_fault() argument
98 struct fb_info *info = vmf->vma->vm_private_data; in fb_deferred_io_fault()
100 offset = vmf->pgoff << PAGE_SHIFT; in fb_deferred_io_fault()
110 if (vmf->vma->vm_file) in fb_deferred_io_fault()
111 page->mapping = vmf->vma->vm_file->f_mapping; in fb_deferred_io_fault()
116 page->index = vmf->pgoff; /* for page_mkclean() */ in fb_deferred_io_fault()
118 vmf->page = page; in fb_deferred_io_fault()
197 static vm_fault_t fb_deferred_io_page_mkwrite(struct fb_info *info, struct vm_fault *vmf) in fb_deferred_io_page_mkwrite() argument
199 unsigned long offset = vmf->address - vmf->vma->vm_start; in fb_deferred_io_page_mkwrite()
200 struct page *page = vmf->page; in fb_deferred_io_page_mkwrite()
[all …]
/linux-6.6.21/fs/ocfs2/
Dmmap.c31 static vm_fault_t ocfs2_fault(struct vm_fault *vmf) in ocfs2_fault() argument
33 struct vm_area_struct *vma = vmf->vma; in ocfs2_fault()
38 ret = filemap_fault(vmf); in ocfs2_fault()
42 vma, vmf->page, vmf->pgoff); in ocfs2_fault()
113 static vm_fault_t ocfs2_page_mkwrite(struct vm_fault *vmf) in ocfs2_page_mkwrite() argument
115 struct page *page = vmf->page; in ocfs2_page_mkwrite()
116 struct inode *inode = file_inode(vmf->vma->vm_file); in ocfs2_page_mkwrite()
144 ret = __ocfs2_page_mkwrite(vmf->vma->vm_file, di_bh, page); in ocfs2_page_mkwrite()
/linux-6.6.21/arch/x86/entry/vdso/
Dvma.c63 struct vm_area_struct *vma, struct vm_fault *vmf) in vdso_fault() argument
67 if (!image || (vmf->pgoff << PAGE_SHIFT) >= image->size) in vdso_fault()
70 vmf->page = virt_to_page(image->data + (vmf->pgoff << PAGE_SHIFT)); in vdso_fault()
71 get_page(vmf->page); in vdso_fault()
129 struct vm_area_struct *vma, struct vm_fault *vmf) in vvar_fault() argument
138 sym_offset = (long)(vmf->pgoff << PAGE_SHIFT) + in vvar_fault()
173 addr = vmf->address + (image->sym_timens_page - sym_offset); in vvar_fault()
181 return vmf_insert_pfn(vma, vmf->address, pfn); in vvar_fault()
186 return vmf_insert_pfn_prot(vma, vmf->address, in vvar_fault()
194 return vmf_insert_pfn(vma, vmf->address, pfn); in vvar_fault()
[all …]
/linux-6.6.21/drivers/gpu/drm/
Ddrm_vm.c110 static vm_fault_t drm_vm_fault(struct vm_fault *vmf) in drm_vm_fault() argument
112 struct vm_area_struct *vma = vmf->vma; in drm_vm_fault()
139 resource_size_t offset = vmf->address - vma->vm_start; in drm_vm_fault()
169 vmf->page = page; in drm_vm_fault()
183 static vm_fault_t drm_vm_fault(struct vm_fault *vmf) in drm_vm_fault() argument
199 static vm_fault_t drm_vm_shm_fault(struct vm_fault *vmf) in drm_vm_shm_fault() argument
201 struct vm_area_struct *vma = vmf->vma; in drm_vm_shm_fault()
210 offset = vmf->address - vma->vm_start; in drm_vm_shm_fault()
216 vmf->page = page; in drm_vm_shm_fault()
299 static vm_fault_t drm_vm_dma_fault(struct vm_fault *vmf) in drm_vm_dma_fault() argument
[all …]
/linux-6.6.21/drivers/gpu/drm/vmwgfx/
Dvmwgfx_page_dirty.c375 vm_fault_t vmw_bo_vm_mkwrite(struct vm_fault *vmf) in vmw_bo_vm_mkwrite() argument
377 struct vm_area_struct *vma = vmf->vma; in vmw_bo_vm_mkwrite()
389 save_flags = vmf->flags; in vmw_bo_vm_mkwrite()
390 vmf->flags &= ~FAULT_FLAG_ALLOW_RETRY; in vmw_bo_vm_mkwrite()
391 ret = ttm_bo_vm_reserve(bo, vmf); in vmw_bo_vm_mkwrite()
392 vmf->flags = save_flags; in vmw_bo_vm_mkwrite()
396 page_offset = vmf->pgoff - drm_vma_node_start(&bo->base.vma_node); in vmw_bo_vm_mkwrite()
416 vm_fault_t vmw_bo_vm_fault(struct vm_fault *vmf) in vmw_bo_vm_fault() argument
418 struct vm_area_struct *vma = vmf->vma; in vmw_bo_vm_fault()
426 ret = ttm_bo_vm_reserve(bo, vmf); in vmw_bo_vm_fault()
[all …]
/linux-6.6.21/drivers/xen/
Dprivcmd-buf.c117 static vm_fault_t privcmd_buf_vma_fault(struct vm_fault *vmf) in privcmd_buf_vma_fault() argument
120 vmf->vma, vmf->vma->vm_start, vmf->vma->vm_end, in privcmd_buf_vma_fault()
121 vmf->pgoff, (void *)vmf->address); in privcmd_buf_vma_fault()
/linux-6.6.21/fs/xfs/
Dxfs_file.c1326 struct vm_fault *vmf, in xfs_dax_fault() argument
1331 return dax_iomap_fault(vmf, order, pfn, NULL, in xfs_dax_fault()
1332 (write_fault && !vmf->cow_page) ? in xfs_dax_fault()
1339 struct vm_fault *vmf, in xfs_dax_fault() argument
1361 struct vm_fault *vmf, in __xfs_filemap_fault() argument
1365 struct inode *inode = file_inode(vmf->vma->vm_file); in __xfs_filemap_fault()
1374 file_update_time(vmf->vma->vm_file); in __xfs_filemap_fault()
1383 ret = xfs_dax_fault(vmf, order, write_fault, &pfn); in __xfs_filemap_fault()
1385 ret = dax_finish_sync_fault(vmf, order, pfn); in __xfs_filemap_fault()
1387 ret = iomap_page_mkwrite(vmf, &xfs_page_mkwrite_iomap_ops); in __xfs_filemap_fault()
[all …]
/linux-6.6.21/include/linux/
Dhuge_mm.h10 vm_fault_t do_huge_pmd_anonymous_page(struct vm_fault *vmf);
14 void huge_pmd_set_accessed(struct vm_fault *vmf);
20 void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud);
22 static inline void huge_pud_set_accessed(struct vm_fault *vmf, pud_t orig_pud) in huge_pud_set_accessed() argument
27 vm_fault_t do_huge_pmd_wp_page(struct vm_fault *vmf);
40 vm_fault_t vmf_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write);
41 vm_fault_t vmf_insert_pfn_pud(struct vm_fault *vmf, pfn_t pfn, bool write);
226 vm_fault_t do_huge_pmd_numa_page(struct vm_fault *vmf);
349 static inline vm_fault_t do_huge_pmd_numa_page(struct vm_fault *vmf) in do_huge_pmd_numa_page() argument
/linux-6.6.21/sound/usb/usx2y/
DusX2Yhwdep.c21 static vm_fault_t snd_us428ctls_vm_fault(struct vm_fault *vmf) in snd_us428ctls_vm_fault() argument
28 vmf->vma->vm_start, in snd_us428ctls_vm_fault()
29 vmf->pgoff); in snd_us428ctls_vm_fault()
31 offset = vmf->pgoff << PAGE_SHIFT; in snd_us428ctls_vm_fault()
32 vaddr = (char *)((struct usx2ydev *)vmf->vma->vm_private_data)->us428ctls_sharedmem + offset; in snd_us428ctls_vm_fault()
35 vmf->page = page; in snd_us428ctls_vm_fault()
/linux-6.6.21/drivers/char/
Dmspec.c137 mspec_fault(struct vm_fault *vmf) in mspec_fault() argument
141 pgoff_t index = vmf->pgoff; in mspec_fault()
142 struct vma_data *vdata = vmf->vma->vm_private_data; in mspec_fault()
164 return vmf_insert_pfn(vmf->vma, vmf->address, pfn); in mspec_fault()
/linux-6.6.21/fs/nilfs2/
Dfile.c45 static vm_fault_t nilfs_page_mkwrite(struct vm_fault *vmf) in nilfs_page_mkwrite() argument
47 struct vm_area_struct *vma = vmf->vma; in nilfs_page_mkwrite()
48 struct page *page = vmf->page; in nilfs_page_mkwrite()
99 ret = block_page_mkwrite(vma, vmf, nilfs_get_block); in nilfs_page_mkwrite()
/linux-6.6.21/drivers/misc/ocxl/
Dsysfs.c109 static vm_fault_t global_mmio_fault(struct vm_fault *vmf) in global_mmio_fault() argument
111 struct vm_area_struct *vma = vmf->vma; in global_mmio_fault()
115 if (vmf->pgoff >= (afu->config.global_mmio_size >> PAGE_SHIFT)) in global_mmio_fault()
118 offset = vmf->pgoff; in global_mmio_fault()
120 return vmf_insert_pfn(vma, vmf->address, offset); in global_mmio_fault()
Dcontext.c139 static vm_fault_t ocxl_mmap_fault(struct vm_fault *vmf) in ocxl_mmap_fault() argument
141 struct vm_area_struct *vma = vmf->vma; in ocxl_mmap_fault()
146 offset = vmf->pgoff << PAGE_SHIFT; in ocxl_mmap_fault()
148 ctx->pasid, vmf->address, offset); in ocxl_mmap_fault()
151 ret = map_pp_mmio(vma, vmf->address, offset, ctx); in ocxl_mmap_fault()
153 ret = map_afu_irq(vma, vmf->address, offset, ctx); in ocxl_mmap_fault()
/linux-6.6.21/drivers/misc/cxl/
Dcontext.c126 static vm_fault_t cxl_mmap_fault(struct vm_fault *vmf) in cxl_mmap_fault() argument
128 struct vm_area_struct *vma = vmf->vma; in cxl_mmap_fault()
133 offset = vmf->pgoff << PAGE_SHIFT; in cxl_mmap_fault()
136 __func__, ctx->pe, vmf->address, offset); in cxl_mmap_fault()
161 vmf->page = ctx->ff_page; in cxl_mmap_fault()
168 ret = vmf_insert_pfn(vma, vmf->address, (area + offset) >> PAGE_SHIFT); in cxl_mmap_fault()
/linux-6.6.21/fs/ext2/
Dfile.c93 static vm_fault_t ext2_dax_fault(struct vm_fault *vmf) in ext2_dax_fault() argument
95 struct inode *inode = file_inode(vmf->vma->vm_file); in ext2_dax_fault()
97 bool write = (vmf->flags & FAULT_FLAG_WRITE) && in ext2_dax_fault()
98 (vmf->vma->vm_flags & VM_SHARED); in ext2_dax_fault()
102 file_update_time(vmf->vma->vm_file); in ext2_dax_fault()
106 ret = dax_iomap_fault(vmf, 0, NULL, NULL, &ext2_iomap_ops); in ext2_dax_fault()

1234567