summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Schultz <d.schultz@phytec.de>2017-01-26 14:44:56 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-31 14:43:02 +0000
commitd053ce30718ab17e6eef843f7acef249f4f0f6a5 (patch)
treeae1e6b813b96968c15a8c7fd6a4ca4465d3d0efc
parent710a6e6bdc1655fab3a6756a46dcba86f5164418 (diff)
downloadpoky-d053ce30718ab17e6eef843f7acef249f4f0f6a5.tar.gz
cryptodev: Fix changed mm interface in Kernel 4.9
The memory management interface has changed in Kernel 4.9. This patch adds a patch which fixes the paramter of the function call. Backport from https://github.com/cryptodev-linux/cryptodev-linux Based on commit f126e4837e6334d0464540995df7426fedf6b175 (From OE-Core rev: 29e3e2999ae0fd92fd41c2180359e110301a488c) Signed-off-by: Daniel Schultz <d.schultz@phytec.de> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev.inc3
-rw-r--r--meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch40
2 files changed, 42 insertions, 1 deletions
diff --git a/meta/recipes-kernel/cryptodev/cryptodev.inc b/meta/recipes-kernel/cryptodev/cryptodev.inc
index 160ab30840..62412383fb 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev.inc
+++ b/meta/recipes-kernel/cryptodev/cryptodev.inc
@@ -5,7 +5,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
5 5
6SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz \ 6SRC_URI = "http://download.gna.org/cryptodev-linux/cryptodev-linux-${PV}.tar.gz \
7 file://06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch \ 7 file://06d6b560c6e45dc317dae47c74706fa43f4a31d8.patch \
8 file://cb186f682679383e8b5806240927903730ce85d9.patch" 8 file://cb186f682679383e8b5806240927903730ce85d9.patch \
9 file://0001-Adjust-to-another-change-in-the-user-page-API.patch"
9 10
10SRC_URI[md5sum] = "02644cc4cd02301e0b503a332eb2f0b5" 11SRC_URI[md5sum] = "02644cc4cd02301e0b503a332eb2f0b5"
11SRC_URI[sha256sum] = "67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376" 12SRC_URI[sha256sum] = "67fabde9fb67b286a96c4f45b594b0eccd0f761b495705c18f2ae9461b831376"
diff --git a/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch b/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch
new file mode 100644
index 0000000000..fb75278b5e
--- /dev/null
+++ b/meta/recipes-kernel/cryptodev/files/0001-Adjust-to-another-change-in-the-user-page-API.patch
@@ -0,0 +1,40 @@
1From f126e4837e6334d0464540995df7426fedf6b175 Mon Sep 17 00:00:00 2001
2From: Michael Weiser <michael.weiser@gmx.de>
3Date: Fri, 11 Nov 2016 18:09:32 +0100
4Subject: [PATCH] Adjust to another change in the user page API
5
64.9.0 will replace the write and force flags of get_user_pages_remote()
7with a gup_flags parameter[1]. Distinguish the two APIs based on kernel
8version we're compiling for.
9
10[1] https://github.com/torvalds/linux/commit/9beae1ea89305a9667ceaab6d0bf46a045ad71e7
11
12Upstream-Status: Backport
13
14Signed-off-by: Daniel Schultz <d.schultz@phytec.de>
15---
16 zc.c | 8 +++++++-
17 1 file changed, 7 insertions(+), 1 deletion(-)
18
19diff --git a/zc.c b/zc.c
20index a97b49f..e766ee3 100644
21--- a/zc.c
22+++ b/zc.c
23@@ -65,7 +65,13 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write,
24 ret = get_user_pages(
25 #endif
26 task, mm,
27- (unsigned long)addr, pgcount, write, 0, pg, NULL);
28+ (unsigned long)addr, pgcount,
29+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0))
30+ write ? FOLL_WRITE : 0,
31+#else
32+ write, 0,
33+#endif
34+ pg, NULL);
35 up_read(&mm->mmap_sem);
36 if (ret != pgcount)
37 return -EINVAL;
38--
391.9.1
40