Skip to content

Commit 4864ed4

Browse files
committed
fix vm_flags modification for Linux v6.3
1 parent cd555a3 commit 4864ed4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

XDMA/linux-kernel/xdma/cdev_ctrl.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ int bridge_mmap(struct file *file, struct vm_area_struct *vma)
233233
* prevent touching the pages (byte access) for swap-in,
234234
* and prevent the pages from being swapped out
235235
*/
236+
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
237+
vm_flags_set(vma, VMEM_FLAGS);
238+
#else
236239
vma->vm_flags |= VMEM_FLAGS;
240+
#endif
237241
/* make MMIO accessible to user space */
238242
rv = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT,
239243
vsize, vma->vm_page_prot);

0 commit comments

Comments
 (0)