diff --git a/XDMA/linux-kernel/xdma/cdev_ctrl.c b/XDMA/linux-kernel/xdma/cdev_ctrl.c index dbc41ef3..082178d7 100644 --- a/XDMA/linux-kernel/xdma/cdev_ctrl.c +++ b/XDMA/linux-kernel/xdma/cdev_ctrl.c @@ -233,7 +233,12 @@ 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); diff --git a/XDMA/linux-kernel/xdma/cdev_sgdma.c b/XDMA/linux-kernel/xdma/cdev_sgdma.c index 4a9f6387..2ebc880c 100644 --- a/XDMA/linux-kernel/xdma/cdev_sgdma.c +++ b/XDMA/linux-kernel/xdma/cdev_sgdma.c @@ -566,12 +566,20 @@ static ssize_t cdev_aio_read(struct kiocb *iocb, const struct iovec *io, #if LINUX_VERSION_CODE >= KERNEL_VERSION(3, 16, 0) static ssize_t cdev_write_iter(struct kiocb *iocb, struct iov_iter *io) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) return cdev_aio_write(iocb, io->iov, io->nr_segs, io->iov_offset); +#else + return cdev_aio_write(iocb, io->__iov, io->nr_segs, io->iov_offset); +#endif } static ssize_t cdev_read_iter(struct kiocb *iocb, struct iov_iter *io) { +#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0) return cdev_aio_read(iocb, io->iov, io->nr_segs, io->iov_offset); +#else + return cdev_aio_read(iocb, io->__iov, io->nr_segs, io->iov_offset); +#endif } #endif diff --git a/XDMA/linux-kernel/xdma/xdma_cdev.c b/XDMA/linux-kernel/xdma/xdma_cdev.c index 363ffb44..488a3a49 100644 --- a/XDMA/linux-kernel/xdma/xdma_cdev.c +++ b/XDMA/linux-kernel/xdma/xdma_cdev.c @@ -603,7 +603,7 @@ int xpdev_create_interfaces(struct xdma_pci_dev *xpdev) int xdma_cdev_init(void) { - g_xdma_class = class_create(THIS_MODULE, XDMA_NODE_NAME); + g_xdma_class = class_create(XDMA_NODE_NAME); if (IS_ERR(g_xdma_class)) { dbg_init(XDMA_NODE_NAME ": failed to create class"); return -EINVAL;