Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
From 592017c3a910a3905b1925aee88c4674e9a596b7 Mon Sep 17 00:00:00 2001
|
||||
From: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
Date: Tue, 30 May 2023 17:09:42 +0530
|
||||
Subject: [PATCH] zero copy: Fix build for Linux 6.4
|
||||
|
||||
get_user_pages_remote api prototype is changed in kernel.
|
||||
struct vm_area_struct **vmas argument is removed.
|
||||
Migrate to the new API.
|
||||
|
||||
Signed-off-by: Gaurav Jain <gaurav.jain@nxp.com>
|
||||
---
|
||||
zc.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
--- a/zc.c
|
||||
+++ b/zc.c
|
||||
@@ -80,10 +80,14 @@ int __get_userbuf(uint8_t __user *addr,
|
||||
ret = get_user_pages_remote(task, mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
-#else
|
||||
+#elif (LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0))
|
||||
ret = get_user_pages_remote(mm,
|
||||
(unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
pg, NULL, NULL);
|
||||
+#else
|
||||
+ ret = get_user_pages_remote(mm,
|
||||
+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0,
|
||||
+ pg, NULL);
|
||||
#endif
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 8, 0))
|
||||
up_read(&mm->mmap_sem);
|
||||
Reference in New Issue
Block a user