Skip to content

Commit

Permalink
fix vm_flags modification for Linux v6.3
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyself committed Jun 7, 2023
1 parent cd555a3 commit 4864ed4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions XDMA/linux-kernel/xdma/cdev_ctrl.c
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,11 @@ int bridge_mmap(struct file *file, struct vm_area_struct *vma)
* prevent touching the pages (byte access) for swap-in,
* and prevent the pages from being swapped out
*/
#if KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE
vm_flags_set(vma, VMEM_FLAGS);
#else
vma->vm_flags |= VMEM_FLAGS;
#endif
/* make MMIO accessible to user space */
rv = io_remap_pfn_range(vma, vma->vm_start, phys >> PAGE_SHIFT,
vsize, vma->vm_page_prot);
Expand Down

0 comments on commit 4864ed4

Please sign in to comment.