summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnuj Mittal <anuj.mittal@intel.com>2018-01-24 11:50:11 +0800
committerCalifornia Sullivan <california.l.sullivan@intel.com>2018-01-26 14:41:15 -0800
commit263aa528e90200170fd2691f204f645bb6d78ab1 (patch)
tree9da62d780220365a60801f3bc7ce50964392b935
parentcfb652a4b5e4ccc310b13974fe2d9b26754eb5c2 (diff)
downloadmeta-intel-qat-263aa528e90200170fd2691f204f645bb6d78ab1.tar.gz
qat16: fix build with musl and x32
Make sure that the architecture dependent types are defined correctly. Prevents errors like: | quickassist/lookaside/access_layer/src/qat_direct/src/adf_user_ETring_mgr_dp.c: In function 'icp_adf_getQueueMemory': | quickassist/lookaside/access_layer/src/qat_direct/src/adf_user_ETring_mgr_dp.c:83:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | (((UARCH_INT)pRingHandle->ring_virt_addr) | ^ | quickassist/lookaside/access_layer/src/qat_direct/src/adf_user_ETring_mgr_dp.c:82:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] | *targetAddr = (Cpa32U*) | ^ | quickassist/lookaside/access_layer/src/qat_direct/src/adf_user_ETring_mgr_dp.c: In function 'icp_adf_getSingleQueueAddr': | quickassist/lookaside/access_layer/src/qat_direct/src/adf_user_ETring_mgr_dp.c:112:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] | (((UARCH_INT)pRingHandle->ring_virt_addr) | ^ Partially fixes [YOCTO #12121] Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: California Sullivan <california.l.sullivan@intel.com>
-rw-r--r--recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch53
-rw-r--r--recipes-extended/qat/qat16.inc2
2 files changed, 54 insertions, 1 deletions
diff --git a/recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch b/recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch
new file mode 100644
index 0000000..2f794ce
--- /dev/null
+++ b/recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch
@@ -0,0 +1,53 @@
1From 8da85286efc86b4f5bbf14f755c84d1982841973 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Wed, 3 Jan 2018 15:45:59 +0800
4Subject: [PATCH] Osal: fix build with x32
5
6x32 follows ILP32 model and has __x86_64__ defined too. Make sure
7that we check for ILP32 also before using architecture dependent
8types.
9
10Upstream-Status: Accepted [Code released in tarball form only]
11
12Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
13---
14 quickassist/adf/platform/include/adf_platform_common.h | 2 +-
15 quickassist/utilities/osal/include/OsalTypes.h | 4 ++--
16 2 files changed, 3 insertions(+), 3 deletions(-)
17
18diff --git a/quickassist/adf/platform/include/adf_platform_common.h b/quickassist/adf/platform/include/adf_platform_common.h
19index 8673ec1..de5c31a 100755
20--- a/quickassist/adf/platform/include/adf_platform_common.h
21+++ b/quickassist/adf/platform/include/adf_platform_common.h
22@@ -207,7 +207,7 @@
23 * xx refers to arch, i.e.64bit or 32bit
24 * yy refers to number of bytes copied from src to dst, i.e. 64 or 128 bytes
25 */
26-#ifdef __x86_64__
27+#if (defined (__x86_64__) && !defined (__ILP32__))
28 #define adf_memcpy64_64(dst, src)\
29 do { \
30 __asm__ __volatile__ ( \
31diff --git a/quickassist/utilities/osal/include/OsalTypes.h b/quickassist/utilities/osal/include/OsalTypes.h
32index d8fa1d9..eaf08bf 100755
33--- a/quickassist/utilities/osal/include/OsalTypes.h
34+++ b/quickassist/utilities/osal/include/OsalTypes.h
35@@ -160,13 +160,13 @@ typedef volatile INT32 VINT32;
36 */
37 #define OSAL_HUNDRED (100)
38
39-#ifdef __x86_64__
40+#if (defined (__x86_64__) && !defined (__ILP32__))
41 #define ARCH_INT INT64
42 #else
43 #define ARCH_INT INT32
44 #endif
45
46-#ifdef __x86_64__
47+#if (defined (__x86_64__) && !defined (__ILP32__))
48 #define UARCH_INT UINT64
49 #else
50 #define UARCH_INT UINT32
51--
522.7.4
53
diff --git a/recipes-extended/qat/qat16.inc b/recipes-extended/qat/qat16.inc
index 9b5372e..4b9c835 100644
--- a/recipes-extended/qat/qat16.inc
+++ b/recipes-extended/qat/qat16.inc
@@ -16,10 +16,10 @@ SRC_URI="file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
16 file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \ 16 file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
17 file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \ 17 file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \
18 file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \ 18 file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \
19 file://qat16-Osal-fix-build-with-x32.patch \
19 " 20 "
20 21
21COMPATIBLE_MACHINE = "null" 22COMPATIBLE_MACHINE = "null"
22COMPATIBLE_HOST_linux-gnux32 = "null"
23 23
24S = "${WORKDIR}/${ICP_DRIVER_TYPE}" 24S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
25ICP_TOOLS = "accelcomp" 25ICP_TOOLS = "accelcomp"