diff options
Diffstat (limited to 'recipes-kernel/cryptodev/sdk_patches/0102-adjust-to-API-changes-in-kernel-4.10.patch')
-rw-r--r-- | recipes-kernel/cryptodev/sdk_patches/0102-adjust-to-API-changes-in-kernel-4.10.patch | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/recipes-kernel/cryptodev/sdk_patches/0102-adjust-to-API-changes-in-kernel-4.10.patch b/recipes-kernel/cryptodev/sdk_patches/0102-adjust-to-API-changes-in-kernel-4.10.patch deleted file mode 100644 index 5ffc4508..00000000 --- a/recipes-kernel/cryptodev/sdk_patches/0102-adjust-to-API-changes-in-kernel-4.10.patch +++ /dev/null @@ -1,57 +0,0 @@ -From 008516c6a1dd0afe0eadff3ad00c1200c198983f Mon Sep 17 00:00:00 2001 -From: Cristian Stoica <cristian.stoica@nxp.com> -Date: Wed, 8 Feb 2017 10:19:34 +0200 -Subject: [PATCH 102/104] adjust to API changes in kernel >=4.10 - -There are many changes related to get_user_pages and the code is rewritten -for clarity. - -Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> ---- - zc.c | 28 +++++++++++++++++----------- - 1 file changed, 17 insertions(+), 11 deletions(-) - -diff --git a/zc.c b/zc.c -index e766ee3..2f4ea99 100644 ---- a/zc.c -+++ b/zc.c -@@ -59,19 +59,25 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, - } - - down_read(&mm->mmap_sem); --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)) -- ret = get_user_pages_remote( -+#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) -+ ret = get_user_pages(task, mm, -+ (unsigned long)addr, pgcount, write, 0, pg, NULL); - #else -- ret = get_user_pages( --#endif -- task, mm, -- (unsigned long)addr, pgcount, --#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) -- write ? FOLL_WRITE : 0, --#else -- write, 0, --#endif -+# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) -+ ret = get_user_pages_remote(task, mm, -+ (unsigned long)addr, pgcount, write, 0, pg, NULL); -+# else -+# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) -+ ret = get_user_pages_remote(task, mm, -+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, - pg, NULL); -+# else -+ ret = get_user_pages_remote(task, mm, -+ (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, -+ pg, NULL, NULL); -+# endif -+# endif -+#endif - up_read(&mm->mmap_sem); - if (ret != pgcount) - return -EINVAL; --- -2.10.2 - |