summaryrefslogtreecommitdiffstats
path: root/common/recipes-extended
diff options
context:
space:
mode:
authorSaul Wold <sgw@linux.intel.com>2017-02-09 10:46:22 -0800
committerSaul Wold <sgw@linux.intel.com>2017-02-10 07:52:49 -0800
commit66cb81c1b39c6714749fe0e0ba611630454751e4 (patch)
tree4088f668b5482c4a38ebb86c3248f309a5cf4bc9 /common/recipes-extended
parentbaef6680416aadeb582f44c5a6272b71c3430aa6 (diff)
downloadmeta-intel-66cb81c1b39c6714749fe0e0ba611630454751e4.tar.gz
openssl-qat: Add patch to support MUSL
openssl-qat was using pthread_yield() instead of the POSIX API of sched_yield() which MUSL supports Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common/recipes-extended')
-rw-r--r--common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch47
-rw-r--r--common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb2
2 files changed, 49 insertions, 0 deletions
diff --git a/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch b/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch
new file mode 100644
index 00000000..1b7921fa
--- /dev/null
+++ b/common/recipes-extended/openssl-qat/openssl-qat/0001-Use_sched_yield_api.patch
@@ -0,0 +1,47 @@
1From f4c50648752ee1000f606585f4df9fa6bd9ff8e8 Mon Sep 17 00:00:00 2001
2From: Saul Wold <sgw@linux.intel.com>
3Date: Wed, 8 Feb 2017 17:36:48 -0800
4Subject: [PATCH] openssl-qat: Use sched_yield() instead of pthread_yield()
5
6sched_yield() is the correct POSIX API to use for thread switching
7This futher supports building with MUSL.
8
9Upstream-Status: Pending
10Signed-off-by: Saul Wold <sgw@linux.intel.com>
11---
12 engines/qat_engine/e_qat.c | 5 +++--
13 1 file changed, 3 insertions(+), 2 deletions(-)
14
15diff --git a/engines/qat_engine/e_qat.c b/engines/qat_engine/e_qat.c
16index 17d7935..af543bc 100644
17--- a/engines/qat_engine/e_qat.c
18+++ b/engines/qat_engine/e_qat.c
19@@ -90,6 +90,7 @@
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23+#include <sched.h>
24 #include <pthread.h>
25 #include <unistd.h>
26 #include <ctype.h>
27@@ -545,7 +546,7 @@ CpaStatus myPerformOp(const CpaInstanceHandle instanceHandle,
28 pSrcBuffer, pDstBuffer, pVerifyResult);
29 if (status == CPA_STATUS_RETRY) {
30 qatPerformOpRetries++;
31- pthread_yield();
32+ sched_yield();
33 if (uiRetry >= iMsgRetry
34 && iMsgRetry != QAT_INFINITE_MAX_NUM_RETRIES) {
35 break;
36@@ -588,7 +589,7 @@ static void *sendPoll(void *ih)
37 if (likely(CPA_STATUS_SUCCESS == status)) {
38 /* Do nothing */
39 } else if (CPA_STATUS_RETRY == status) {
40- pthread_yield();
41+ sched_yield();
42 } else {
43 WARN("WARNING icp_sal_CyPollInstance returned status %d\n",
44 status);
45--
462.7.4
47
diff --git a/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb b/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb
index f2c479ef..e3d8ccc0 100644
--- a/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb
+++ b/common/recipes-extended/openssl-qat/openssl-qat_0.4.9-009.bb
@@ -7,6 +7,8 @@ SRC_URI += "git://opensslfoundation.com/openssl-async.git;branch=OpenSSL_1_0_1-
7 file://openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch \ 7 file://openssl-qat_0.4.9-009-openssl_qat-add-openssl-async-specific-symbols.patch \
8 " 8 "
9 9
10SRC_URI_append_libc-musl = " file://0001-Use_sched_yield_api.patch"
11
10SRC_URI[openssl_qat.md5sum]="8e2b45cf9b345356bdff0956845c6103" 12SRC_URI[openssl_qat.md5sum]="8e2b45cf9b345356bdff0956845c6103"
11SRC_URI[openssl_qat.sha256sum]="c2334b4d1fc8498e06f0554ef155041a6bf441de134cfdd3635e5a449a34bf81" 13SRC_URI[openssl_qat.sha256sum]="c2334b4d1fc8498e06f0554ef155041a6bf441de134cfdd3635e5a449a34bf81"
12 14