diff options
author | Saul Wold <sgw@linux.intel.com> | 2017-04-01 15:02:13 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-04-03 16:54:42 -0700 |
commit | e726360655432ca8b509927f543f8acfb9b2330c (patch) | |
tree | 4618a8fc3ac0d96350229778561a18c90981254b /common/recipes-kernel/cryptodev | |
parent | 7564469f25f6e4b43362fa73472db77a32c337c3 (diff) | |
download | meta-intel-e726360655432ca8b509927f543f8acfb9b2330c.tar.gz |
cryptodev-modules: Add bbappend to add patch
This adds a patch to cryptodev-module to sync up the API change that
was added in the linux-intel kernel backport from 4.10 -> 4.9. The
patch just forces the code path to use the latest API.
This uses anon python to ensure it only applies when PREFERRED_PROVIDER
is set to linux-intel and KERNEL_VERSION is 4.9 (LTS).
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common/recipes-kernel/cryptodev')
-rw-r--r-- | common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch | 29 | ||||
-rw-r--r-- | common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend | 9 |
2 files changed, 38 insertions, 0 deletions
diff --git a/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch new file mode 100644 index 00000000..6722b8cb --- /dev/null +++ b/common/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch | |||
@@ -0,0 +1,29 @@ | |||
1 | From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001 | ||
2 | From: Saul Wold <sgw@linux.intel.com> | ||
3 | Date: Sat, 1 Apr 2017 11:43:31 -0700 | ||
4 | Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API | ||
5 | |||
6 | This change forces the newer API, as the linux-intel 4.9-LTS kernel | ||
7 | backported the 4.10 API change in the page handling code. | ||
8 | |||
9 | Signed-off-by: Saul Wold <sgw@linux.intel.com> | ||
10 | --- | ||
11 | zc.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/zc.c b/zc.c | ||
15 | index 2f4ea99..fcd0669 100644 | ||
16 | --- a/zc.c | ||
17 | +++ b/zc.c | ||
18 | @@ -67,7 +67,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, | ||
19 | ret = get_user_pages_remote(task, mm, | ||
20 | (unsigned long)addr, pgcount, write, 0, pg, NULL); | ||
21 | # else | ||
22 | -# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) | ||
23 | +# if (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0) | ||
24 | ret = get_user_pages_remote(task, mm, | ||
25 | (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, | ||
26 | pg, NULL); | ||
27 | -- | ||
28 | 2.7.4 | ||
29 | |||
diff --git a/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend new file mode 100644 index 00000000..cf4863ca --- /dev/null +++ b/common/recipes-kernel/cryptodev/cryptodev-module_%.bbappend | |||
@@ -0,0 +1,9 @@ | |||
1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | ||
2 | |||
3 | python() { | ||
4 | if ((d.getVar("PREFERRED_PROVIDER_virtual/kernel").startswith("linux-intel")) and | ||
5 | (d.getVar("PREFERRED_VERSION_linux-intel").startswith("4.9"))): | ||
6 | src_uri = d.getVar("SRC_URI") | ||
7 | d.setVar("SRC_URI", src_uri + | ||
8 | " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch") | ||
9 | } | ||