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 @@ | |||
1 | From 008516c6a1dd0afe0eadff3ad00c1200c198983f Mon Sep 17 00:00:00 2001 | ||
2 | From: Cristian Stoica <cristian.stoica@nxp.com> | ||
3 | Date: Wed, 8 Feb 2017 10:19:34 +0200 | ||
4 | Subject: [PATCH 102/104] adjust to API changes in kernel >=4.10 | ||
5 | |||
6 | There are many changes related to get_user_pages and the code is rewritten | ||
7 | for clarity. | ||
8 | |||
9 | Signed-off-by: Cristian Stoica <cristian.stoica@nxp.com> | ||
10 | --- | ||
11 | zc.c | 28 +++++++++++++++++----------- | ||
12 | 1 file changed, 17 insertions(+), 11 deletions(-) | ||
13 | |||
14 | diff --git a/zc.c b/zc.c | ||
15 | index e766ee3..2f4ea99 100644 | ||
16 | --- a/zc.c | ||
17 | +++ b/zc.c | ||
18 | @@ -59,19 +59,25 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, | ||
19 | } | ||
20 | |||
21 | down_read(&mm->mmap_sem); | ||
22 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0)) | ||
23 | - ret = get_user_pages_remote( | ||
24 | +#if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 6, 0)) | ||
25 | + ret = get_user_pages(task, mm, | ||
26 | + (unsigned long)addr, pgcount, write, 0, pg, NULL); | ||
27 | #else | ||
28 | - ret = get_user_pages( | ||
29 | -#endif | ||
30 | - task, mm, | ||
31 | - (unsigned long)addr, pgcount, | ||
32 | -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0)) | ||
33 | - write ? FOLL_WRITE : 0, | ||
34 | -#else | ||
35 | - write, 0, | ||
36 | -#endif | ||
37 | +# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) | ||
38 | + ret = get_user_pages_remote(task, mm, | ||
39 | + (unsigned long)addr, pgcount, write, 0, pg, NULL); | ||
40 | +# else | ||
41 | +# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) | ||
42 | + ret = get_user_pages_remote(task, mm, | ||
43 | + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, | ||
44 | pg, NULL); | ||
45 | +# else | ||
46 | + ret = get_user_pages_remote(task, mm, | ||
47 | + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, | ||
48 | + pg, NULL, NULL); | ||
49 | +# endif | ||
50 | +# endif | ||
51 | +#endif | ||
52 | up_read(&mm->mmap_sem); | ||
53 | if (ret != pgcount) | ||
54 | return -EINVAL; | ||
55 | -- | ||
56 | 2.10.2 | ||
57 | |||