aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Security.md6
-rw-r--r--conf/include/maintainers.inc4
-rw-r--r--conf/layer.conf2
-rw-r--r--recipes-extended/qat/files/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch27
-rw-r--r--recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch59
-rw-r--r--recipes-extended/qat/files/0001-usdm_drv-convert-mutex_lock-to-mutex_trylock-to-avio.patch104
-rw-r--r--recipes-extended/qat/files/0002-qat-remove-local-path-from-makefile.patch (renamed from recipes-extended/qat/files/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch)8
-rw-r--r--recipes-extended/qat/files/0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch (renamed from recipes-extended/qat/files/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch)17
-rw-r--r--recipes-extended/qat/files/0004-update-KDIR-for-cross-compilation.patch (renamed from recipes-extended/qat/files/qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch)17
-rw-r--r--recipes-extended/qat/files/0005-Added-include-dir-path.patch (renamed from recipes-extended/qat/files/qat17_0.8.0-37-qat-added-include-dir-path.patch)18
-rw-r--r--recipes-extended/qat/files/0006-qat-add-install-target-and-add-folder.patch (renamed from recipes-extended/qat/files/qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch)16
-rw-r--r--recipes-extended/qat/files/build_fix.patch40
-rw-r--r--recipes-extended/qat/files/fix-redefinition-of-crypto_request_complete.patch37
-rw-r--r--recipes-extended/qat/files/qat-remove-the-deprecated-pci-dma-compat.h-API.patch342
-rw-r--r--recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch53
-rw-r--r--recipes-extended/qat/files/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch30
-rw-r--r--recipes-extended/qat/files/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch40
-rw-r--r--recipes-extended/qat/files/qat16_2.5.0-80-qat-Added-include-dir-path.patch30
-rw-r--r--recipes-extended/qat/files/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch40
-rw-r--r--recipes-extended/qat/files/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch353
-rw-r--r--recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch30
-rw-r--r--recipes-extended/qat/files/qat17_4.7.0-00006-Drop-pr_warning-definition.patch31
-rw-r--r--recipes-extended/qat/files/qat17_4.7.0-00006-Link-driver-with-object-files.patch91
-rw-r--r--recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch1161
-rw-r--r--recipes-extended/qat/files/use-CC-for-LD.patch17
-rw-r--r--recipes-extended/qat/qat16.inc132
-rw-r--r--recipes-extended/qat/qat16_2.6.0-65.bb16
-rw-r--r--recipes-extended/qat/qat17_4.24.0-00005.bb193
-rw-r--r--recipes-extended/qat/qat17_4.7.0-00006.bb170
-rw-r--r--recipes-extended/qatlib/qatlib_23.11.0.bb36
-rw-r--r--recipes-extended/qatzip/files/remove-rpath.patch29
-rw-r--r--recipes-extended/qatzip/qatzip_1.1.2.bb43
-rw-r--r--recipes-extended/zlib-qat/zlib-qat.inc87
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch29
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch63
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch30
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch31
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch51
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch52
-rw-r--r--recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch46
-rw-r--r--recipes-extended/zlib-qat/zlib-qat_0.4.10-003.bb43
-rw-r--r--recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb80
42 files changed, 931 insertions, 2773 deletions
diff --git a/Security.md b/Security.md
new file mode 100644
index 0000000..dd1e92f
--- /dev/null
+++ b/Security.md
@@ -0,0 +1,6 @@
+# Security Policy
+Intel is committed to rapidly addressing security vulnerabilities affecting our customers and providing clear guidance on the solution, impact, severity and mitigation.
+
+## Reporting a Vulnerability
+Please report any security vulnerabilities in this project and QAT [utilizing the guidelines here](https://www.intel.com/content/www/us/en/security-center/vulnerability-handling-guidelines.html).
+
diff --git a/conf/include/maintainers.inc b/conf/include/maintainers.inc
index 8343f5f..a7c444d 100644
--- a/conf/include/maintainers.inc
+++ b/conf/include/maintainers.inc
@@ -1,4 +1,4 @@
# This file contains a list of recipe maintainers for meta-intel
-RECIPE_MAINTAINER_pn-qat16 = "TBD DPDK Flex Team"
-RECIPE_MAINTAINER_pn-zlib-qat = "TBD DPDK Flex Team"
+RECIPE_MAINTAINER:pn-qat16 = "TBD DPDK Flex Team"
+RECIPE_MAINTAINER:pn-zlib-qat = "TBD DPDK Flex Team"
diff --git a/conf/layer.conf b/conf/layer.conf
index 00745b6..ab1683f 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -14,7 +14,7 @@ LAYERDEPENDS_intel-qat = "core"
# This should only be incremented on significant changes that will
# cause compatibility issues with other layers
LAYERVERSION_intel-qat = "1"
-LAYERSERIES_COMPAT_intel-qat = "thud warrior zeus"
+LAYERSERIES_COMPAT_intel-qat = "kirkstone scarthgap"
require ${LAYERDIR}/conf/include/maintainers.inc
diff --git a/recipes-extended/qat/files/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch b/recipes-extended/qat/files/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch
deleted file mode 100644
index d627353..0000000
--- a/recipes-extended/qat/files/0001-OsalServices-Only-use-bits-time-with-GLIBC.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From f83ac703a6babfa7f177b8f14ff3263a08fd8871 Mon Sep 17 00:00:00 2001
-From: Saul Wold <sgw@linux.intel.com>
-Date: Thu, 9 Feb 2017 14:35:57 -0800
-Subject: [PATCH] OsalServices: Only use bits/time with GLIBC
-
-Upstream-Status: Pending
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- quickassist/utilities/osal/src/linux/user_space/OsalServices.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
-index 49fde45..5f50aaa 100755
---- a/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
-+++ b/quickassist/utilities/osal/src/linux/user_space/OsalServices.c
-@@ -41,7 +41,7 @@
-
- #include <stdarg.h>
- #include <stdio.h>
--#ifdef __linux__
-+#if defined(__linux__) && defined(__GLIBC__)
- #include <bits/time.h>
- #endif
- #include <sched.h>
---
-2.7.4
-
diff --git a/recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch b/recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch
new file mode 100644
index 0000000..b151850
--- /dev/null
+++ b/recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch
@@ -0,0 +1,59 @@
+From 3710f9144871a576b1fcd3321387e24a368d5d08 Mon Sep 17 00:00:00 2001
+From: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
+Date: Mon, 6 Jul 2015 15:57:20 +0800
+Subject: [PATCH] qat: fix for cross-compilation issue
+
+Upstream-Status: Inappropriate [Configuration]
+
+Ensure that we are not using host compiler.
+
+Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
+Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
+[YL: modified for patching to qat17_4.12.0-00011]
+Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
+
+---
+ .../lookaside/access_layer/src/sample_code/functional/common.mk | 2 +-
+ .../src/sample_code/functional/dc/dc_dp_sample/Makefile | 2 +-
+ .../lookaside/access_layer/src/sample_code/performance/Makefile | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk b/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk
+index c93dabb..d456527 100755
+--- a/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk
++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk
+@@ -143,7 +143,7 @@ ifeq ($(ICP_OS_LEVEL),user_space)
+ ############################################################
+
+ ifneq ($(PREBUILD_BINS),0)
+- ADDITIONAL_OBJECTS += -L/usr/Lib -L$(ICP_BUILD_OUTPUT)
++ ADDITIONAL_OBJECTS += -L$(ICP_BUILD_OUTPUT)
+
+ ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libqat_s.so
+
+diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/Makefile
+index 8afa811..c82e02b 100644
+--- a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/Makefile
++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/dc_dp_sample/Makefile
+@@ -70,7 +70,7 @@ ifeq ($(ICP_OS_LEVEL),user_space)
+ # Build user space executible
+ #
+ ############################################################
+-ADDITIONAL_OBJECTS += -L/usr/Lib -lpthread -lcrypto
++ADDITIONAL_OBJECTS += -lpthread -lcrypto
+
+ USER_SOURCE_FILES += ../../common/cpa_sample_utils.c cpa_dc_dp_sample.c
+ USER_SOURCE_FILES += cpa_dc_dp_sample_user.c
+diff --git a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
+index 054bfe3..9d9fa7e 100644
+--- a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
++++ b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
+@@ -334,7 +334,7 @@ else
+ ADDITIONAL_OBJECTS += -lusdm -lqat
+ endif
+
+-ADDITIONAL_OBJECTS += -L/Lib -lpthread
++ADDITIONAL_OBJECTS += -lpthread
+ ADDITIONAL_OBJECTS += -lcrypto
+ ifeq ($(OS),linux)
+ ADDITIONAL_OBJECTS += -ludev
diff --git a/recipes-extended/qat/files/0001-usdm_drv-convert-mutex_lock-to-mutex_trylock-to-avio.patch b/recipes-extended/qat/files/0001-usdm_drv-convert-mutex_lock-to-mutex_trylock-to-avio.patch
new file mode 100644
index 0000000..00d984a
--- /dev/null
+++ b/recipes-extended/qat/files/0001-usdm_drv-convert-mutex_lock-to-mutex_trylock-to-avio.patch
@@ -0,0 +1,104 @@
+From 2a4c1dd6bedeb03e5a7a2d3d4ee73dbfdda0add2 Mon Sep 17 00:00:00 2001
+From: Liwei Song <liwei.song@windriver.com>
+Date: Thu, 22 Jul 2021 08:09:05 +0000
+Subject: [PATCH] usdm_drv: convert mutex_lock to mutex_trylock to aviod
+
+ deadlock
+
+exist the following deadlock when run cpa_sample_code:
+
+======================================================
+WARNING: possible circular locking dependency detected
+5.10.47-yocto-standard #1 Tainted: G O
+------------------------------------------------------
+
+cpa_sample_code/2144 is trying to acquire lock:
+ffffffffc04883d0 (&dev_mem_lock
+=============================
+){+.+.}-{3:3}, at: mem_mmap+0x32/0x160 [usdm_drv]
+
+but task is already holding lock:
+ff1ab034bf111278 (&mm->mmap_lock#2){++++}-{3:3}, at:
+vm_mmap_pgoff+0x99/0x100
+
+which lock already depends on the new lock.
+
+the existing dependency chain (in reverse order) is:
+
+-> #1 (&mm->mmap_lock#2){++++}-{3:3}:
+ __lock_acquire+0x4be/0x980
+ lock_acquire+0xe1/0x2f0
+WARNING: suspicious RCU usage
+ __might_fault+0x5e/0x80
+ _copy_to_user+0x23/0xa0
+ mem_ioctl+0x2ed/0x3b5 [usdm_drv]
+ __x64_sys_ioctl+0x91/0xc0
+ do_syscall_64+0x38/0x50
+ entry_SYSCALL_64_after_hwframe+0x44/0xa9
+5.10.47-yocto-standard #1 Tainted: G O
+
+-> #0 (&dev_mem_lock){+.+.}-{3:3}:
+ check_prev_add+0x95/0xc00
+ validate_chain+0x723/0xaa0
+ __lock_acquire+0x4be/0x980
+ lock_acquire+0xe1/0x2f0
+ __mutex_lock+0x97/0x960
+ mutex_lock_nested+0x1b/0x20
+ mem_mmap+0x32/0x160 [usdm_drv]
+-----------------------------
+ mmap_region+0x423/0x6b0
+ do_mmap+0x46a/0x5e0
+ vm_mmap_pgoff+0xc5/0x100
+ ksys_mmap_pgoff+0x1d0/0x230
+ __x64_sys_mmap+0x33/0x40
+ do_syscall_64+0x38/0x50
+ entry_SYSCALL_64_after_hwframe+0x44/0xa9
+kernel/sched/core.c:7263 Illegal context switch in RCU-bh read-side
+critical section!
+
+other info that might help us debug this:
+
+ Possible unsafe locking scenario:
+
+ CPU0 CPU1
+ ---- ----
+ lock(&mm->mmap_lock#2);
+ lock(&dev_mem_lock);
+ lock(&mm->mmap_lock#2);
+ lock(&dev_mem_lock);
+
+ *** DEADLOCK ***
+
+convert mutex_lock to mutex_trylock which will return without wait.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Liwei Song <liwei.song@windriver.com>
+---
+ .../utilities/libusdm_drv/linux/kernel_space/qae_mem_drv.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/quickassist/utilities/libusdm_drv/linux/kernel_space/qae_mem_drv.c b/quickassist/utilities/libusdm_drv/linux/kernel_space/qae_mem_drv.c
+index d73cb0d..06e5d15 100644
+--- a/quickassist/utilities/libusdm_drv/linux/kernel_space/qae_mem_drv.c
++++ b/quickassist/utilities/libusdm_drv/linux/kernel_space/qae_mem_drv.c
+@@ -87,6 +87,7 @@
+ #include <linux/uaccess.h>
+ #include <linux/version.h>
+ #include <linux/hugetlb.h>
++#include <linux/delay.h>
+
+ #include "qae_mem_utils.h"
+
+@@ -1049,7 +1050,10 @@ mem_mmap(struct file *fp, struct vm_area_struct *vma)
+ uint64_t pages = size >> PAGE_SHIFT;
+ id = vma->vm_pgoff << PAGE_SHIFT;
+
+- mutex_lock(&dev_mem_lock);
++ while(!mutex_trylock(&dev_mem_lock)){
++ udelay(5);
++ }
++
+ kmem = userMemGetInfo(fp, id);
+ if (!kmem)
+ {
diff --git a/recipes-extended/qat/files/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch b/recipes-extended/qat/files/0002-qat-remove-local-path-from-makefile.patch
index 96791cb..f3aa726 100644
--- a/recipes-extended/qat/files/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
+++ b/recipes-extended/qat/files/0002-qat-remove-local-path-from-makefile.patch
@@ -1,7 +1,7 @@
-From 1e29afc0e69fb9118cb0dcb924cdffa9db730572 Mon Sep 17 00:00:00 2001
+From b71895c04981f59bf90de608c08ca389b65ad5e9 Mon Sep 17 00:00:00 2001
From: Anuj Mittal <anujx.mittal@intel.com>
Date: Wed, 8 Jul 2015 11:11:32 +0800
-Subject: [PATCH] qat: remove local path from makefile
+Subject: [PATCH 02/11] qat: remove local path from makefile
Upstream-Status: Inappropriate [Configuration]
@@ -13,7 +13,7 @@ Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-index f7f18a5..e8c9f18 100644
+index c1504e1..7a27739 100644
--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
@@ -46,8 +46,7 @@
@@ -27,5 +27,5 @@ index f7f18a5..e8c9f18 100644
-I$(OSAL_DIR)/include \
-I$(OSAL_DIR)/src/linux/user_space/include
--
-2.14.4
+2.14.5
diff --git a/recipes-extended/qat/files/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch b/recipes-extended/qat/files/0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
index a25fdae..b61f270 100644
--- a/recipes-extended/qat/files/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
+++ b/recipes-extended/qat/files/0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
@@ -1,9 +1,9 @@
-From b21929c42aca4bc80f6c48b5ac31bf20165b2f3e Mon Sep 17 00:00:00 2001
+From 0a881aefea89006f21b82fcafc5a422b04fc0c9a Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
-Date: Fri, 25 Mar 2016 18:02:37 +0800
-Subject: [PATCH] qat: override CC LD AR only when it is not define
+Date: Mon, 12 Apr 2021 08:40:47 +0800
+Subject: [PATCH 03/11] qat: override CC LD AR only when it is not define
-Upstream-Status: Inappropriate [Configuration]
+Upstream-Status: Pending
To make sure that compiler linker and archiver will override only when
it is not defined by the environment.
@@ -14,7 +14,7 @@ Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quickassist/build_system/build_files/Core/ia.mk b/quickassist/build_system/build_files/Core/ia.mk
-index 4a4d123..f9aca23 100755
+index 230ee0f..f6fc755 100644
--- a/quickassist/build_system/build_files/Core/ia.mk
+++ b/quickassist/build_system/build_files/Core/ia.mk
@@ -67,9 +67,9 @@
@@ -29,6 +29,7 @@ index 4a4d123..f9aca23 100755
+AR ?= $(CROSS_COMPILE)ar
else
$(error MACHINE is undefined. Please set your target i.e. x86_64 \
- "-> setenv MACHINE x86_64 or export MACHINE=x86_64")
---
-1.9.1
+ "-> setenv MACHINE x86_64 or export MACHINE=x86_64")
+--
+2.14.5
+
diff --git a/recipes-extended/qat/files/qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch b/recipes-extended/qat/files/0004-update-KDIR-for-cross-compilation.patch
index 78fc44b..8812a96 100644
--- a/recipes-extended/qat/files/qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch
+++ b/recipes-extended/qat/files/0004-update-KDIR-for-cross-compilation.patch
@@ -1,7 +1,7 @@
-From ae306d58c1bfc3d1c01d0e54ecfbfbbce39a0d4e Mon Sep 17 00:00:00 2001
+From 2d73ce79ef1b05d11868c89f0095ce5920171593 Mon Sep 17 00:00:00 2001
From: "Tan, Raymond" <raymond.tan@intel.com>
Date: Wed, 30 May 2018 22:17:58 +0800
-Subject: [PATCH] update KDIR for cross-compilation
+Subject: [PATCH 04/11] update KDIR for cross-compilation
Upstream-Status: Inappropriate [Configuration]
@@ -14,12 +14,12 @@ Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/quickassist/qat/Makefile b/quickassist/qat/Makefile
-index ab9a381..8608378 100644
+index b31829a..2e490ba 100644
--- a/quickassist/qat/Makefile
+++ b/quickassist/qat/Makefile
-@@ -61,13 +61,13 @@ $(info Compiling with Heartbeat Failure Simulation feature)
+@@ -63,13 +63,13 @@ $(info Compiling with Heartbeat Failure Simulation feature)
endif
-
+
ifeq ($(KERNELRELEASE),)
-KDIR ?= $(INSTALL_MOD_PATH)/lib/modules/$(shell uname -r)/build
-ifneq ($(shell if [ -e $(KDIR)/include/config/auto.conf ]; then echo 1; fi),1)
@@ -32,7 +32,8 @@ index ab9a381..8608378 100644
-include $(KDIR)/include/config/auto.conf
+include $(KERNEL_BUILDDIR)/include/config/auto.conf
INSTALL_FW_PATH ?= $(INSTALL_MOD_PATH)/lib/firmware
-
+
default: modules
---
-1.9.1
+--
+2.14.5
+
diff --git a/recipes-extended/qat/files/qat17_0.8.0-37-qat-added-include-dir-path.patch b/recipes-extended/qat/files/0005-Added-include-dir-path.patch
index 431d5f7..237abb6 100644
--- a/recipes-extended/qat/files/qat17_0.8.0-37-qat-added-include-dir-path.patch
+++ b/recipes-extended/qat/files/0005-Added-include-dir-path.patch
@@ -1,28 +1,28 @@
-From bb3de86f5511d25dffb1722f9c82379c91a3bb16 Mon Sep 17 00:00:00 2001
+From 667d9fd3542fbeedadf949143e2abf3776cf2336 Mon Sep 17 00:00:00 2001
From: "Goh, Wen Sen" <wen.sen.goh@intel.com>
Date: Tue, 24 May 2016 16:05:12 +0800
-Subject: [PATCH] Added include dir path
+Subject: [PATCH 05/11] Added include dir path
Upstream-Status: Inappropriate [Configuration]
Make sure that we point to the correct include path to the local
headers
-
---
quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk | 1 +
1 file changed, 1 insertion(+)
diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-index 493d6e9..67b252a 100755
+index 7a27739..2f935ec 100644
--- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-@@ -84,6 +84,7 @@ INCLUDES+=-I$(API_DIR) \
-
+@@ -59,6 +59,7 @@ INCLUDES+=-I$(API_DIR) \
+
EXTRA_CFLAGS += $(cmd_line_cflags)
EXTRA_CFLAGS += -fno-strict-aliasing
+EXTRA_CFLAGS += $(INCLUDES)
EXTRA_LDFLAGS +=-whole-archive
-
+
ifeq ($(ARCH), i386)
---
-2.8.3
+--
+2.14.5
+
diff --git a/recipes-extended/qat/files/qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch b/recipes-extended/qat/files/0006-qat-add-install-target-and-add-folder.patch
index a810cfc..a40d0c0 100644
--- a/recipes-extended/qat/files/qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch
+++ b/recipes-extended/qat/files/0006-qat-add-install-target-and-add-folder.patch
@@ -1,4 +1,4 @@
-From a94af9df0fa6f2c41efaf7ef6c17d0e5bb8aa80d Mon Sep 17 00:00:00 2001
+From 9f4ddcc7ee9683cf766c83651762187f9f194c7b Mon Sep 17 00:00:00 2001
From: "Tan, Raymond" <raymond.tan@intel.com>
Date: Mon, 4 Jun 2018 09:26:33 +0800
Subject: [PATCH] qat-add-install-target-and-add-folder
@@ -14,18 +14,18 @@ Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/quickassist/Makefile b/quickassist/Makefile
-index 93990f2..70a4353 100644
+index 5e0418b..4ac824a 100644
--- a/quickassist/Makefile
+++ b/quickassist/Makefile
-@@ -97,6 +97,7 @@ ICP_BUILD_OUTPUT?=build_$(DATE)
- ICP_TOP_ENV=$(ICP_BUILDSYSTEM_PATH)/build_files/env_files/
- export ICP_ACCEL_INC=YES
+@@ -99,6 +99,7 @@ export ICP_PARAM_CHECK ?= y
+ export CNV_STRICT_MODE ?= 1
+ export QAT_LEGACY_ALGORITHMS ?= n
LAC_LIB_DIR=$(LAC_PATH)/build/libs
+MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/updates/drivers/crypto/qat
+
#Release Package build steps
- ALL_TARGETS = lac_user lac_kernel
-@@ -114,10 +115,14 @@ all: $(ALL_TARGETS)
+@@ -117,10 +118,14 @@ all: $(ALL_TARGETS)
user: lac_lib_dir libosal_user lac_user
@@ -42,7 +42,7 @@ index 93990f2..70a4353 100644
#
# Common memory driver
-@@ -200,8 +205,22 @@ ifeq ($(ICP_NO_CLEAN),)
+@@ -203,8 +208,22 @@ ifeq ($(ICP_NO_CLEAN),)
endif
diff --git a/recipes-extended/qat/files/build_fix.patch b/recipes-extended/qat/files/build_fix.patch
new file mode 100644
index 0000000..8f3d187
--- /dev/null
+++ b/recipes-extended/qat/files/build_fix.patch
@@ -0,0 +1,40 @@
+--- qat/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk 2023-12-06 17:31:40.099741000 +0800
++++ qat-new/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk 2024-01-17 17:44:35.946289745 +0800
+
+Here objective is to get object files in kernel space for the
+static library (libosal.a), but overwriting already defined obj-m to empty and
+passing KBUILD_BUILTIN=1 causing following failures:
+
+| make[3]: Entering directory 'build/tmp/work-shared/intel-corei7-64/kernel-source'
+| make[4]: Entering directory 'build/tmp/work-shared/intel-corei7-64/kernel-build-artifacts'
+| make[5]: *** No rule to make target 'vmlinux.o', needed by 'modpost'. Stop.
+| make[4]: *** [build/tmp/work-shared/intel-corei7-64/kernel-source/Makefile:234: __sub-make] Error 2
+| make[4]: Leaving directory 'build/tmp/work-shared/intel-corei7-64/kernel-build-artifacts'
+| make[3]: *** [Makefile:234: __sub-make] Error 2
+| make[3]: Leaving directory 'build/tmp/work-shared/intel-corei7-64/kernel-source'
+| Copying outputs
+| mv: cannot stat 'OsalServices.o': No such file or directory
+| mv: cannot stat 'OsalSemaphore.o': No such file or directory
+| mv: cannot stat 'OsalSpinLock.o': No such file or directory
+| mv: cannot stat 'OsalThread.o': No such file or directory
+| mv: cannot stat 'OsalAtomic.o': No such file or directory
+| mv: cannot stat 'OsalMemMgmt.o': No such file or directory
+| mv: cannot stat 'OsalIOMMUMgmt.o': No such file or directory
+| mv: cannot stat 'OsalUsrKrlProxy.o': No such file or directory
+| mv: cannot stat 'OsalCryptoInterface.o': No such file or directory
+
+Keeping this fix for now, until proper fix is available in upstream.
+
+Upstream-Status: Pending
+
+Signed-off-by: Naveen Saini <naveen.kumar.saini@intel.com>
+
+@@ -72,7 +72,7 @@
+
+ $(LIB_STATIC): dirs
+ @echo 'Creating static library ${LIB_STATIC}'; \
+- $(MAKE) -C $(KERNEL_SOURCE_ROOT)/ M=$(PWD) obj-m="" KBUILD_BUILTIN=1; \
++ $(MAKE) -C $(KERNEL_SOURCE_ROOT)/ M=$(PWD); \
+ echo 'Copying outputs';\
+ test -f lib.a && (ar -t lib.a | xargs ar -rcsD $(LIB_STATIC)); \
+ test -f $(LIB_STATIC) && mv -f $(LIB_STATIC) $($(PROG_ACY)_FINAL_OUTPUT_DIR)/$(LIB_STATIC); \
diff --git a/recipes-extended/qat/files/fix-redefinition-of-crypto_request_complete.patch b/recipes-extended/qat/files/fix-redefinition-of-crypto_request_complete.patch
new file mode 100644
index 0000000..3cdbd2f
--- /dev/null
+++ b/recipes-extended/qat/files/fix-redefinition-of-crypto_request_complete.patch
@@ -0,0 +1,37 @@
+From 2c1ac0417957a7656eaa0132bf632c9e5d6a94d7 Mon Sep 17 00:00:00 2001
+From: Lee Chee Yang <chee.yang.lee@intel.com>
+Date: Tue, 3 Oct 2023 15:07:42 +0800
+Subject: [PATCH] fix redefinition crypto_request_complete
+
+Fix :
+| /poky/build/tmp/work-shared/intel-corei7-64/kernel-source/include/crypto/algapi.h:268:20: error: redefinition of 'crypto_request_complete'
+| 268 | static inline void crypto_request_complete(struct crypto_async_request *req,
+| | ^~~~~~~~~~~~~~~~~~~~~~~
+| In file included from <command-line>:
+
+linux kernel backported crypto_request_complete to 6.1.29 and 5.15.112.
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/include/crypto?h=linux-6.1.y&id=c35e03eaece71101ff6cbf776b86403860ac8cc3
+https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.15.y&id=e7ce4ba11635ef23aa7ad40b4b9f9c52ef15f9e2
+
+Upstream-Status: Pending
+
+Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com>
+
+---
+ quickassist/qat/compat/qat_compat.h | 3 +-
+ 1 file changed, 2 insertion(+), 1 deletion(-)
+
+diff --git a/quickassist/qat/compat/qat_compat.h b/quickassist/qat/compat/qat_compat.h
+index 8fcd14a..51b8098 100644
+--- a/quickassist/qat/compat/qat_compat.h
++++ b/quickassist/qat/compat/qat_compat.h
+@@ -510,7 +511,8 @@ static inline void pci_ignore_hotplug(struct pci_dev *dev)
+ void kfree_sensitive(const void *p);
+ #endif
+
+-#if (KERNEL_VERSION(6, 3, 0) > LINUX_VERSION_CODE)
++#if (KERNEL_VERSION(6, 1, 29) > LINUX_VERSION_CODE && KERNEL_VERSION(6, 1, 0) < LINUX_VERSION_CODE ) || \
++ (KERNEL_VERSION(5, 15, 112) > LINUX_VERSION_CODE)
+ static inline void crypto_request_complete(struct crypto_async_request *req,
+ int err)
+ {
diff --git a/recipes-extended/qat/files/qat-remove-the-deprecated-pci-dma-compat.h-API.patch b/recipes-extended/qat/files/qat-remove-the-deprecated-pci-dma-compat.h-API.patch
new file mode 100644
index 0000000..256634c
--- /dev/null
+++ b/recipes-extended/qat/files/qat-remove-the-deprecated-pci-dma-compat.h-API.patch
@@ -0,0 +1,342 @@
+From 1e0c49ea396926ed752ec179f5391532d83b195d Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <yongxin.liu@windriver.com>
+Date: Tue, 10 May 2022 09:13:39 +0800
+Subject: [PATCH 2/2] qat: remove the deprecated "pci-dma-compat.h" API
+
+In kernel commit 7968778914e5 ("PCI: Remove the deprecated "pci-dma-compat.h"
+API), all usages of the functions defined in "pci-dma-compat.h" have been
+removed.
+
+Upstream-Status: Inappropriate [Code released in tarball form only]
+
+Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
+---
+ quickassist/qat/drivers/crypto/qat/qat_200xx/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_200xxvf/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c3xxx/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c4xxx/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c4xxxvf/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c62x/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_c62xvf/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_d15xx/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_d15xxvf/adf_drv.c | 8 ++++----
+ quickassist/qat/drivers/crypto/qat/qat_dh895xcc/adf_drv.c | 8 ++++----
+ .../qat/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c | 8 ++++----
+ 12 files changed, 48 insertions(+), 48 deletions(-)
+
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_200xx/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_200xx/adf_drv.c
+index 6c8cf02..e1a600f 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_200xx/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_200xx/adf_drv.c
+@@ -187,17 +187,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_200XX_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_200xxvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_200xxvf/adf_drv.c
+index 4bef020..7d1c2c3 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_200xxvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_200xxvf/adf_drv.c
+@@ -158,17 +158,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_200XXVF_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c3xxx/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c3xxx/adf_drv.c
+index 36a0127..1ce14a4 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c3xxx/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c3xxx/adf_drv.c
+@@ -190,17 +190,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C3XXX_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
+index dd7062f..313f8cd 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c3xxxvf/adf_drv.c
+@@ -158,17 +158,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C3XXXVF_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c4xxx/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c4xxx/adf_drv.c
+index 5398dcf..c335363 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c4xxx/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c4xxx/adf_drv.c
+@@ -178,17 +178,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C4XXX_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c4xxxvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c4xxxvf/adf_drv.c
+index b6b8a13..05c1ba7 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c4xxxvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c4xxxvf/adf_drv.c
+@@ -157,17 +157,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C4XXXVF_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c62x/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c62x/adf_drv.c
+index b401f4b..783d059 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c62x/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c62x/adf_drv.c
+@@ -181,17 +181,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if ((dma_set_mask(&pdev->dev, DMA_BIT_MASK(32)))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C62X_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_c62xvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_c62xvf/adf_drv.c
+index d3cf233..2c03cb4 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_c62xvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_c62xvf/adf_drv.c
+@@ -163,17 +163,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_C62XVF_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_d15xx/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_d15xx/adf_drv.c
+index dbe26b1..9a1e4a2 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_d15xx/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_d15xx/adf_drv.c
+@@ -176,17 +176,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_D15XX_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_d15xxvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_d15xxvf/adf_drv.c
+index c47e9d9..859437f 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_d15xxvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_d15xxvf/adf_drv.c
+@@ -158,17 +158,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_D15XXVF_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_dh895xcc/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_dh895xcc/adf_drv.c
+index 22c0bbf..2f2e941 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_dh895xcc/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_dh895xcc/adf_drv.c
+@@ -176,17 +176,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev,DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_DH895XCC_DEVICE_NAME)) {
+diff --git a/quickassist/qat/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c b/quickassist/qat/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
+index 92b7985..ae0f459 100644
+--- a/quickassist/qat/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
++++ b/quickassist/qat/drivers/crypto/qat/qat_dh895xccvf/adf_drv.c
+@@ -156,17 +156,17 @@ static int adf_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
+ }
+
+ /* set dma identifier */
+- if (pci_set_dma_mask(pdev, DMA_BIT_MASK(48))) {
+- if ((pci_set_dma_mask(pdev, DMA_BIT_MASK(32)))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(48))) {
++ if (dma_set_mask(&pdev->dev, DMA_BIT_MASK(32))) {
+ dev_err(&pdev->dev, "No usable DMA configuration\n");
+ ret = -EFAULT;
+ goto out_err_disable;
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
+ }
+
+ } else {
+- pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(48));
++ dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(48));
+ }
+
+ if (pci_request_regions(pdev, ADF_DH895XCCVF_DEVICE_NAME)) {
+--
+2.34.1
+
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
deleted file mode 100644
index 2f794ce..0000000
--- a/recipes-extended/qat/files/qat16-Osal-fix-build-with-x32.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 8da85286efc86b4f5bbf14f755c84d1982841973 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anuj.mittal@intel.com>
-Date: Wed, 3 Jan 2018 15:45:59 +0800
-Subject: [PATCH] Osal: fix build with x32
-
-x32 follows ILP32 model and has __x86_64__ defined too. Make sure
-that we check for ILP32 also before using architecture dependent
-types.
-
-Upstream-Status: Accepted [Code released in tarball form only]
-
-Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
----
- quickassist/adf/platform/include/adf_platform_common.h | 2 +-
- quickassist/utilities/osal/include/OsalTypes.h | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/quickassist/adf/platform/include/adf_platform_common.h b/quickassist/adf/platform/include/adf_platform_common.h
-index 8673ec1..de5c31a 100755
---- a/quickassist/adf/platform/include/adf_platform_common.h
-+++ b/quickassist/adf/platform/include/adf_platform_common.h
-@@ -207,7 +207,7 @@
- * xx refers to arch, i.e.64bit or 32bit
- * yy refers to number of bytes copied from src to dst, i.e. 64 or 128 bytes
- */
--#ifdef __x86_64__
-+#if (defined (__x86_64__) && !defined (__ILP32__))
- #define adf_memcpy64_64(dst, src)\
- do { \
- __asm__ __volatile__ ( \
-diff --git a/quickassist/utilities/osal/include/OsalTypes.h b/quickassist/utilities/osal/include/OsalTypes.h
-index d8fa1d9..eaf08bf 100755
---- a/quickassist/utilities/osal/include/OsalTypes.h
-+++ b/quickassist/utilities/osal/include/OsalTypes.h
-@@ -160,13 +160,13 @@ typedef volatile INT32 VINT32;
- */
- #define OSAL_HUNDRED (100)
-
--#ifdef __x86_64__
-+#if (defined (__x86_64__) && !defined (__ILP32__))
- #define ARCH_INT INT64
- #else
- #define ARCH_INT INT32
- #endif
-
--#ifdef __x86_64__
-+#if (defined (__x86_64__) && !defined (__ILP32__))
- #define UARCH_INT UINT64
- #else
- #define UARCH_INT UINT32
---
-2.7.4
-
diff --git a/recipes-extended/qat/files/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch b/recipes-extended/qat/files/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch
deleted file mode 100644
index e1ed3fc..0000000
--- a/recipes-extended/qat/files/qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 83f465ee776868875f6c19c2110eed4db6c547ce Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anujx.mittal@intel.com>
-Date: Thu, 10 Sep 2015 11:58:44 +0800
-Subject: [PATCH] qat: make sure CFLAGS are correct
-
-Upstream-Status: Submitted
-
-Ensure that all the CFLAGS values are being considered.
-
-Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
----
- quickassist/adf/user/user_proxy/src/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/quickassist/adf/user/user_proxy/src/Makefile b/quickassist/adf/user/user_proxy/src/Makefile
-index 868313a..efd352c 100644
---- a/quickassist/adf/user/user_proxy/src/Makefile
-+++ b/quickassist/adf/user/user_proxy/src/Makefile
-@@ -133,7 +133,7 @@ INCLUDES+= -I$(ADF_DIR)/include \
- -I$(ADF_PLATFORM_DIR)/include \
- -I$(ADF_CTL_DIR)/include
-
--CFLAGS = -D_GNU_SOURCE -O2 $(INCLUDES)
-+CFLAGS += -D_GNU_SOURCE -O2 $(INCLUDES)
- #needed by SAL
- EXTRA_CFLAGS += -fPIC -fno-strict-aliasing
- #include your $(ICP_OS)_$(ICP_OS_LEVEL).mk file
---
-1.7.9.5
-
diff --git a/recipes-extended/qat/files/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch b/recipes-extended/qat/files/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch
deleted file mode 100644
index b7b77d0..0000000
--- a/recipes-extended/qat/files/qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 340701a0f44e70eafd9029e9186b74e8783f2afd Mon Sep 17 00:00:00 2001
-From: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
-Date: Mon, 6 Jul 2015 15:57:20 +0800
-Subject: [PATCH] qat: fix for cross-compilation issue
-
-Upstream-Status: Inappropriate [Configuration]
-
-Ensure that we are not using host compiler.
-
-Signed-off-by: venkatasubramanian pattu <venkatasubramanianx.pattu@intel.com>
-Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
----
- .../dc/stateless_multi_op_checksum_sample/Makefile | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
-index 01590c3..315fca7 100644
---- a/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
-+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/dc/stateless_multi_op_checksum_sample/Makefile
-@@ -111,7 +111,7 @@ else
- ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libicp_qa_al_s.so
- endif
-
--ADDITIONAL_OBJECTS += -L/usr/Lib -lpthread -lcrypto
-+ADDITIONAL_OBJECTS += -lpthread -lcrypto
-
- USER_SOURCE_FILES = ../../common/cpa_sample_utils.c cpa_dc_stateless_multi_op_checksum_sample.c
- USER_SOURCE_FILES += ../stateless_sample/cpa_dc_sample_user.c
-@@ -127,7 +127,7 @@ else
- endif
-
- default: clean
-- gcc -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
-+ $(CC) -Wall -O1 $(USER_INCLUDES) -DUSER_SPACE $(EXTRA_CFLAGS) \
- $(USER_SOURCE_FILES) $(ADDITIONAL_OBJECTS) -o $(OUTPUT_NAME)
-
- clean:
---
-1.7.9.5
-
diff --git a/recipes-extended/qat/files/qat16_2.5.0-80-qat-Added-include-dir-path.patch b/recipes-extended/qat/files/qat16_2.5.0-80-qat-Added-include-dir-path.patch
deleted file mode 100644
index a538930..0000000
--- a/recipes-extended/qat/files/qat16_2.5.0-80-qat-Added-include-dir-path.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 142bf81912701d94985ad656c2250650113d00de Mon Sep 17 00:00:00 2001
-From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
-Date: Tue, 22 Mar 2016 01:44:09 +0800
-Subject: [PATCH 2/2] qat: Added include dir path
-
-Upstream-Status: Inappropriate [Configuration]
-
-Make sure that we point to the correct include path to the local
-headers.
-
-Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
----
- quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-index b504f7f..a75f152 100755
---- a/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-+++ b/quickassist/build_system/build_files/env_files/linux_2.6_user_space.mk
-@@ -84,6 +84,7 @@ INCLUDES+=-I$(API_DIR) \
-
- EXTRA_CFLAGS += $(cmd_line_cflags)
- EXTRA_CFLAGS += -fno-strict-aliasing
-+EXTRA_CFLAGS += $(INCLUDES)
- EXTRA_LDFLAGS +=-whole-archive
-
- ifeq ($(ARCH), i386)
---
-1.9.1
-
diff --git a/recipes-extended/qat/files/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch b/recipes-extended/qat/files/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch
deleted file mode 100644
index b427799..0000000
--- a/recipes-extended/qat/files/qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From f056dbedd106e03860de66d5c84cd018da087dda Mon Sep 17 00:00:00 2001
-From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
-Date: Tue, 22 Mar 2016 00:59:36 +0800
-Subject: [PATCH 1/2] qat: change in return type of func in kernel v4.4
-
-Upstream-Status: Submitted
-
-The function 'seq_puts' return type is changed from 'int' to 'void'.
-Now use of 'ret' variable is not valid. So used another condition to check
-for overflow.
-
-Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
----
- quickassist/adf/drivers/common/linux/src/adf_proc_debug.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
-index 7d81eaa..a1dd917 100755
---- a/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
-+++ b/quickassist/adf/drivers/common/linux/src/adf_proc_debug.c
-@@ -132,13 +132,13 @@ static int adf_debug_show(struct seq_file *sfile, void *v)
- {
- debug_file_info_t* file_info = sfile->private;
- if (file_info && file_info->seq_read && file_info->page) {
-- int ret = 0, old_offset = file_info->offset;
-+ int old_offset = file_info->offset;
- file_info->offset =
- file_info->seq_read(file_info->private_data,
- file_info->page, PAGE_SIZE - 1,
- file_info->offset);
-- ret = seq_puts(sfile, (char*)file_info->page);
-- if (ret) {
-+ seq_puts(sfile, (char*)file_info->page);
-+ if (sfile->count == sfile->size) {
- /* run out of space - need to reprint */
- file_info->offset = old_offset;
- }
---
-1.9.1
-
diff --git a/recipes-extended/qat/files/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch b/recipes-extended/qat/files/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch
deleted file mode 100644
index 3960022..0000000
--- a/recipes-extended/qat/files/qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch
+++ /dev/null
@@ -1,353 +0,0 @@
-From f53aeef0ae6a89066cca8c9a9154e70408f6ef68 Mon Sep 17 00:00:00 2001
-From: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
-Date: Thu, 24 Mar 2016 01:11:02 +0800
-Subject: [PATCH] qat: add install target to makefiles
-
-Upstream-Status: Inappropriate [Configuration]
-
-Added an install target to makefiles to help
-install ingredients at a proper path.
-
-Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
----
- quickassist/Makefile | 29 ++++++---
- .../access_layer/src/sample_code/Makefile | 19 ++++--
- .../src/sample_code/functional/Makefile | 74 ++++++++++++----------
- 3 files changed, 75 insertions(+), 47 deletions(-)
-
-diff --git a/quickassist/Makefile b/quickassist/Makefile
-index 6c5d436..0a1ee4c 100644
---- a/quickassist/Makefile
-+++ b/quickassist/Makefile
-@@ -109,7 +109,7 @@ ifdef WITH_CPA_MUX
- ALL_TARGETS = clean lac_lib_dir libosal libosal_user qat_mux hal adf adf_user lac lac_user qat-fw install_scripts
- ALL_TARGETS_CI = lac_lib_dir qat_mux_ci lac_ci lac_user_ci qat-fw install_scripts
- else
--ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user qat-fw install_scripts
-+ALL_TARGETS = clean lac_lib_dir libosal libosal_user hal adf adf_user lac lac_user
- ALL_TARGETS_CI = lac_lib_dir lac_ci lac_user_ci qat-fw install_scripts
- endif
- ICP_ARCH_USER?=`uname -m`
-@@ -125,7 +125,16 @@ all_ci: $(ALL_TARGETS_CI)
- @echo 'Build Done';
-
- user: lac_lib_dir libosal_user adf_user lac_user
--kernel: lac_lib_dir libosal hal adf lac qat-fw install_scripts
-+kernel: lac_lib_dir libosal hal adf lac qat-fw
-+
-+install: qat-fw install_scripts
-+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
-+ @cp $(OSAL_PATH)/src/build/linux_2.6/user_space/libosal.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
-+ @cp $(ADF_PATH)/build/linux_2.6/libadf_proxy.a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
-+ @cp $(ADF_PATH)/build/linux_2.6/adf_ctl $(ICP_BUILD_OUTPUT)/etc/init.d/;
-+ @cp $(LAC_PATH)/src/build/linux_2.6/kernel_space/$(DRIVER) $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
-+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
-+ @cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/$(DEST_LIBDIR);
-
- install_scripts:
- @echo ; echo 'Copying Install Scripts';
-@@ -133,10 +142,10 @@ ifdef WITH_CPA_MUX
- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service_mux $(ICP_BUILD_OUTPUT)/qat_service;
- endif
- ifndef WITH_CPA_MUX
-- @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/;
-+ @cp $(ICP_BUILDSYSTEM_PATH)/build_files/qat_service $(ICP_BUILD_OUTPUT)/etc/init.d;
- endif
-- @chmod 750 $(ICP_BUILD_OUTPUT)/qat_service;
-- @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/;
-+ @chmod 750 $(ICP_BUILD_OUTPUT)/etc/init.d/qat_service;
-+ @cp $(CONFIG_PATH)/dh895xcc_qa_dev0.conf $(ICP_BUILD_OUTPUT)/etc/;
- # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev1.conf $(ICP_BUILD_OUTPUT)/;
- # @cp $(CONFIG_PATH)/dh89xxcc_qa_dev0_single_accel.conf $(ICP_BUILD_OUTPUT)/;
-
-@@ -233,7 +242,7 @@ lac_user: output_dir libosal_user adf_user
- @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_static ICP_OS_LEVEL=user_space;
- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME).a $(ICP_BUILD_OUTPUT)/;
- @cd $(LAC_PATH) && export ICP_ENV_DIR=$(ICP_TOP_ENV) && export ONE_KO_RELEASE_PACKAGE=1 && cd src && $(MAKE) ARCH=$(ICP_ARCH_USER) lib_shared ICP_OS_LEVEL=user_space;
-- cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT)/;
-+ cp $(LAC_PATH)/src/build/linux_2.6/user_space/lib$(BASENAME)_s.so $(ICP_BUILD_OUTPUT);
-
- lac_user_ci: output_dir
- @echo ; echo 'Building LAC in user space';
-@@ -244,9 +253,9 @@ lac_user_ci: output_dir
-
- qat-fw: output_dir
- @echo ; echo 'Copying QAT-FW Binary';
-- @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/mof_firmware.bin;
-+ @cp -f $(QAT_FW_PATH)/icp_qat_ae.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mof_firmware.bin;
- @echo ; echo 'Copying MMP Binary';
-- @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/mmp_firmware.bin;
-+ @cp -f $(QAT_FW_PATH)/icp_qat_pke.mof $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR)/mmp_firmware.bin;
-
- qat_mux: output_dir libosal
- @echo ; echo 'Building qat_mux module'
-@@ -306,6 +315,10 @@ endif
-
- output_dir:
- test -d $(ICP_BUILD_OUTPUT) || mkdir -p $(ICP_BUILD_OUTPUT);
-+ test -d $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR) || mkdir -p $(ICP_BUILD_OUTPUT)$(DEST_LIBDIR);
-+ test -d $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR) || mkdir -p $(ICP_BUILD_OUTPUT)/lib/firmware/$(ICP_FIRMWARE_DIR);
-+ test -d $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers || mkdir -p $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
-+ test -d $(ICP_BUILD_OUTPUT)/etc/init.d || mkdir -p $(ICP_BUILD_OUTPUT)/etc/init.d;
-
- lac_lib_dir:
- test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR);
-diff --git a/quickassist/lookaside/access_layer/src/sample_code/Makefile b/quickassist/lookaside/access_layer/src/sample_code/Makefile
-index c66ecfb..4cc3dbf 100644
---- a/quickassist/lookaside/access_layer/src/sample_code/Makefile
-+++ b/quickassist/lookaside/access_layer/src/sample_code/Makefile
-@@ -89,6 +89,7 @@ SAMPLE_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code
- PERF_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance
- FIPS_PATH?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/fips
- FUNC_PATH=$(SAMPLE_PATH)/functional
-+FIPS_OUTPUT_NAME=fips_sample
-
- #include the makefile with all the default and common Make variable definitions
- include $(ICP_BUILDSYSTEM_PATH)/build_files/common.mk
-@@ -100,6 +101,8 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
-
- output_dir:
- test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
-+ test -d $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR) || mkdir -p $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)
-+
- fips_code:
- @if test -d $(FIPS_PATH); then echo ; echo 'Building FIPS Code'; fi;
- @if test -d $(FIPS_PATH); \
-@@ -154,14 +157,11 @@ perf_all: $(PERF_ALL)
- perf_user: output_dir
- @echo ; echo "Building perf_user";
- @cd $(PERF_PATH) && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ARCH=$(ICP_ARCH_USER) ICP_OS_LEVEL=user_space lib_shared exe
-- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)/;
-- @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)/;
-
- perf_kernel: output_dir
- @echo ; echo "Building perf_kernel";
- @cd $(PERF_PATH) && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
--
-+
- common_mem_drv_kernel: output_dir
- @echo ; echo "Building common_mem_drv kernel space";
- @cd $(CMN_ROOT) && $(MAKE) ICP_OS_LEVEL=user_space cm_kernel
-@@ -175,12 +175,19 @@ common_mem_drv_user: output_dir
- perf_qae: output_dir
- @echo ; echo "Building perf_qae";
- @cd $(CMN_ROOT)/linux/kernel_space && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(SAMPLE_BUILD_OUTPUT)/;
--
-
- func: output_dir
- @cd $(FUNC_PATH) && $(MAKE) all;
-
-+install: output_dir
-+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
-+ @cp $(PERF_PATH)/build/linux_2.6/user_space/$(PERF_OUTPUT_NAME) $(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR);
-+ @cp $(PERF_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(PERF_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
-+ @cp $(CMN_ROOT)/linux/kernel_space/build/linux_2.6/$(ICP_OS_LEVEL)/$(CMN_MODULE_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
-+ @cp $(FIPS_PATH)/build/linux_2.6/$(ICP_OS_LEVEL)/$(FIPS_OUTPUT_NAME).ko $(ICP_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers;
-+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME)_s.so $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
-+ @cp $(FIPS_PATH)/build/linux_2.6/user_space/$(FIPS_OUTPUT_NAME).a $(SAMPLE_BUILD_OUTPUT)$(DEST_LIBDIR);
-+ @cd $(FUNC_PATH) && $(MAKE) install;
-
- all: $(MEM_DRIVER) fips_code perf_user perf_kernel func
- perf: $(MEM_DRIVER) perf_kernel
-diff --git a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
-index 3208acf..41754e8 100644
---- a/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
-+++ b/quickassist/lookaside/access_layer/src/sample_code/functional/Makefile
-@@ -64,6 +64,8 @@ SYM_PATH?=$(SAMPLE_PATH)/sym
- ASYM_PATH?=$(SAMPLE_PATH)/asym
- ICP_API_DIR?=$(ICP_ROOT)/quickassist/include/
- ICP_LAC_DIR?=$(ICP_ROOT)/quickassist/lookaside/access_layer/
-+BIN_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)$(DEST_BINDIR)/
-+MODULE_INSTALLPATH=$(SAMPLE_BUILD_OUTPUT)/lib/modules/$(QAT_KERNEL_VER)/kernel/drivers
-
- CMN_ROOT?=$(ICP_ROOT)/quickassist/lookaside/access_layer/src/sample_code/performance/qae/
- CMN_MODULE_NAME?=qaeMemDrv
-@@ -105,6 +107,7 @@ SAMPLE_BUILD_OUTPUT?=$(SAMPLE_PATH)/build
-
- output_dir:
- test -d $(SAMPLE_BUILD_OUTPUT) || mkdir $(SAMPLE_BUILD_OUTPUT);
-+ test -d $(BIN_INSTALLPATH) || mkdir -p $(BIN_INSTALLPATH);
-
- BUILD_DC=dc_dp_sample stateless_sample stateful_sample \
- stateless_multi_op_checksum_sample
-@@ -114,31 +117,23 @@ dc: $(BUILD_DC)
-
- dc_dp_sample: output_dir
- @cd $(DC_PATH)/dc_dp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(DC_PATH)/dc_dp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- stateless_sample: output_dir
- @cd $(DC_PATH)/stateless_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(DC_PATH)/stateless_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- stateful_sample: output_dir
- @cd $(DC_PATH)/stateful_sample && $(MAKE) clean ICP_OS_LEVEL=user_space && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(SAMPLE_BUILD_OUTPUT)/;
-- @cp $(DC_PATH)/stateful_sample/paper4 $(SAMPLE_BUILD_OUTPUT)/;
-
- stateless_multi_op_checksum_sample: output_dir
- @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(DC_PATH)/stateless_multi_op_checksum_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- BUILD_SYN=algchaining_sample ccm_sample cipher_sample \
-@@ -154,86 +149,65 @@ sym:$(BUILD_SYN)
- @echo ; echo "Build sym component";
- algchaining_sample: output_dir
- @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/alg_chaining_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- ccm_sample: output_dir
- @cd $(SYM_PATH)/ccm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/ccm_sample/ccm_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/ccm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- cipher_sample: output_dir
- @cd $(SYM_PATH)/cipher_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/cipher_sample/cipher_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/cipher_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- drbg_sample: output_dir
- @cd $(SYM_PATH)/drbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/drbg_sample/drbg_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/drbg_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- gcm_sample: output_dir
- @cd $(SYM_PATH)/gcm_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/gcm_sample/gcm_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/gcm_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- hash_file_sample: output_dir
- @cd $(SYM_PATH)/hash_file_sample && $(MAKE) clean ICP_OS_LEVEL=user_space&& $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(SAMPLE_BUILD_OUTPUT)/;
-
- hash_sample: output_dir
- @cd $(SYM_PATH)/hash_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/hash_sample/hash_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/hash_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- ipsec_sample: output_dir
- @cd $(SYM_PATH)/ipsec_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/ipsec_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- nrbg_sample: output_dir
- @cd $(SYM_PATH)/nrbg_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/nrbg_sample && $(MAKE) && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- ssl_sample: output_dir
- @cd $(SYM_PATH)/ssl_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/ssl_sample/ssl_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/ssl_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- sym_dp_sample: output_dir
- @cd $(SYM_PATH)/symdp_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(SYM_PATH)/symdp_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- BUILD_ASYM=diffie_hellman_sample prime_sample
-@@ -243,18 +217,52 @@ asym: $(BUILD_ASYM)
-
- diffie_hellman_sample: output_dir
- @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(ASYM_PATH)/diffie_hellman_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
- endif
-
- prime_sample: output_dir
- @cd $(ASYM_PATH)/prime_sample && $(MAKE) clean && $(MAKE) ICP_OS_LEVEL=user_space
-- @cp $(ASYM_PATH)/prime_sample/prime_sample $(SAMPLE_BUILD_OUTPUT)/;
- ifneq ($(WITH_UPSTREAM),1)
- @cd $(ASYM_PATH)/prime_sample && $(MAKE) ICP_OS_LEVEL=kernel_space
-- @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(SAMPLE_BUILD_OUTPUT)/;
-+endif
-+
-+install: output_dir
-+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample $(BIN_INSTALLPATH);
-+ @cp $(DC_PATH)/stateful_sample/dc_stateful_sample $(BIN_INSTALLPATH);
-+ @cp $(DC_PATH)/stateful_sample/paper4 $(BIN_INSTALLPATH);
-+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample $(BIN_INSTALLPATH);
-+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample $(BIN_INSTALLPATH);
-+ @cp $(ASYM_PATH)/prime_sample/prime_sample $(BIN_INSTALLPATH);
-+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/ssl_sample/ssl_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/hash_file_sample/hash_file_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/hash_sample/hash_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/gcm_sample/gcm_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/ccm_sample/ccm_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/drbg_sample/drbg_sample $(BIN_INSTALLPATH);
-+ @cp $(SYM_PATH)/cipher_sample/cipher_sample $(BIN_INSTALLPATH);
-+
-+ifneq ($(WITH_UPSTREAM),1)
-+ @cp $(DC_PATH)/stateless_multi_op_checksum_sample/dc_stateless_multi_op_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(DC_PATH)/dc_dp_sample/dc_dp_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(DC_PATH)/stateless_sample/dc_stateless_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(ASYM_PATH)/prime_sample/prime_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(ASYM_PATH)/diffie_hellman_sample/dh_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/symdp_sample/sym_dp_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/ssl_sample/ssl_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/nrbg_sample/nrbg_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/ipsec_sample/ipsec_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/hash_sample/hash_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/gcm_sample/gcm_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/alg_chaining_sample/algchaining_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/ccm_sample/ccm_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/drbg_sample/drbg_sample.ko $(MODULE_INSTALLPATH);
-+ @cp $(SYM_PATH)/cipher_sample/cipher_sample.ko $(MODULE_INSTALLPATH);
- endif
-
- CLEAN_DC=clean_dc_dp_sample clean_stateless_sample \
---
-1.9.1
-
diff --git a/recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch b/recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
deleted file mode 100644
index f786a10..0000000
--- a/recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 026fd275834ac4e345464c8ce2b0163d052d0262 Mon Sep 17 00:00:00 2001
-From: "Tan, Raymond" <raymond.tan@intel.com>
-Date: Wed, 30 May 2018 13:27:03 +0800
-Subject: [PATCH] qat-use-static-lib-for-linking-under-cpa-sample-code
-
-Upstream-Status: Inappropriate [Configuration]
-
-Update linking target to use stalib library instead, to mitigate error on
-hidden symbol "__ctzdi2" being referenced by shared lib (SO) during intel-core2-32 build.
-
-Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
----
- quickassist/lookaside/access_layer/src/sample_code/performance/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
-index 3a0fb37..5b7b3fa 100644
---- a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
-+++ b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
-@@ -209,7 +209,7 @@ ifeq ($(WITH_CMDRV),1)
- ifeq ($(WITH_ICP_TARGET),1)
- ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libqae_mem.a
- else
-- ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libusdm_drv_s.so
-+ ADDITIONAL_OBJECTS += $(ICP_BUILD_OUTPUT)/libusdm_drv.a
- endif
- endif
- #endif
---
-1.9.1
diff --git a/recipes-extended/qat/files/qat17_4.7.0-00006-Drop-pr_warning-definition.patch b/recipes-extended/qat/files/qat17_4.7.0-00006-Drop-pr_warning-definition.patch
deleted file mode 100644
index 6b816df..0000000
--- a/recipes-extended/qat/files/qat17_4.7.0-00006-Drop-pr_warning-definition.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 058673d6798b835dce7f27fe172b7727bbaf30cf Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <yongxin.liu@windriver.com>
-Date: Wed, 15 Jan 2020 15:25:15 +0000
-Subject: [PATCH] qat: Drop pr_warning definition
-
-In mainline kernel commit 61ff72f40168 ("printk: Drop pr_warning
-definition"), pr_warning was dropped.
-
-Upstream-Status: Inappropriate [Code released in tarball form only]
-
-Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
----
- quickassist/utilities/libusdm_drv/linux/include/qae_mem_utils.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/quickassist/utilities/libusdm_drv/linux/include/qae_mem_utils.h b/quickassist/utilities/libusdm_drv/linux/include/qae_mem_utils.h
-index f4a56dc..d88e762 100644
---- a/quickassist/utilities/libusdm_drv/linux/include/qae_mem_utils.h
-+++ b/quickassist/utilities/libusdm_drv/linux/include/qae_mem_utils.h
-@@ -93,7 +93,7 @@ MALLOC_DECLARE(M_QAE_MEM);
-
- #define mm_info(...) pr_info(USDM_MOD __VA_ARGS__)
-
--#define mm_warning(...) pr_warning(USDM_MOD __VA_ARGS__)
-+#define mm_warning(...) pr_warn(USDM_MOD __VA_ARGS__)
-
- /*define types which need to vary between 32 and 64 bit*/
- #define QAE_PAGE_SHIFT 12
---
-2.24.1
-
diff --git a/recipes-extended/qat/files/qat17_4.7.0-00006-Link-driver-with-object-files.patch b/recipes-extended/qat/files/qat17_4.7.0-00006-Link-driver-with-object-files.patch
deleted file mode 100644
index 0780426..0000000
--- a/recipes-extended/qat/files/qat17_4.7.0-00006-Link-driver-with-object-files.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 555a4b3605e983e492f8c67e38a094933bc7efcd Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <yongxin.liu@windriver.com>
-Date: Mon, 6 Jan 2020 09:26:39 +0800
-Subject: [PATCH] qat: Link driver with object files instead of archived files
-
-Due to mainline kernel commit 69ea912fda7 ("kbuild: remove unneeded
-link_multi_deps"), modules cannot link *.a archives. So change .a to
-.o files.
-
-Upstream-Status: Inappropriate [Temporary workaround for kernel later than
-v4.19-rc3]
-
-Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
-
----
- quickassist/Makefile | 2 ++
- .../lookaside/access_layer/src/Makefile | 21 +++++++++----------
- 2 files changed, 12 insertions(+), 11 deletions(-)
-
-diff --git a/quickassist/Makefile b/quickassist/Makefile
-index 70a4353..5f6ee46 100644
---- a/quickassist/Makefile
-+++ b/quickassist/Makefile
-@@ -154,6 +154,7 @@ libosal_kernel: clean output_dir lac_lib_dir
- echo ; echo 'Copying OSAL library';
- cp $(OSAL_PATH)/src/linux/kernel_space/build/linux_2.6/kernel_space/libosal.a $(ICP_BUILD_OUTPUT)/libosal_kernel.a;
- cp $(OSAL_PATH)/src/linux/kernel_space/build/linux_2.6/kernel_space/libosal.a $(LAC_LIB_DIR)/;
-+ cp $(OSAL_PATH)/src/linux/kernel_space/build/linux_2.6/kernel_space/*.o $(LAC_LIB_DIR)/;
-
-
- #build linux qat_direct layer
-@@ -169,6 +170,7 @@ qat_kernel: clean output_dir lac_lib_dir libosal_kernel cmn_ko
- echo ; echo 'Copying qat_kernel library';
- cp $(KERNEL_PATH)/src/build/linux_2.6/kernel_space/libadf_kernel.a $(ICP_BUILD_OUTPUT)/;
- cp $(KERNEL_PATH)/src/build/linux_2.6/kernel_space/libadf_kernel.a $(LAC_LIB_DIR)/;
-+ cp $(KERNEL_PATH)/src/build/linux_2.6/kernel_space/*.o $(LAC_LIB_DIR)/;
-
-
- lac_user: clean output_dir qat_direct libosal_user cmn_user cmn_ko
-diff --git a/quickassist/lookaside/access_layer/src/Makefile b/quickassist/lookaside/access_layer/src/Makefile
-index cc8cf2f..b8ec93c 100644
---- a/quickassist/lookaside/access_layer/src/Makefile
-+++ b/quickassist/lookaside/access_layer/src/Makefile
-@@ -112,13 +112,13 @@ LIB_STATIC=$(OUTPUT_NAME).a
- LIB_SHARED=$(OUTPUT_NAME).so
-
- # add the path and list of source libraries,
--ADDITIONAL_KERNEL_LIBS= common/utils/$(ICP_BUILD_OUTPUT_DIR)/utils.a \
-- common/ctrl/$(ICP_BUILD_OUTPUT_DIR)/init.a \
-- common/compression/$(ICP_BUILD_OUTPUT_DIR)/compression.a
-+ADDITIONAL_KERNEL_LIBS= common/utils/$(ICP_BUILD_OUTPUT_DIR)/*.o \
-+ common/ctrl/$(ICP_BUILD_OUTPUT_DIR)/*.o \
-+ common/compression/$(ICP_BUILD_OUTPUT_DIR)/*.o
- ifndef ICP_DC_ONLY
--ADDITIONAL_KERNEL_LIBS += common/crypto/sym/$(ICP_BUILD_OUTPUT_DIR)/sym.a \
-- common/crypto/sym/qat/$(ICP_BUILD_OUTPUT_DIR)/sym_qat.a \
-- common/crypto/sym/key/$(ICP_BUILD_OUTPUT_DIR)/sym_key.a
-+ADDITIONAL_KERNEL_LIBS += common/crypto/sym/$(ICP_BUILD_OUTPUT_DIR)/*.o \
-+ common/crypto/sym/qat/$(ICP_BUILD_OUTPUT_DIR)/*.o \
-+ common/crypto/sym/key/$(ICP_BUILD_OUTPUT_DIR)/*.o
- ifeq ($(ICP_OS_LEVEL), user_space)
- ADDITIONAL_KERNEL_LIBS += common/crypto/asym/pke_common/$(ICP_BUILD_OUTPUT_DIR)/pke_common.a \
- common/crypto/asym/diffie_hellman/$(ICP_BUILD_OUTPUT_DIR)/diffie_hellman.a \
-@@ -128,14 +128,14 @@ ADDITIONAL_KERNEL_LIBS += common/crypto/asym/pke_common/$(ICP_BUILD_OUTPUT_DIR)/
- common/crypto/asym/large_number/$(ICP_BUILD_OUTPUT_DIR)/ln.a \
- common/crypto/asym/ecc/$(ICP_BUILD_OUTPUT_DIR)/elliptic_curve.a
- else
--ADDITIONAL_KERNEL_LIBS += common/stubs/$(ICP_BUILD_OUTPUT_DIR)/lib_lac_stubs.a
-+ADDITIONAL_KERNEL_LIBS += common/stubs/$(ICP_BUILD_OUTPUT_DIR)/*.o
- endif
- else
- ifeq ($(ICP_OS_LEVEL), kernel_space)
--ADDITIONAL_KERNEL_LIBS += common/stubs/$(ICP_BUILD_OUTPUT_DIR)/lib_lac_stubs.a
-+ADDITIONAL_KERNEL_LIBS += common/stubs/$(ICP_BUILD_OUTPUT_DIR)/*.o
- endif
- endif
--ADDITIONAL_KERNEL_LIBS += common/qat_comms/$(ICP_BUILD_OUTPUT_DIR)/qat_comms.a
-+ADDITIONAL_KERNEL_LIBS += common/qat_comms/$(ICP_BUILD_OUTPUT_DIR)/*.o
-
- ifeq ($(ICP_OS_LEVEL), user_space)
- ifdef KPT
-@@ -145,8 +145,7 @@ endif
- endif
-
- ifeq ($(ICP_OS_LEVEL), kernel_space)
-- ADDITIONAL_OBJECTS = ../build/libs/libadf_kernel.a
-- ADDITIONAL_OBJECTS += ../build/libs/libosal.a
-+ ADDITIONAL_OBJECTS += ../build/libs/*.o
- endif
-
- ifeq ($(ICP_OS_LEVEL), user_space)
diff --git a/recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch b/recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch
deleted file mode 100644
index 96e949c..0000000
--- a/recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch
+++ /dev/null
@@ -1,1161 +0,0 @@
-From b19449e3c11ffd477a3db60f21e14930ed07f251 Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <yongxin.liu@windriver.com>
-Date: Wed, 15 Jan 2020 13:50:38 +0000
-Subject: [PATCH] qat: Switch to skcipher API
-
-The patch is derived from mainline kernel commit 7fe948a52287
-("crypto: qat - switch to skcipher API").
-
-Upstream-Status: Inappropriate [Code released in tarball form only]
-
-Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
----
- .../drivers/crypto/qat/qat_common/qat_algs.c | 676 ++++++++++--------
- .../crypto/qat/qat_common/qat_crypto.h | 6 +-
- 2 files changed, 394 insertions(+), 288 deletions(-)
-
-diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-index c4edb3c..35bca76 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-@@ -44,14 +44,15 @@
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
--#ifndef QAT_AEAD_OLD_SUPPORTED
- #include <linux/module.h>
- #include <linux/slab.h>
- #include <linux/crypto.h>
- #include <crypto/internal/aead.h>
-+#include <crypto/internal/skcipher.h>
- #include <crypto/aes.h>
- #include <crypto/sha.h>
- #include <crypto/hash.h>
-+#include <crypto/hmac.h>
- #include <crypto/algapi.h>
- #include <crypto/authenc.h>
- #include <linux/dma-mapping.h>
-@@ -113,11 +114,16 @@ struct qat_alg_aead_ctx {
- struct crypto_shash *hash_tfm;
- enum icp_qat_hw_auth_algo qat_hash_alg;
- struct qat_crypto_instance *inst;
-- char ipad[SHA512_BLOCK_SIZE];
-+ union {
-+ struct sha1_state sha1;
-+ struct sha256_state sha256;
-+ struct sha512_state sha512;
-+ };
-+ char ipad[SHA512_BLOCK_SIZE]; /* sufficient for SHA-1/SHA-256 as well */
- char opad[SHA512_BLOCK_SIZE];
- };
-
--struct qat_alg_ablkcipher_ctx {
-+struct qat_alg_skcipher_ctx {
- struct icp_qat_hw_cipher_algo_blk *enc_cd;
- struct icp_qat_hw_cipher_algo_blk *dec_cd;
- dma_addr_t enc_cd_paddr;
-@@ -125,7 +131,7 @@ struct qat_alg_ablkcipher_ctx {
- struct icp_qat_fw_la_bulk_req enc_fw_req;
- struct icp_qat_fw_la_bulk_req dec_fw_req;
- struct qat_crypto_instance *inst;
-- struct crypto_tfm *tfm;
-+ struct crypto_skcipher *tfm;
- };
-
- static int qat_get_inter_state_size(enum icp_qat_hw_auth_algo qat_hash_alg)
-@@ -149,9 +155,6 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
- unsigned int auth_keylen)
- {
- SHASH_DESC_ON_STACK(shash, ctx->hash_tfm);
-- struct sha1_state sha1;
-- struct sha256_state sha256;
-- struct sha512_state sha512;
- int block_size = crypto_shash_blocksize(ctx->hash_tfm);
- int digest_size = crypto_shash_digestsize(ctx->hash_tfm);
- __be32 *hash_state_out;
-@@ -160,7 +163,6 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
-
- memset(ctx->ipad, 0, block_size);
- memset(ctx->opad, 0, block_size);
-- memset(shash, 0, sizeof(struct shash_desc));
- shash->tfm = ctx->hash_tfm;
-
- if (auth_keylen > block_size) {
-@@ -178,8 +180,8 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
- for (i = 0; i < block_size; i++) {
- char *ipad_ptr = ctx->ipad + i;
- char *opad_ptr = ctx->opad + i;
-- *ipad_ptr ^= 0x36;
-- *opad_ptr ^= 0x5C;
-+ *ipad_ptr ^= HMAC_IPAD_VALUE;
-+ *opad_ptr ^= HMAC_OPAD_VALUE;
- }
-
- if (crypto_shash_init(shash))
-@@ -193,22 +195,22 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
-
- switch (ctx->qat_hash_alg) {
- case ICP_QAT_HW_AUTH_ALGO_SHA1:
-- if (crypto_shash_export(shash, &sha1))
-+ if (crypto_shash_export(shash, &ctx->sha1))
- return -EFAULT;
- for (i = 0; i < digest_size >> 2; i++, hash_state_out++)
-- *hash_state_out = cpu_to_be32(*(sha1.state + i));
-+ *hash_state_out = cpu_to_be32(ctx->sha1.state[i]);
- break;
- case ICP_QAT_HW_AUTH_ALGO_SHA256:
-- if (crypto_shash_export(shash, &sha256))
-+ if (crypto_shash_export(shash, &ctx->sha256))
- return -EFAULT;
- for (i = 0; i < digest_size >> 2; i++, hash_state_out++)
-- *hash_state_out = cpu_to_be32(*(sha256.state + i));
-+ *hash_state_out = cpu_to_be32(ctx->sha256.state[i]);
- break;
- case ICP_QAT_HW_AUTH_ALGO_SHA512:
-- if (crypto_shash_export(shash, &sha512))
-+ if (crypto_shash_export(shash, &ctx->sha512))
- return -EFAULT;
- for (i = 0; i < digest_size >> 3; i++, hash512_state_out++)
-- *hash512_state_out = cpu_to_be64(*(sha512.state + i));
-+ *hash512_state_out = cpu_to_be64(ctx->sha512.state[i]);
- break;
- default:
- return -EFAULT;
-@@ -229,22 +231,22 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
-
- switch (ctx->qat_hash_alg) {
- case ICP_QAT_HW_AUTH_ALGO_SHA1:
-- if (crypto_shash_export(shash, &sha1))
-+ if (crypto_shash_export(shash, &ctx->sha1))
- return -EFAULT;
- for (i = 0; i < digest_size >> 2; i++, hash_state_out++)
-- *hash_state_out = cpu_to_be32(*(sha1.state + i));
-+ *hash_state_out = cpu_to_be32(ctx->sha1.state[i]);
- break;
- case ICP_QAT_HW_AUTH_ALGO_SHA256:
-- if (crypto_shash_export(shash, &sha256))
-+ if (crypto_shash_export(shash, &ctx->sha256))
- return -EFAULT;
- for (i = 0; i < digest_size >> 2; i++, hash_state_out++)
-- *hash_state_out = cpu_to_be32(*(sha256.state + i));
-+ *hash_state_out = cpu_to_be32(ctx->sha256.state[i]);
- break;
- case ICP_QAT_HW_AUTH_ALGO_SHA512:
-- if (crypto_shash_export(shash, &sha512))
-+ if (crypto_shash_export(shash, &ctx->sha512))
- return -EFAULT;
- for (i = 0; i < digest_size >> 3; i++, hash512_state_out++)
-- *hash512_state_out = cpu_to_be64(*(sha512.state + i));
-+ *hash512_state_out = cpu_to_be64(ctx->sha512.state[i]);
- break;
- default:
- return -EFAULT;
-@@ -254,7 +256,24 @@ static int qat_alg_do_precomputes(struct icp_qat_hw_auth_algo_blk *hash,
- return 0;
- }
-
--static void qat_alg_init_common_hdr(struct icp_qat_fw_comn_req_hdr *header)
-+static void qat_alg_init_hdr_iv_updt(struct icp_qat_fw_comn_req_hdr *header)
-+{
-+ ICP_QAT_FW_LA_CIPH_IV_FLD_FLAG_SET(header->serv_specif_flags,
-+ ICP_QAT_FW_CIPH_IV_64BIT_PTR);
-+ ICP_QAT_FW_LA_UPDATE_STATE_SET(header->serv_specif_flags,
-+ ICP_QAT_FW_LA_UPDATE_STATE);
-+}
-+
-+static void qat_alg_init_hdr_no_iv_updt(struct icp_qat_fw_comn_req_hdr *header)
-+{
-+ ICP_QAT_FW_LA_CIPH_IV_FLD_FLAG_SET(header->serv_specif_flags,
-+ ICP_QAT_FW_CIPH_IV_16BYTE_DATA);
-+ ICP_QAT_FW_LA_UPDATE_STATE_SET(header->serv_specif_flags,
-+ ICP_QAT_FW_LA_NO_UPDATE_STATE);
-+}
-+
-+static void qat_alg_init_common_hdr(struct icp_qat_fw_comn_req_hdr *header,
-+ int aead)
- {
- header->hdr_flags =
- ICP_QAT_FW_COMN_HDR_FLAGS_BUILD(ICP_QAT_FW_COMN_REQ_FLAG_SET);
-@@ -264,12 +283,12 @@ static void qat_alg_init_common_hdr(struct icp_qat_fw_comn_req_hdr *header)
- QAT_COMN_PTR_TYPE_SGL);
- ICP_QAT_FW_LA_PARTIAL_SET(header->serv_specif_flags,
- ICP_QAT_FW_LA_PARTIAL_NONE);
-- ICP_QAT_FW_LA_CIPH_IV_FLD_FLAG_SET(header->serv_specif_flags,
-- ICP_QAT_FW_CIPH_IV_16BYTE_DATA);
-+ if (aead)
-+ qat_alg_init_hdr_no_iv_updt(header);
-+ else
-+ qat_alg_init_hdr_iv_updt(header);
- ICP_QAT_FW_LA_PROTO_SET(header->serv_specif_flags,
- ICP_QAT_FW_LA_NO_PROTO);
-- ICP_QAT_FW_LA_UPDATE_STATE_SET(header->serv_specif_flags,
-- ICP_QAT_FW_LA_NO_UPDATE_STATE);
- }
-
- static int qat_alg_aead_init_enc_session(struct crypto_aead *aead_tfm,
-@@ -304,7 +323,7 @@ static int qat_alg_aead_init_enc_session(struct crypto_aead *aead_tfm,
- return -EFAULT;
-
- /* Request setup */
-- qat_alg_init_common_hdr(header);
-+ qat_alg_init_common_hdr(header, 1);
- header->service_cmd_id = ICP_QAT_FW_LA_CMD_CIPHER_HASH;
- ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(header->serv_specif_flags,
- ICP_QAT_FW_LA_DIGEST_IN_BUFFER);
-@@ -391,7 +410,7 @@ static int qat_alg_aead_init_dec_session(struct crypto_aead *aead_tfm,
- return -EFAULT;
-
- /* Request setup */
-- qat_alg_init_common_hdr(header);
-+ qat_alg_init_common_hdr(header, 1);
- header->service_cmd_id = ICP_QAT_FW_LA_CMD_HASH_CIPHER;
- ICP_QAT_FW_LA_DIGEST_IN_BUFFER_SET(header->serv_specif_flags,
- ICP_QAT_FW_LA_DIGEST_IN_BUFFER);
-@@ -445,17 +464,17 @@ static int qat_alg_aead_init_dec_session(struct crypto_aead *aead_tfm,
- return 0;
- }
-
--static void qat_alg_ablkcipher_init_com(struct qat_alg_ablkcipher_ctx *ctx,
-- struct icp_qat_fw_la_bulk_req *req,
-- struct icp_qat_hw_cipher_algo_blk *cd,
-- const uint8_t *key, unsigned int keylen)
-+static void qat_alg_skcipher_init_com(struct qat_alg_skcipher_ctx *ctx,
-+ struct icp_qat_fw_la_bulk_req *req,
-+ struct icp_qat_hw_cipher_algo_blk *cd,
-+ const uint8_t *key, unsigned int keylen)
- {
- struct icp_qat_fw_comn_req_hdr_cd_pars *cd_pars = &req->cd_pars;
- struct icp_qat_fw_comn_req_hdr *header = &req->comn_hdr;
- struct icp_qat_fw_cipher_cd_ctrl_hdr *cd_ctrl = (void *)&req->cd_ctrl;
-
- memcpy(cd->aes.key, key, keylen);
-- qat_alg_init_common_hdr(header);
-+ qat_alg_init_common_hdr(header, 0);
- header->service_cmd_id = ICP_QAT_FW_LA_CMD_CIPHER;
- cd_pars->u.s.content_desc_params_sz =
- sizeof(struct icp_qat_hw_cipher_algo_blk) >> 3;
-@@ -467,28 +486,28 @@ static void qat_alg_ablkcipher_init_com(struct qat_alg_ablkcipher_ctx *ctx,
- ICP_QAT_FW_COMN_NEXT_ID_SET(cd_ctrl, ICP_QAT_FW_SLICE_DRAM_WR);
- }
-
--static void qat_alg_ablkcipher_init_enc(struct qat_alg_ablkcipher_ctx *ctx,
-- int alg, const uint8_t *key,
-- unsigned int keylen, int mode)
-+static void qat_alg_skcipher_init_enc(struct qat_alg_skcipher_ctx *ctx,
-+ int alg, const uint8_t *key,
-+ unsigned int keylen, int mode)
- {
- struct icp_qat_hw_cipher_algo_blk *enc_cd = ctx->enc_cd;
- struct icp_qat_fw_la_bulk_req *req = &ctx->enc_fw_req;
- struct icp_qat_fw_comn_req_hdr_cd_pars *cd_pars = &req->cd_pars;
-
-- qat_alg_ablkcipher_init_com(ctx, req, enc_cd, key, keylen);
-+ qat_alg_skcipher_init_com(ctx, req, enc_cd, key, keylen);
- cd_pars->u.s.content_desc_addr = ctx->enc_cd_paddr;
- enc_cd->aes.cipher_config.val = QAT_AES_HW_CONFIG_ENC(alg, mode);
- }
-
--static void qat_alg_ablkcipher_init_dec(struct qat_alg_ablkcipher_ctx *ctx,
-- int alg, const uint8_t *key,
-- unsigned int keylen, int mode)
-+static void qat_alg_skcipher_init_dec(struct qat_alg_skcipher_ctx *ctx,
-+ int alg, const uint8_t *key,
-+ unsigned int keylen, int mode)
- {
- struct icp_qat_hw_cipher_algo_blk *dec_cd = ctx->dec_cd;
- struct icp_qat_fw_la_bulk_req *req = &ctx->dec_fw_req;
- struct icp_qat_fw_comn_req_hdr_cd_pars *cd_pars = &req->cd_pars;
-
-- qat_alg_ablkcipher_init_com(ctx, req, dec_cd, key, keylen);
-+ qat_alg_skcipher_init_com(ctx, req, dec_cd, key, keylen);
- cd_pars->u.s.content_desc_addr = ctx->dec_cd_paddr;
-
- if (mode != ICP_QAT_HW_CIPHER_CTR_MODE)
-@@ -548,86 +567,110 @@ static int qat_alg_aead_init_sessions(struct crypto_aead *tfm, const u8 *key,
- if (qat_alg_aead_init_dec_session(tfm, alg, &keys, mode))
- goto error;
-
-+ memzero_explicit(&keys, sizeof(keys));
- return 0;
- bad_key:
- crypto_aead_set_flags(tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
-+ memzero_explicit(&keys, sizeof(keys));
- return -EINVAL;
- error:
-+ memzero_explicit(&keys, sizeof(keys));
- return -EFAULT;
- }
-
--static int qat_alg_ablkcipher_init_sessions(struct qat_alg_ablkcipher_ctx *ctx,
-- const uint8_t *key,
-- unsigned int keylen,
-- int mode)
-+static int qat_alg_skcipher_init_sessions(struct qat_alg_skcipher_ctx *ctx,
-+ const uint8_t *key,
-+ unsigned int keylen,
-+ int mode)
- {
- int alg;
-
- if (qat_alg_validate_key(keylen, &alg, mode))
- goto bad_key;
-
-- qat_alg_ablkcipher_init_enc(ctx, alg, key, keylen, mode);
-- qat_alg_ablkcipher_init_dec(ctx, alg, key, keylen, mode);
-+ qat_alg_skcipher_init_enc(ctx, alg, key, keylen, mode);
-+ qat_alg_skcipher_init_dec(ctx, alg, key, keylen, mode);
- return 0;
- bad_key:
-- crypto_tfm_set_flags(ctx->tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
-+ crypto_skcipher_set_flags(ctx->tfm, CRYPTO_TFM_RES_BAD_KEY_LEN);
- return -EINVAL;
- }
-
--static int qat_alg_aead_setkey(struct crypto_aead *tfm, const uint8_t *key,
-+static int qat_alg_aead_rekey(struct crypto_aead *tfm, const uint8_t *key,
-+ unsigned int keylen)
-+{
-+ struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm);
-+
-+ memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
-+ memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
-+ memset(&ctx->enc_fw_req, 0, sizeof(ctx->enc_fw_req));
-+ memset(&ctx->dec_fw_req, 0, sizeof(ctx->dec_fw_req));
-+
-+ return qat_alg_aead_init_sessions(tfm, key, keylen,
-+ ICP_QAT_HW_CIPHER_CBC_MODE);
-+}
-+
-+static int qat_alg_aead_newkey(struct crypto_aead *tfm, const uint8_t *key,
- unsigned int keylen)
- {
- struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm);
-+ struct qat_crypto_instance *inst = NULL;
-+ int node = get_current_node();
- struct device *dev;
-+ int ret;
-
-- if (ctx->enc_cd) {
-- /* rekeying */
-- dev = &GET_DEV(ctx->inst->accel_dev);
-- memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
-- memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
-- memset(&ctx->enc_fw_req, 0, sizeof(ctx->enc_fw_req));
-- memset(&ctx->dec_fw_req, 0, sizeof(ctx->dec_fw_req));
-- } else {
-- /* new key */
-- int node = get_current_node();
-- struct qat_crypto_instance *inst =
-- qat_crypto_get_instance_node(node);
-- if (!inst) {
-- return -EINVAL;
-- }
--
-- dev = &GET_DEV(inst->accel_dev);
-- ctx->inst = inst;
-- ctx->enc_cd = dma_alloc_coherent(dev, sizeof(*ctx->enc_cd),
-- &ctx->enc_cd_paddr,
-- GFP_ATOMIC);
-- if (!ctx->enc_cd) {
-- return -ENOMEM;
-- }
-- ctx->dec_cd = dma_alloc_coherent(dev, sizeof(*ctx->dec_cd),
-- &ctx->dec_cd_paddr,
-- GFP_ATOMIC);
-- if (!ctx->dec_cd) {
-- goto out_free_enc;
-- }
-+ inst = qat_crypto_get_instance_node(node);
-+ if (!inst)
-+ return -EINVAL;
-+ dev = &GET_DEV(inst->accel_dev);
-+ ctx->inst = inst;
-+ ctx->enc_cd = dma_alloc_coherent(dev, sizeof(*ctx->enc_cd),
-+ &ctx->enc_cd_paddr,
-+ GFP_ATOMIC);
-+ if (!ctx->enc_cd) {
-+ ret = -ENOMEM;
-+ goto out_free_inst;
- }
-- if (qat_alg_aead_init_sessions(tfm, key, keylen,
-- ICP_QAT_HW_CIPHER_CBC_MODE))
-+ ctx->dec_cd = dma_alloc_coherent(dev, sizeof(*ctx->dec_cd),
-+ &ctx->dec_cd_paddr,
-+ GFP_ATOMIC);
-+ if (!ctx->dec_cd) {
-+ ret = -ENOMEM;
-+ goto out_free_enc;
-+ }
-+
-+ ret = qat_alg_aead_init_sessions(tfm, key, keylen,
-+ ICP_QAT_HW_CIPHER_CBC_MODE);
-+ if (ret)
- goto out_free_all;
-
- return 0;
-
- out_free_all:
-- memzero_explicit(ctx->dec_cd, sizeof(struct qat_alg_cd));
-+ memset(ctx->dec_cd, 0, sizeof(struct qat_alg_cd));
- dma_free_coherent(dev, sizeof(struct qat_alg_cd),
- ctx->dec_cd, ctx->dec_cd_paddr);
- ctx->dec_cd = NULL;
- out_free_enc:
-- memzero_explicit(ctx->enc_cd, sizeof(struct qat_alg_cd));
-+ memset(ctx->enc_cd, 0, sizeof(struct qat_alg_cd));
- dma_free_coherent(dev, sizeof(struct qat_alg_cd),
- ctx->enc_cd, ctx->enc_cd_paddr);
- ctx->enc_cd = NULL;
-- return -ENOMEM;
-+out_free_inst:
-+ ctx->inst = NULL;
-+ qat_crypto_put_instance(inst);
-+ return ret;
-+}
-+
-+static int qat_alg_aead_setkey(struct crypto_aead *tfm, const uint8_t *key,
-+ unsigned int keylen)
-+{
-+ struct qat_alg_aead_ctx *ctx = crypto_aead_ctx(tfm);
-+
-+ if (ctx->enc_cd)
-+ return qat_alg_aead_rekey(tfm, key, keylen);
-+ else
-+ return qat_alg_aead_newkey(tfm, key, keylen);
- }
-
- static void qat_alg_free_bufl(struct qat_crypto_instance *inst,
-@@ -675,8 +718,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
- dma_addr_t blp;
- dma_addr_t bloutp = 0;
- struct scatterlist *sg;
-- size_t sz_out, sz = sizeof(struct qat_alg_buf_list) +
-- ((1 + n) * sizeof(struct qat_alg_buf));
-+ size_t sz_out, sz = struct_size(bufl, bufers, n + 1);
-
- if (unlikely(!n))
- return -EINVAL;
-@@ -688,7 +730,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
-
- blp = dma_map_single(dev, bufl, sz, DMA_TO_DEVICE);
- if (unlikely(dma_mapping_error(dev, blp)))
-- goto err;
-+ goto err_in;
-
- for_each_sg(sgl, sg, n, i) {
- int y = sg_nctr;
-@@ -701,7 +743,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
- DMA_BIDIRECTIONAL);
- bufl->bufers[y].len = sg->length;
- if (unlikely(dma_mapping_error(dev, bufl->bufers[y].addr)))
-- goto err;
-+ goto err_in;
- sg_nctr++;
- }
- bufl->num_bufs = sg_nctr;
-@@ -713,16 +755,15 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
- struct qat_alg_buf *bufers;
-
- n = sg_nents(sglout);
-- sz_out = sizeof(struct qat_alg_buf_list) +
-- ((1 + n) * sizeof(struct qat_alg_buf));
-+ sz_out = struct_size(buflout, bufers, n + 1);
- sg_nctr = 0;
- buflout = kzalloc_node(sz_out, GFP_ATOMIC,
- dev_to_node(&GET_DEV(inst->accel_dev)));
- if (unlikely(!buflout))
-- goto err;
-+ goto err_in;
- bloutp = dma_map_single(dev, buflout, sz_out, DMA_TO_DEVICE);
- if (unlikely(dma_mapping_error(dev, bloutp)))
-- goto err;
-+ goto err_out;
- bufers = buflout->bufers;
- for_each_sg(sglout, sg, n, i) {
- int y = sg_nctr;
-@@ -734,7 +775,7 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
- sg->length,
- DMA_BIDIRECTIONAL);
- if (unlikely(dma_mapping_error(dev, bufers[y].addr)))
-- goto err;
-+ goto err_out;
- bufers[y].len = sg->length;
- sg_nctr++;
- }
-@@ -749,8 +790,20 @@ static int qat_alg_sgl_to_bufl(struct qat_crypto_instance *inst,
- qat_req->buf.sz_out = 0;
- }
- return 0;
--err:
-- dev_err(dev, "Failed to map buf for dma\n");
-+
-+err_out:
-+ n = sg_nents(sglout);
-+ for (i = 0; i < n; i++)
-+ if (!dma_mapping_error(dev, buflout->bufers[i].addr))
-+ dma_unmap_single(dev, buflout->bufers[i].addr,
-+ buflout->bufers[i].len,
-+ DMA_BIDIRECTIONAL);
-+ if (!dma_mapping_error(dev, bloutp))
-+ dma_unmap_single(dev, bloutp, sz_out, DMA_TO_DEVICE);
-+ kfree(buflout);
-+
-+err_in:
-+ n = sg_nents(sgl);
- for (i = 0; i < n; i++)
- if (!dma_mapping_error(dev, bufl->bufers[i].addr))
- dma_unmap_single(dev, bufl->bufers[i].addr,
-@@ -760,17 +813,8 @@ err:
- if (!dma_mapping_error(dev, blp))
- dma_unmap_single(dev, blp, sz, DMA_TO_DEVICE);
- kfree(bufl);
-- if (sgl != sglout && buflout) {
-- n = sg_nents(sglout);
-- for (i = 0; i < n; i++)
-- if (!dma_mapping_error(dev, buflout->bufers[i].addr))
-- dma_unmap_single(dev, buflout->bufers[i].addr,
-- buflout->bufers[i].len,
-- DMA_BIDIRECTIONAL);
-- if (!dma_mapping_error(dev, bloutp))
-- dma_unmap_single(dev, bloutp, sz_out, DMA_TO_DEVICE);
-- kfree(buflout);
-- }
-+
-+ dev_err(dev, "Failed to map buf for dma\n");
- return -ENOMEM;
- }
-
-@@ -789,19 +833,25 @@ static void qat_aead_alg_callback(struct icp_qat_fw_la_resp *qat_resp,
- areq->base.complete(&areq->base, res);
- }
-
--static void qat_ablkcipher_alg_callback(struct icp_qat_fw_la_resp *qat_resp,
-- struct qat_crypto_request *qat_req)
-+static void qat_skcipher_alg_callback(struct icp_qat_fw_la_resp *qat_resp,
-+ struct qat_crypto_request *qat_req)
- {
-- struct qat_alg_ablkcipher_ctx *ctx = qat_req->ablkcipher_ctx;
-+ struct qat_alg_skcipher_ctx *ctx = qat_req->skcipher_ctx;
- struct qat_crypto_instance *inst = ctx->inst;
-- struct ablkcipher_request *areq = qat_req->ablkcipher_req;
-+ struct skcipher_request *sreq = qat_req->skcipher_req;
- uint8_t stat_filed = qat_resp->comn_resp.comn_status;
-+ struct device *dev = &GET_DEV(ctx->inst->accel_dev);
- int res = 0, qat_res = ICP_QAT_FW_COMN_RESP_CRYPTO_STAT_GET(stat_filed);
-
- qat_alg_free_bufl(inst, qat_req);
- if (unlikely(qat_res != ICP_QAT_FW_COMN_STATUS_FLAG_OK))
- res = -EINVAL;
-- areq->base.complete(&areq->base, res);
-+
-+ memcpy(sreq->iv, qat_req->iv, AES_BLOCK_SIZE);
-+ dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv,
-+ qat_req->iv_paddr);
-+
-+ sreq->base.complete(&sreq->base, res);
- }
-
- void qat_alg_callback(void *resp)
-@@ -823,7 +873,7 @@ static int qat_alg_aead_dec(struct aead_request *areq)
- struct icp_qat_fw_la_auth_req_params *auth_param;
- struct icp_qat_fw_la_bulk_req *msg;
- int digst_size = crypto_aead_authsize(aead_tfm);
-- int ret;
-+ int ret, ctr = 0;
-
- ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
- if (unlikely(ret))
-@@ -844,13 +894,14 @@ static int qat_alg_aead_dec(struct aead_request *areq)
- auth_param = (void *)((uint8_t *)cipher_param + sizeof(*cipher_param));
- auth_param->auth_off = 0;
- auth_param->auth_len = areq->assoclen + cipher_param->cipher_length;
--
- do {
- ret = adf_send_message(ctx->inst->sym_tx, (uint32_t *)msg);
-- if (ret)
-- cond_resched();
-- } while (ret == -EAGAIN);
-+ } while (ret == -EAGAIN && ctr++ < 10);
-
-+ if (ret == -EAGAIN) {
-+ qat_alg_free_bufl(ctx->inst, qat_req);
-+ return -EBUSY;
-+ }
- return -EINPROGRESS;
- }
-
-@@ -864,7 +915,7 @@ static int qat_alg_aead_enc(struct aead_request *areq)
- struct icp_qat_fw_la_auth_req_params *auth_param;
- struct icp_qat_fw_la_bulk_req *msg;
- uint8_t *iv = areq->iv;
-- int ret;
-+ int ret, ctr = 0;
-
- ret = qat_alg_sgl_to_bufl(ctx->inst, areq->src, areq->dst, qat_req);
- if (unlikely(ret))
-@@ -890,159 +941,230 @@ static int qat_alg_aead_enc(struct aead_request *areq)
-
- do {
- ret = adf_send_message(ctx->inst->sym_tx, (uint32_t *)msg);
-- if (ret)
-- cond_resched();
-- } while (ret == -EAGAIN);
-+ } while (ret == -EAGAIN && ctr++ < 10);
-
-+ if (ret == -EAGAIN) {
-+ qat_alg_free_bufl(ctx->inst, qat_req);
-+ return -EBUSY;
-+ }
- return -EINPROGRESS;
- }
-
--static int qat_alg_ablkcipher_setkey(struct crypto_ablkcipher *tfm,
-- const u8 *key, unsigned int keylen,
-- int mode)
-+static int qat_alg_skcipher_rekey(struct qat_alg_skcipher_ctx *ctx,
-+ const u8 *key, unsigned int keylen,
-+ int mode)
- {
-- struct qat_alg_ablkcipher_ctx *ctx = crypto_ablkcipher_ctx(tfm);
-- struct device *dev;
-+ memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
-+ memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
-+ memset(&ctx->enc_fw_req, 0, sizeof(ctx->enc_fw_req));
-+ memset(&ctx->dec_fw_req, 0, sizeof(ctx->dec_fw_req));
-
-- if (ctx->enc_cd) {
-- /* rekeying */
-- dev = &GET_DEV(ctx->inst->accel_dev);
-- memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
-- memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
-- memset(&ctx->enc_fw_req, 0, sizeof(ctx->enc_fw_req));
-- memset(&ctx->dec_fw_req, 0, sizeof(ctx->dec_fw_req));
-- } else {
-- /* new key */
-- int node = get_current_node();
-- struct qat_crypto_instance *inst =
-- qat_crypto_get_instance_node(node);
-- if (!inst)
-- return -EINVAL;
-+ return qat_alg_skcipher_init_sessions(ctx, key, keylen, mode);
-+}
-+
-+static int qat_alg_skcipher_newkey(struct qat_alg_skcipher_ctx *ctx,
-+ const u8 *key, unsigned int keylen,
-+ int mode)
-+{
-+ struct qat_crypto_instance *inst = NULL;
-+ struct device *dev;
-+ int node = get_current_node();
-+ int ret;
-
-- dev = &GET_DEV(inst->accel_dev);
-- ctx->inst = inst;
-- ctx->enc_cd = dma_alloc_coherent(dev, sizeof(*ctx->enc_cd),
-- &ctx->enc_cd_paddr,
-- GFP_ATOMIC);
-- if (!ctx->enc_cd)
-- return -ENOMEM;
-- ctx->dec_cd = dma_alloc_coherent(dev, sizeof(*ctx->dec_cd),
-- &ctx->dec_cd_paddr,
-- GFP_ATOMIC);
-- if (!ctx->dec_cd)
-- goto out_free_enc;
-+ inst = qat_crypto_get_instance_node(node);
-+ if (!inst)
-+ return -EINVAL;
-+ dev = &GET_DEV(inst->accel_dev);
-+ ctx->inst = inst;
-+ ctx->enc_cd = dma_alloc_coherent(dev, sizeof(*ctx->enc_cd),
-+ &ctx->enc_cd_paddr,
-+ GFP_ATOMIC);
-+ if (!ctx->enc_cd) {
-+ ret = -ENOMEM;
-+ goto out_free_instance;
-+ }
-+ ctx->dec_cd = dma_alloc_coherent(dev, sizeof(*ctx->dec_cd),
-+ &ctx->dec_cd_paddr,
-+ GFP_ATOMIC);
-+ if (!ctx->dec_cd) {
-+ ret = -ENOMEM;
-+ goto out_free_enc;
- }
-- if (qat_alg_ablkcipher_init_sessions(ctx, key, keylen, mode))
-+
-+ ret = qat_alg_skcipher_init_sessions(ctx, key, keylen, mode);
-+ if (ret)
- goto out_free_all;
-
- return 0;
-
- out_free_all:
-- memzero_explicit(ctx->dec_cd, sizeof(*ctx->dec_cd));
-+ memset(ctx->dec_cd, 0, sizeof(*ctx->dec_cd));
- dma_free_coherent(dev, sizeof(*ctx->dec_cd),
- ctx->dec_cd, ctx->dec_cd_paddr);
- ctx->dec_cd = NULL;
- out_free_enc:
-- memzero_explicit(ctx->enc_cd, sizeof(*ctx->enc_cd));
-+ memset(ctx->enc_cd, 0, sizeof(*ctx->enc_cd));
- dma_free_coherent(dev, sizeof(*ctx->enc_cd),
- ctx->enc_cd, ctx->enc_cd_paddr);
- ctx->enc_cd = NULL;
-- return -ENOMEM;
-+out_free_instance:
-+ ctx->inst = NULL;
-+ qat_crypto_put_instance(inst);
-+ return ret;
- }
-
--static int qat_alg_ablkcipher_cbc_setkey(struct crypto_ablkcipher *tfm,
-- const u8 *key, unsigned int keylen)
-+static int qat_alg_skcipher_setkey(struct crypto_skcipher *tfm,
-+ const u8 *key, unsigned int keylen,
-+ int mode)
- {
-- return qat_alg_ablkcipher_setkey(tfm, key, keylen,
-- ICP_QAT_HW_CIPHER_CBC_MODE);
-+ struct qat_alg_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
-+
-+ if (ctx->enc_cd)
-+ return qat_alg_skcipher_rekey(ctx, key, keylen, mode);
-+ else
-+ return qat_alg_skcipher_newkey(ctx, key, keylen, mode);
-+}
-+
-+static int qat_alg_skcipher_cbc_setkey(struct crypto_skcipher *tfm,
-+ const u8 *key, unsigned int keylen)
-+{
-+ return qat_alg_skcipher_setkey(tfm, key, keylen,
-+ ICP_QAT_HW_CIPHER_CBC_MODE);
- }
-
--static int qat_alg_ablkcipher_ctr_setkey(struct crypto_ablkcipher *tfm,
-- const u8 *key, unsigned int keylen)
-+static int qat_alg_skcipher_ctr_setkey(struct crypto_skcipher *tfm,
-+ const u8 *key, unsigned int keylen)
- {
-- return qat_alg_ablkcipher_setkey(tfm, key, keylen,
-- ICP_QAT_HW_CIPHER_CTR_MODE);
-+ return qat_alg_skcipher_setkey(tfm, key, keylen,
-+ ICP_QAT_HW_CIPHER_CTR_MODE);
- }
-
--static int qat_alg_ablkcipher_xts_setkey(struct crypto_ablkcipher *tfm,
-- const u8 *key, unsigned int keylen)
-+static int qat_alg_skcipher_xts_setkey(struct crypto_skcipher *tfm,
-+ const u8 *key, unsigned int keylen)
- {
-- return qat_alg_ablkcipher_setkey(tfm, key, keylen,
-- ICP_QAT_HW_CIPHER_XTS_MODE);
-+ return qat_alg_skcipher_setkey(tfm, key, keylen,
-+ ICP_QAT_HW_CIPHER_XTS_MODE);
- }
-
--static int qat_alg_ablkcipher_encrypt(struct ablkcipher_request *req)
-+static int qat_alg_skcipher_encrypt(struct skcipher_request *req)
- {
-- struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req);
-- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(atfm);
-- struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-- struct qat_crypto_request *qat_req = ablkcipher_request_ctx(req);
-+ struct crypto_skcipher *stfm = crypto_skcipher_reqtfm(req);
-+ struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm);
-+ struct qat_alg_skcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-+ struct qat_crypto_request *qat_req = skcipher_request_ctx(req);
- struct icp_qat_fw_la_cipher_req_params *cipher_param;
- struct icp_qat_fw_la_bulk_req *msg;
-- int ret;
-+ struct device *dev = &GET_DEV(ctx->inst->accel_dev);
-+ int ret, ctr = 0;
-+
-+ if (req->cryptlen == 0)
-+ return 0;
-+
-+ qat_req->iv = dma_alloc_coherent(dev, AES_BLOCK_SIZE,
-+ &qat_req->iv_paddr, GFP_ATOMIC);
-+ if (!qat_req->iv)
-+ return -ENOMEM;
-
- ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req);
-- if (unlikely(ret))
-+ if (unlikely(ret)) {
-+ dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv,
-+ qat_req->iv_paddr);
- return ret;
-+ }
-
- msg = &qat_req->req;
- *msg = ctx->enc_fw_req;
-- qat_req->ablkcipher_ctx = ctx;
-- qat_req->ablkcipher_req = req;
-- qat_req->cb = qat_ablkcipher_alg_callback;
-+ qat_req->skcipher_ctx = ctx;
-+ qat_req->skcipher_req = req;
-+ qat_req->cb = qat_skcipher_alg_callback;
- qat_req->req.comn_mid.opaque_data = (uint64_t)(__force long)qat_req;
- qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp;
- qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp;
- cipher_param = (void *)&qat_req->req.serv_specif_rqpars;
-- cipher_param->cipher_length = req->nbytes;
-+ cipher_param->cipher_length = req->cryptlen;
- cipher_param->cipher_offset = 0;
-- memcpy(cipher_param->u.cipher_IV_array, req->info, AES_BLOCK_SIZE);
--
-+ cipher_param->u.s.cipher_IV_ptr = qat_req->iv_paddr;
-+ memcpy(qat_req->iv, req->iv, AES_BLOCK_SIZE);
- do {
- ret = adf_send_message(ctx->inst->sym_tx, (uint32_t *)msg);
-- if (ret)
-- cond_resched();
-- } while (ret == -EAGAIN);
-+ } while (ret == -EAGAIN && ctr++ < 10);
-
-+ if (ret == -EAGAIN) {
-+ qat_alg_free_bufl(ctx->inst, qat_req);
-+ dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv,
-+ qat_req->iv_paddr);
-+ return -EBUSY;
-+ }
- return -EINPROGRESS;
- }
-
--static int qat_alg_ablkcipher_decrypt(struct ablkcipher_request *req)
-+static int qat_alg_skcipher_blk_encrypt(struct skcipher_request *req)
-+{
-+ if (req->cryptlen % AES_BLOCK_SIZE != 0)
-+ return -EINVAL;
-+
-+ return qat_alg_skcipher_encrypt(req);
-+}
-+
-+static int qat_alg_skcipher_decrypt(struct skcipher_request *req)
- {
-- struct crypto_ablkcipher *atfm = crypto_ablkcipher_reqtfm(req);
-- struct crypto_tfm *tfm = crypto_ablkcipher_tfm(atfm);
-- struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-- struct qat_crypto_request *qat_req = ablkcipher_request_ctx(req);
-+ struct crypto_skcipher *stfm = crypto_skcipher_reqtfm(req);
-+ struct crypto_tfm *tfm = crypto_skcipher_tfm(stfm);
-+ struct qat_alg_skcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-+ struct qat_crypto_request *qat_req = skcipher_request_ctx(req);
- struct icp_qat_fw_la_cipher_req_params *cipher_param;
- struct icp_qat_fw_la_bulk_req *msg;
-- int ret;
-+ struct device *dev = &GET_DEV(ctx->inst->accel_dev);
-+ int ret, ctr = 0;
-+
-+ if (req->cryptlen == 0)
-+ return 0;
-+
-+ qat_req->iv = dma_alloc_coherent(dev, AES_BLOCK_SIZE,
-+ &qat_req->iv_paddr, GFP_ATOMIC);
-+ if (!qat_req->iv)
-+ return -ENOMEM;
-
- ret = qat_alg_sgl_to_bufl(ctx->inst, req->src, req->dst, qat_req);
-- if (unlikely(ret))
-+ if (unlikely(ret)) {
-+ dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv,
-+ qat_req->iv_paddr);
- return ret;
-+ }
-
- msg = &qat_req->req;
- *msg = ctx->dec_fw_req;
-- qat_req->ablkcipher_ctx = ctx;
-- qat_req->ablkcipher_req = req;
-- qat_req->cb = qat_ablkcipher_alg_callback;
-+ qat_req->skcipher_ctx = ctx;
-+ qat_req->skcipher_req = req;
-+ qat_req->cb = qat_skcipher_alg_callback;
- qat_req->req.comn_mid.opaque_data = (uint64_t)(__force long)qat_req;
- qat_req->req.comn_mid.src_data_addr = qat_req->buf.blp;
- qat_req->req.comn_mid.dest_data_addr = qat_req->buf.bloutp;
- cipher_param = (void *)&qat_req->req.serv_specif_rqpars;
-- cipher_param->cipher_length = req->nbytes;
-+ cipher_param->cipher_length = req->cryptlen;
- cipher_param->cipher_offset = 0;
-- memcpy(cipher_param->u.cipher_IV_array, req->info, AES_BLOCK_SIZE);
--
-+ cipher_param->u.s.cipher_IV_ptr = qat_req->iv_paddr;
-+ memcpy(qat_req->iv, req->iv, AES_BLOCK_SIZE);
- do {
- ret = adf_send_message(ctx->inst->sym_tx, (uint32_t *)msg);
-- if (ret)
-- cond_resched();
-- } while (ret == -EAGAIN);
-+ } while (ret == -EAGAIN && ctr++ < 10);
-
-+ if (ret == -EAGAIN) {
-+ qat_alg_free_bufl(ctx->inst, qat_req);
-+ dma_free_coherent(dev, AES_BLOCK_SIZE, qat_req->iv,
-+ qat_req->iv_paddr);
-+ return -EBUSY;
-+ }
- return -EINPROGRESS;
- }
-
-+static int qat_alg_skcipher_blk_decrypt(struct skcipher_request *req)
-+{
-+ if (req->cryptlen % AES_BLOCK_SIZE != 0)
-+ return -EINVAL;
-+
-+ return qat_alg_skcipher_decrypt(req);
-+}
- static int qat_alg_aead_init(struct crypto_aead *tfm,
- enum icp_qat_hw_auth_algo hash,
- const char *hash_name)
-@@ -1085,30 +1207,30 @@ static void qat_alg_aead_exit(struct crypto_aead *tfm)
-
- dev = &GET_DEV(inst->accel_dev);
- if (ctx->enc_cd) {
-- memzero_explicit(ctx->enc_cd, sizeof(struct qat_alg_cd));
-+ memset(ctx->enc_cd, 0, sizeof(struct qat_alg_cd));
- dma_free_coherent(dev, sizeof(struct qat_alg_cd),
- ctx->enc_cd, ctx->enc_cd_paddr);
- }
- if (ctx->dec_cd) {
-- memzero_explicit(ctx->dec_cd, sizeof(struct qat_alg_cd));
-+ memset(ctx->dec_cd, 0, sizeof(struct qat_alg_cd));
- dma_free_coherent(dev, sizeof(struct qat_alg_cd),
- ctx->dec_cd, ctx->dec_cd_paddr);
- }
- qat_crypto_put_instance(inst);
- }
-
--static int qat_alg_ablkcipher_init(struct crypto_tfm *tfm)
-+static int qat_alg_skcipher_init_tfm(struct crypto_skcipher *tfm)
- {
-- struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-+ struct qat_alg_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
-
-- tfm->crt_ablkcipher.reqsize = sizeof(struct qat_crypto_request);
-+ crypto_skcipher_set_reqsize(tfm, sizeof(struct qat_crypto_request));
- ctx->tfm = tfm;
- return 0;
- }
-
--static void qat_alg_ablkcipher_exit(struct crypto_tfm *tfm)
-+static void qat_alg_skcipher_exit_tfm(struct crypto_skcipher *tfm)
- {
-- struct qat_alg_ablkcipher_ctx *ctx = crypto_tfm_ctx(tfm);
-+ struct qat_alg_skcipher_ctx *ctx = crypto_skcipher_ctx(tfm);
- struct qat_crypto_instance *inst = ctx->inst;
- struct device *dev;
-
-@@ -1117,15 +1239,15 @@ static void qat_alg_ablkcipher_exit(struct crypto_tfm *tfm)
-
- dev = &GET_DEV(inst->accel_dev);
- if (ctx->enc_cd) {
-- memzero_explicit(ctx->enc_cd,
-- sizeof(struct icp_qat_hw_cipher_algo_blk));
-+ memset(ctx->enc_cd, 0,
-+ sizeof(struct icp_qat_hw_cipher_algo_blk));
- dma_free_coherent(dev,
- sizeof(struct icp_qat_hw_cipher_algo_blk),
- ctx->enc_cd, ctx->enc_cd_paddr);
- }
- if (ctx->dec_cd) {
-- memzero_explicit(ctx->dec_cd,
-- sizeof(struct icp_qat_hw_cipher_algo_blk));
-+ memset(ctx->dec_cd, 0,
-+ sizeof(struct icp_qat_hw_cipher_algo_blk));
- dma_free_coherent(dev,
- sizeof(struct icp_qat_hw_cipher_algo_blk),
- ctx->dec_cd, ctx->dec_cd_paddr);
-@@ -1187,92 +1309,75 @@ static struct aead_alg qat_aeads[] = { {
- .maxauthsize = SHA512_DIGEST_SIZE,
- } };
-
--static struct crypto_alg qat_algs[] = { {
-- .cra_name = "cbc(aes)",
-- .cra_driver_name = "qat_aes_cbc",
-- .cra_priority = 4001,
-- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
-- .cra_blocksize = AES_BLOCK_SIZE,
-- .cra_ctxsize = sizeof(struct qat_alg_ablkcipher_ctx),
-- .cra_alignmask = 0,
-- .cra_type = &crypto_ablkcipher_type,
-- .cra_module = THIS_MODULE,
-- .cra_init = qat_alg_ablkcipher_init,
-- .cra_exit = qat_alg_ablkcipher_exit,
-- .cra_u = {
-- .ablkcipher = {
-- .setkey = qat_alg_ablkcipher_cbc_setkey,
-- .decrypt = qat_alg_ablkcipher_decrypt,
-- .encrypt = qat_alg_ablkcipher_encrypt,
-- .min_keysize = AES_MIN_KEY_SIZE,
-- .max_keysize = AES_MAX_KEY_SIZE,
-- .ivsize = AES_BLOCK_SIZE,
-- },
-- },
-+static struct skcipher_alg qat_skciphers[] = { {
-+ .base.cra_name = "cbc(aes)",
-+ .base.cra_driver_name = "qat_aes_cbc",
-+ .base.cra_priority = 4001,
-+ .base.cra_flags = CRYPTO_ALG_ASYNC,
-+ .base.cra_blocksize = AES_BLOCK_SIZE,
-+ .base.cra_ctxsize = sizeof(struct qat_alg_skcipher_ctx),
-+ .base.cra_alignmask = 0,
-+ .base.cra_module = THIS_MODULE,
-+
-+ .init = qat_alg_skcipher_init_tfm,
-+ .exit = qat_alg_skcipher_exit_tfm,
-+ .setkey = qat_alg_skcipher_cbc_setkey,
-+ .decrypt = qat_alg_skcipher_blk_decrypt,
-+ .encrypt = qat_alg_skcipher_blk_encrypt,
-+ .min_keysize = AES_MIN_KEY_SIZE,
-+ .max_keysize = AES_MAX_KEY_SIZE,
-+ .ivsize = AES_BLOCK_SIZE,
- }, {
-- .cra_name = "ctr(aes)",
-- .cra_driver_name = "qat_aes_ctr",
-- .cra_priority = 4001,
-- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
-- .cra_blocksize = AES_BLOCK_SIZE,
-- .cra_ctxsize = sizeof(struct qat_alg_ablkcipher_ctx),
-- .cra_alignmask = 0,
-- .cra_type = &crypto_ablkcipher_type,
-- .cra_module = THIS_MODULE,
-- .cra_init = qat_alg_ablkcipher_init,
-- .cra_exit = qat_alg_ablkcipher_exit,
-- .cra_u = {
-- .ablkcipher = {
-- .setkey = qat_alg_ablkcipher_ctr_setkey,
-- .decrypt = qat_alg_ablkcipher_decrypt,
-- .encrypt = qat_alg_ablkcipher_encrypt,
-- .min_keysize = AES_MIN_KEY_SIZE,
-- .max_keysize = AES_MAX_KEY_SIZE,
-- .ivsize = AES_BLOCK_SIZE,
-- },
-- },
-+ .base.cra_name = "ctr(aes)",
-+ .base.cra_driver_name = "qat_aes_ctr",
-+ .base.cra_priority = 4001,
-+ .base.cra_flags = CRYPTO_ALG_ASYNC,
-+ .base.cra_blocksize = 1,
-+ .base.cra_ctxsize = sizeof(struct qat_alg_skcipher_ctx),
-+ .base.cra_alignmask = 0,
-+ .base.cra_module = THIS_MODULE,
-+
-+ .init = qat_alg_skcipher_init_tfm,
-+ .exit = qat_alg_skcipher_exit_tfm,
-+ .setkey = qat_alg_skcipher_ctr_setkey,
-+ .decrypt = qat_alg_skcipher_decrypt,
-+ .encrypt = qat_alg_skcipher_encrypt,
-+ .min_keysize = AES_MIN_KEY_SIZE,
-+ .max_keysize = AES_MAX_KEY_SIZE,
-+ .ivsize = AES_BLOCK_SIZE,
- }, {
-- .cra_name = "xts(aes)",
-- .cra_driver_name = "qat_aes_xts",
-- .cra_priority = 4001,
-- .cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC,
-- .cra_blocksize = AES_BLOCK_SIZE,
-- .cra_ctxsize = sizeof(struct qat_alg_ablkcipher_ctx),
-- .cra_alignmask = 0,
-- .cra_type = &crypto_ablkcipher_type,
-- .cra_module = THIS_MODULE,
-- .cra_init = qat_alg_ablkcipher_init,
-- .cra_exit = qat_alg_ablkcipher_exit,
-- .cra_u = {
-- .ablkcipher = {
-- .setkey = qat_alg_ablkcipher_xts_setkey,
-- .decrypt = qat_alg_ablkcipher_decrypt,
-- .encrypt = qat_alg_ablkcipher_encrypt,
-- .min_keysize = 2 * AES_MIN_KEY_SIZE,
-- .max_keysize = 2 * AES_MAX_KEY_SIZE,
-- .ivsize = AES_BLOCK_SIZE,
-- },
-- },
-+ .base.cra_name = "xts(aes)",
-+ .base.cra_driver_name = "qat_aes_xts",
-+ .base.cra_priority = 4001,
-+ .base.cra_flags = CRYPTO_ALG_ASYNC,
-+ .base.cra_blocksize = AES_BLOCK_SIZE,
-+ .base.cra_ctxsize = sizeof(struct qat_alg_skcipher_ctx),
-+ .base.cra_alignmask = 0,
-+ .base.cra_module = THIS_MODULE,
-+
-+ .init = qat_alg_skcipher_init_tfm,
-+ .exit = qat_alg_skcipher_exit_tfm,
-+ .setkey = qat_alg_skcipher_xts_setkey,
-+ .decrypt = qat_alg_skcipher_blk_decrypt,
-+ .encrypt = qat_alg_skcipher_blk_encrypt,
-+ .min_keysize = 2 * AES_MIN_KEY_SIZE,
-+ .max_keysize = 2 * AES_MAX_KEY_SIZE,
-+ .ivsize = AES_BLOCK_SIZE,
- } };
-
- int qat_algs_register(void)
- {
-- int ret = 0, i;
-+ int ret = 0;
-
- mutex_lock(&algs_lock);
- if (++active_devs != 1)
- goto unlock;
-
-- for (i = 0; i < ARRAY_SIZE(qat_algs); i++)
-- qat_algs[i].cra_flags = CRYPTO_ALG_TYPE_ABLKCIPHER | CRYPTO_ALG_ASYNC;
--
-- ret = crypto_register_algs(qat_algs, ARRAY_SIZE(qat_algs));
-+ ret = crypto_register_skciphers(qat_skciphers,
-+ ARRAY_SIZE(qat_skciphers));
- if (ret)
- goto unlock;
-
-- for (i = 0; i < ARRAY_SIZE(qat_aeads); i++)
-- qat_aeads[i].base.cra_flags = CRYPTO_ALG_ASYNC;
--
- ret = crypto_register_aeads(qat_aeads, ARRAY_SIZE(qat_aeads));
- if (ret)
- goto unreg_algs;
-@@ -1282,7 +1387,7 @@ unlock:
- return ret;
-
- unreg_algs:
-- crypto_unregister_algs(qat_algs, ARRAY_SIZE(qat_algs));
-+ crypto_unregister_skciphers(qat_skciphers, ARRAY_SIZE(qat_skciphers));
- goto unlock;
- }
-
-@@ -1293,9 +1398,8 @@ void qat_algs_unregister(void)
- goto unlock;
-
- crypto_unregister_aeads(qat_aeads, ARRAY_SIZE(qat_aeads));
-- crypto_unregister_algs(qat_algs, ARRAY_SIZE(qat_algs));
-+ crypto_unregister_skciphers(qat_skciphers, ARRAY_SIZE(qat_skciphers));
-
- unlock:
- mutex_unlock(&algs_lock);
- }
--#endif
-diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/qat_crypto.h b/quickassist/qat/drivers/crypto/qat/qat_common/qat_crypto.h
-index dc0273f..300bb91 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_crypto.h
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_crypto.h
-@@ -79,15 +79,17 @@ struct qat_crypto_request {
- struct icp_qat_fw_la_bulk_req req;
- union {
- struct qat_alg_aead_ctx *aead_ctx;
-- struct qat_alg_ablkcipher_ctx *ablkcipher_ctx;
-+ struct qat_alg_skcipher_ctx *skcipher_ctx;
- };
- union {
- struct aead_request *aead_req;
-- struct ablkcipher_request *ablkcipher_req;
-+ struct skcipher_request *skcipher_req;
- };
- struct qat_crypto_request_buffs buf;
- void (*cb)(struct icp_qat_fw_la_resp *resp,
- struct qat_crypto_request *req);
-+ void *iv;
-+ dma_addr_t iv_paddr;
- };
-
- #endif
---
-2.24.1
-
diff --git a/recipes-extended/qat/files/use-CC-for-LD.patch b/recipes-extended/qat/files/use-CC-for-LD.patch
deleted file mode 100644
index 36ceedf..0000000
--- a/recipes-extended/qat/files/use-CC-for-LD.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Use CC to do the linking, helps in linking with gold or bfd linker
-
-Upstream-Status: Inappropriate [OE-Specific]
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-Index: QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk
-===================================================================
---- QAT1.6.orig/quickassist/build_system/build_files/OS/linux_2.6.mk
-+++ QAT1.6/quickassist/build_system/build_files/OS/linux_2.6.mk
-@@ -89,7 +89,7 @@ EXTRA_CFLAGS+= -Wno-div-by-zero -Wfloat-
- endif
-
-
--LIB_SHARED_FLAGS+=-shared -soname $(LIB_SHARED)
-+LIB_SHARED_FLAGS+=-shared -Wl,-soname,$(LIB_SHARED)
- LIB_STATIC_FLAGS=
- EXE_FLAGS?=
-
diff --git a/recipes-extended/qat/qat16.inc b/recipes-extended/qat/qat16.inc
deleted file mode 100644
index c653884..0000000
--- a/recipes-extended/qat/qat16.inc
+++ /dev/null
@@ -1,132 +0,0 @@
-DESCRIPTION = "Intel(r) QuickAssist Technology API"
-HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches"
-
-#Dual BSD and GPLv2 License
-LICENSE = "BSD & GPLv2"
-LIC_FILES_CHKSUM = "\
- file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
- file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
- "
-
-DEPENDS += "zlib openssl10"
-PROVIDES += "virtual/qat"
-
-SRC_URI="file://qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch \
- file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
- file://qat16_2.3.0-34-make-sure-CFLAGS-are-correct.patch \
- file://qat16_2.5.0-80-qat-change-in-return-type-of-func-in-kernel-v4.4.patch \
- file://qat16_2.5.0-80-qat-Added-include-dir-path.patch \
- file://qat16-Osal-fix-build-with-x32.patch \
- "
-
-COMPATIBLE_MACHINE = "null"
-
-S = "${WORKDIR}/${ICP_DRIVER_TYPE}"
-ICP_TOOLS = "accelcomp"
-SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
-TARGET_CC_ARCH += "$(LDFLAGS)"
-
-export ICP_DRIVER_TYPE = "QAT1.6"
-export ICP_FIRMWARE_DIR="dh895xcc"
-export ICP_ROOT = "${S}"
-export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
-export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
-export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
-export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
-export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
-export ICP_BUILD_OUTPUT = "${D}"
-export DEST_LIBDIR = "${libdir}"
-export DEST_BINDIR = "${bindir}"
-export QAT_KERNEL_VER = "${KERNEL_VERSION}"
-export SAMPLE_BUILD_OUTPUT = "${D}"
-export MODULE_DIR = "${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers"
-
-inherit module
-inherit update-rc.d
-INITSCRIPT_NAME = "qat_service"
-
-PARALLEL_MAKE = ""
-
-#To get around the double slashes in paths in QAT makefiles
-PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src"
-
-EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-do_unpack2() {
- cd ${S}/
- tar xzvf ${ICP_DRIVER_TYPE}.L.${PV}.tar.gz
-}
-
-addtask unpack2 after do_unpack before do_patch
-
-do_compile () {
- export LD="${CC} -Wl,--hash-style=gnu -nostartfiles -nodefaultlibs"
- export MACHINE="${TARGET_ARCH}"
- cd ${S}/quickassist
- oe_runmake
-
- cd ${SAMPLE_CODE_DIR}
- touch ${SAMPLE_CODE_DIR}/performance/compression/calgary
- touch ${SAMPLE_CODE_DIR}/performance/compression/canterbury
-
- #build the whole sample code: fips, functional, performance
- oe_runmake 'all'
- oe_runmake 'fips_user_code'
-}
-
-do_install() {
- export MACHINE="${TARGET_ARCH}"
- cd ${S}/quickassist
- oe_runmake install
-
- cd ${SAMPLE_CODE_DIR}
- oe_runmake install
-
- install -d ${D}/etc/udev/rules.d \
- ${D}${includedir} \
- ${D}${includedir}/dc \
- ${D}${includedir}/lac \
- ${D}${sysconfdir}/dh895xcc \
- ${D}${base_libdir}/firmware
-
- echo 'KERNEL=="icp_adf_ctl" MODE="0600"' > ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
- echo 'KERNEL=="icp_dev[0-9]*" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
- echo 'KERNEL=="icp_dev_mem?" MODE="0600"' >> ${D}/etc/udev/rules.d/00-dh895xcc_qa.rules
-
- install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
- install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
- install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
- install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
-
- install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary ${D}${base_libdir}/firmware
- install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/canterbury ${D}${base_libdir}/firmware
-
- install -m 660 ${S}/quickassist/config/dh* ${D}${sysconfdir}/dh895xcc
-}
-
-PACKAGES += "${PN}-app"
-
-FILES_${PN}-dev = "${includedir}"
-
-FILES_${PN} += "\
- ${base_libdir}/firmware/ \
- ${sysconfdir}/ \
- ${sysconfdir}/udev/rules.d/ \
- ${sysconfdir}/init.d/ \
- ${libdir}/ \
- "
-
-FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug"
-
-FILES_${PN}-app += "${bindir}/*"
-
-EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"
-
-# Support for 4.14 not yet available
-python () {
- if d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel" and \
- d.getVar("PREFERRED_VERSION_linux-intel") == "4.14%" or \
- d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel-rt" and \
- d.getVar("PREFERRED_VERSION_linux-intel-rt") == "4.14%":
- raise bb.parse.SkipPackage("This version of QAT has not been tested with Linux Kernel 4.14 or newer.")
-}
diff --git a/recipes-extended/qat/qat16_2.6.0-65.bb b/recipes-extended/qat/qat16_2.6.0-65.bb
deleted file mode 100644
index 88cf66c..0000000
--- a/recipes-extended/qat/qat16_2.6.0-65.bb
+++ /dev/null
@@ -1,16 +0,0 @@
-include qat16.inc
-
-SRC_URI += "https://01.org/sites/default/files/page/qatmux.l.2.6.0-60.tgz;name=qat \
- file://qat16_2.6.0-65-qat-add-install-target-to-makefiles.patch \
- file://qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \
- file://use-CC-for-LD.patch \
- "
-
-SRC_URI_append_libc-musl = " file://0001-OsalServices-Only-use-bits-time-with-GLIBC.patch"
-
-SRC_URI[qat.md5sum] = "c54e877fb9fbb4690a9bd50793268bcf"
-SRC_URI[qat.sha256sum] = "872046ffdf02f664d12a56cdb880403d65b914b303b75875707a9eebd9c841f5"
-
-do_install_append() {
- install -m 0755 ${SAMPLE_CODE_DIR}/performance/compression/calgary32 ${D}${base_libdir}/firmware
-}
diff --git a/recipes-extended/qat/qat17_4.24.0-00005.bb b/recipes-extended/qat/qat17_4.24.0-00005.bb
new file mode 100644
index 0000000..f875334
--- /dev/null
+++ b/recipes-extended/qat/qat17_4.24.0-00005.bb
@@ -0,0 +1,193 @@
+DESCRIPTION = "Intel(r) QuickAssist Technology API"
+HOMEPAGE = "https://www.intel.com/content/www/us/en/developer/topic-technology/open/quick-assist-technology/overview.html"
+
+#Dual BSD and GPLv2 License
+LICENSE = "BSD-3-Clause & GPL-2.0-only"
+LIC_FILES_CHKSUM = "\
+ file://LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \
+ file://LICENSE.BSD;md5=7e3723742f05cc28b730c136742b3b80 \
+ "
+DEPENDS += "boost udev zlib openssl nasm-native"
+PROVIDES += "virtual/qat"
+
+TARGET_CC_ARCH += "${LDFLAGS}"
+
+SRC_URI = "https://downloadmirror.intel.com/795697/QAT.L.4.24.0-00005.tar.gz;subdir=qat17 \
+ file://0001-qat-fix-for-cross-compilation-issue.patch \
+ file://0002-qat-remove-local-path-from-makefile.patch \
+ file://0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \
+ file://0004-update-KDIR-for-cross-compilation.patch \
+ file://0005-Added-include-dir-path.patch \
+ file://0006-qat-add-install-target-and-add-folder.patch \
+ file://0001-usdm_drv-convert-mutex_lock-to-mutex_trylock-to-avio.patch \
+ file://qat-remove-the-deprecated-pci-dma-compat.h-API.patch \
+ file://fix-redefinition-of-crypto_request_complete.patch \
+ file://build_fix.patch \
+ "
+
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
+
+SRC_URI[sha256sum] = "d32546a312828ef0450ddb1543905b06880aa1eb46a8f3fad71a60292052292b"
+
+COMPATIBLE_MACHINE = "null"
+COMPATIBLE_HOST:x86-x32 = 'null'
+COMPATIBLE_HOST:libc-musl:class-target = 'null'
+
+S = "${WORKDIR}/qat17"
+ICP_TOOLS = "accelcomp"
+SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
+QAT_HEADER_FILES = "/opt/intel/QAT/quickassist"
+HUGE_PAGE_DIR = "/dev/hugepages/qat"
+
+export INSTALL_MOD_PATH = "${D}"
+export ICP_ROOT = "${S}"
+export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
+export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
+export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
+export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
+export INSTALL_FW_PATH = "${D}${base_libdir}/firmware"
+export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
+export ICP_BUILD_OUTPUT = "${D}"
+export DEST_LIBDIR = "${libdir}"
+export DEST_BINDIR = "${bindir}"
+export QAT_KERNEL_VER = "${KERNEL_VERSION}"
+export SAMPLE_BUILD_OUTPUT = "${D}"
+export INSTALL_MOD_DIR = "${D}${base_libdir}/modules/${KERNEL_VERSION}"
+export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
+export SC_EPOLL_DISABLED = "1"
+export WITH_UPSTREAM = "1"
+export WITH_CMDRV = "1"
+export KERNEL_SOURCE_DIR = "${ICP_ROOT}/quickassist/qat/"
+export ICP_NO_CLEAN = "1"
+export ICP_QDM_IOMMU = "1"
+
+inherit module
+inherit update-rc.d
+INITSCRIPT_NAME = "qat_service"
+
+PARALLEL_MAKE = ""
+
+EXTRA_OEMAKE:append = " CFLAGS+='-fgnu89-inline -fPIC'"
+EXTRA_OEMAKE = "-e MAKEFLAGS="
+
+do_compile () {
+ export LD="${LD} --hash-style=gnu"
+ export MACHINE="${TARGET_ARCH}"
+
+ cd ${S}/quickassist/qat
+ oe_runmake
+ oe_runmake 'modules_install'
+
+ cd ${S}/quickassist
+ oe_runmake
+
+ cd ${S}/quickassist/utilities/adf_ctl
+ oe_runmake
+
+ cd ${S}/quickassist/utilities/libusdm_drv
+ oe_runmake
+
+ cd ${S}/quickassist/lookaside/access_layer/src/qat_direct/src/
+ oe_runmake
+
+ #build the whole sample code: per_user only
+ cd ${SAMPLE_CODE_DIR}
+ oe_runmake 'perf_user'
+}
+
+do_install() {
+ export MACHINE="${TARGET_ARCH}"
+
+ cd ${S}/quickassist
+ oe_runmake install
+
+ cd ${S}/quickassist/qat
+ oe_runmake modules_install
+
+ install -d ${D}${sysconfdir}/udev/rules.d
+ install -d ${D}${sbindir}
+ install -d ${D}${sysconfdir}/conf_files
+ install -d ${D}${prefix}/src/qat
+
+ echo 'KERNEL=="qat_adf_ctl" MODE="0660" GROUP="qat"' > ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'KERNEL=="qat_dev_processes" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'KERNEL=="usdm_drv" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'KERNEL=="uio*" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'ACTION=="add", DEVPATH=="/module/usdm_drv" SUBSYSTEM=="module" RUN+="/bin/mkdir ${HUGE_PAGE_DIR}"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'ACTION=="add", DEVPATH=="/module/usdm_drv" SUBSYSTEM=="module" RUN+="/bin/chgrp qat ${HUGE_PAGE_DIR}"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'ACTION=="add", DEVPATH=="/module/usdm_drv" SUBSYSTEM=="module" RUN+="/bin/chmod 0770 ${HUGE_PAGE_DIR}"' >> ${D}/etc/udev/rules.d/00-qat.rules
+ echo 'ACTION=="remove", DEVPATH=="/module/usdm_drv" SUBSYSTEM=="module" RUN+="/bin/rmdir ${HUGE_PAGE_DIR}"' >> ${D}/etc/udev/rules.d/00-qat.rules
+
+ mkdir -p ${D}${base_libdir}
+
+ install -D -m 0755 ${S}/quickassist/lookaside/access_layer/src/build/linux_2.6/user_space/libqat_s.so ${D}${base_libdir}
+ install -D -m 0644 ${S}/quickassist/lookaside/access_layer/src/build/linux_2.6/user_space/libqat.a ${D}${base_libdir}
+ install -D -m 0755 ${S}/quickassist/utilities/osal/src/build/linux_2.6/user_space/libosal_s.so ${D}${base_libdir}
+ install -D -m 0644 ${S}/quickassist/utilities/osal/src/build/linux_2.6/user_space/libosal.a ${D}${base_libdir}
+ install -D -m 0644 ${S}/quickassist/lookaside/access_layer/src/qat_direct/src/libadf_user.a ${D}${base_libdir}/libadf.a
+ install -D -m 0755 ${S}/quickassist/utilities/libusdm_drv/libusdm_drv_s.so ${D}${base_libdir}
+ install -D -m 0644 ${S}/quickassist/utilities/libusdm_drv/libusdm_drv.a ${D}${base_libdir}
+ install -D -m 0750 ${S}/quickassist/utilities/adf_ctl/adf_ctl ${D}${sbindir}
+
+ install -D -m 0644 ${S}/quickassist/utilities/adf_ctl/conf_files/*.conf ${D}${sysconfdir}/conf_files
+ install -D -m 0644 ${S}/quickassist/utilities/adf_ctl/conf_files/*.conf.vm ${D}${sysconfdir}/conf_files
+
+ install -m 0644 ${S}/quickassist/qat/fw/qat_d15xx.bin ${D}${nonarch_base_libdir}/firmware
+ install -m 0644 ${S}/quickassist/qat/fw/qat_d15xx_mmp.bin ${D}${nonarch_base_libdir}/firmware
+
+ # ICE-D LCC
+ install -m 0644 ${S}/quickassist/qat/fw/qat_200xx.bin ${D}${nonarch_base_libdir}/firmware
+ install -m 0644 ${S}/quickassist/qat/fw/qat_200xx_mmp.bin ${D}${nonarch_base_libdir}/firmware
+
+ # ICE-D HCC
+ install -m 0644 ${S}/quickassist/qat/fw/qat_c4xxx.bin ${D}${nonarch_base_libdir}/firmware
+ install -m 0644 ${S}/quickassist/qat/fw/qat_c4xxx_mmp.bin ${D}${nonarch_base_libdir}/firmware
+
+ install -d ${D}${QAT_HEADER_FILES}/include
+ install -d ${D}${QAT_HEADER_FILES}/include/dc
+ install -d ${D}${QAT_HEADER_FILES}/include/lac
+ install -d ${D}${QAT_HEADER_FILES}/lookaside/access_layer/include
+ install -d ${D}${QAT_HEADER_FILES}/utilities/libusdm_drv
+
+ install -m 0644 ${S}/quickassist/include/*.h ${D}${QAT_HEADER_FILES}/include
+ install -m 0644 ${S}/quickassist/include/dc/*.h ${D}${QAT_HEADER_FILES}/include/dc
+ install -m 0644 ${S}/quickassist/include/lac/*.h ${D}${QAT_HEADER_FILES}/include/lac
+ install -m 0644 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${QAT_HEADER_FILES}/lookaside/access_layer/include
+ install -m 0644 ${S}/quickassist/utilities/libusdm_drv/*.h ${D}${QAT_HEADER_FILES}/utilities/libusdm_drv
+
+ install -m 0644 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary ${D}${nonarch_base_libdir}/firmware
+ install -m 0644 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary32 ${D}${nonarch_base_libdir}/firmware
+ install -m 0644 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/canterbury ${D}${nonarch_base_libdir}/firmware
+
+ #install qat source
+ cp ${DL_DIR}/QAT.L.${PV}.tar.gz ${D}${prefix}/src/qat/
+}
+
+SYSROOT_DIRS += "/opt"
+
+PACKAGES += "${PN}-app"
+
+FILES:${PN}-dev = "${QAT_HEADER_FILES}/ \
+ ${nonarch_base_libdir}/*.a \
+ "
+
+FILES:${PN} += "\
+ ${libdir}/ \
+ ${nonarch_base_libdir}/firmware \
+ ${sysconfdir}/ \
+ ${sbindir}/ \
+ ${base_libdir}/*.so \
+ ${prefix}/src/qat \
+ "
+
+FILES:${PN}-dbg += "${sysconfdir}/init.d/.debug/ \
+ "
+
+FILES:${PN}-app += "${bindir}/* \
+ ${prefix}/qat \
+ "
+
+# yasm encodes path to the input file and doesn't provide any option to workaround it.
+INSANE_SKIP:${PN}-staticdev += "buildpaths"
+INSANE_SKIP:${PN}-dbg += "buildpaths"
+INSANE_SKIP:kernel-module-intel-qat${KERNEL_MODULE_PACKAGE_SUFFIX} += "buildpaths"
diff --git a/recipes-extended/qat/qat17_4.7.0-00006.bb b/recipes-extended/qat/qat17_4.7.0-00006.bb
deleted file mode 100644
index 693a2f8..0000000
--- a/recipes-extended/qat/qat17_4.7.0-00006.bb
+++ /dev/null
@@ -1,170 +0,0 @@
-DESCRIPTION = "Intel(r) QuickAssist Technology API"
-HOMEPAGE = "https://01.org/packet-processing/intel%C2%AE-quickassist-technology-drivers-and-patches"
-
-#Dual BSD and GPLv2 License
-LICENSE = "BSD & GPLv2"
-LIC_FILES_CHKSUM = "\
- file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
- file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb \
- "
-DEPENDS += "boost udev zlib openssl"
-PROVIDES += "virtual/qat"
-
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-SRC_URI = "https://01.org/sites/default/files/downloads/qat1.7.l.4.7.0-00006.tar.gz;subdir=qat17 \
- file://qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch \
- file://qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch \
- file://qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch \
- file://qat17_0.8.0-37-qat-added-include-dir-path.patch \
- file://qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch \
- file://qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch \
- file://qat17_4.7.0-00006-Link-driver-with-object-files.patch \
- file://qat17_4.7.0-00006-Drop-pr_warning-definition.patch \
- "
-
-python __anonymous () {
- if d.getVar("KERNEL_VERSION") >= "5.5%":
- d.appendVar('SRC_URI', "file://qat17_4.7.0-00006-Switch-to-skcipher-API.patch")
-}
-
-SRC_URI[md5sum] = "ac939b51cc8836c182e31e309c065002"
-SRC_URI[sha256sum] = "5c8bdc35fd7a42f212f1f87eb9e3d8584df7af56dae366debc487981e531fa5c"
-
-COMPATIBLE_MACHINE = "null"
-COMPATIBLE_HOST_x86-x32 = 'null'
-COMPATIBLE_HOST_libc-musl_class-target = 'null'
-
-S = "${WORKDIR}/qat17"
-ICP_TOOLS = "accelcomp"
-SAMPLE_CODE_DIR = "${S}/quickassist/lookaside/access_layer/src/sample_code"
-export INSTALL_MOD_PATH = "${D}"
-export ICP_ROOT = "${S}"
-export ICP_ENV_DIR = "${S}/quickassist/build_system/build_files/env_files"
-export ICP_BUILDSYSTEM_PATH = "${S}/quickassist/build_system"
-export ICP_TOOLS_TARGET = "${ICP_TOOLS}"
-export FUNC_PATH = "${ICP_ROOT}/quickassist/lookaside/access_layer/src/sample_code/functional"
-export INSTALL_FW_PATH = "${D}${base_libdir}/firmware"
-export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
-export ICP_BUILD_OUTPUT = "${D}"
-export DEST_LIBDIR = "${libdir}"
-export DEST_BINDIR = "${bindir}"
-export QAT_KERNEL_VER = "${KERNEL_VERSION}"
-export SAMPLE_BUILD_OUTPUT = "${D}"
-export INSTALL_MOD_DIR = "${D}${base_libdir}/modules/${KERNEL_VERSION}"
-export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
-export SC_EPOLL_DISABLED = "1"
-export WITH_UPSTREAM = "1"
-export WITH_CMDRV = "1"
-export KERNEL_SOURCE_DIR = "${ICP_ROOT}/quickassist/qat/"
-export ICP_NO_CLEAN = "1"
-
-inherit module
-inherit update-rc.d
-INITSCRIPT_NAME = "qat_service"
-
-PARALLEL_MAKE = ""
-
-EXTRA_OEMAKE_append = " CFLAGS+='-fgnu89-inline -fPIC'"
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-
-do_compile () {
- export LD="${LD} --hash-style=gnu"
- export MACHINE="${TARGET_ARCH}"
-
- cd ${S}/quickassist/qat
- oe_runmake
- oe_runmake 'modules_install'
-
- cd ${S}/quickassist
- oe_runmake
-
- cd ${S}/quickassist/utilities/adf_ctl
- oe_runmake
-
- cd ${S}/quickassist/utilities/libusdm_drv
- oe_runmake
-
- cd ${S}/quickassist/lookaside/access_layer/src/qat_direct/src/
- oe_runmake
-
- #build the whole sample code: per_user only
- cd ${SAMPLE_CODE_DIR}
- oe_runmake 'perf_user'
-}
-
-do_install() {
- export MACHINE="${TARGET_ARCH}"
-
- cd ${S}/quickassist
- oe_runmake install
-
- cd ${S}/quickassist/qat
- oe_runmake modules_install
-
- install -d ${D}${sysconfdir}/udev/rules.d
- install -d ${D}${sbindir}
- install -d ${D}${sysconfdir}/conf_files
- install -d ${D}${prefix}/src/qat
- install -d ${D}${includedir}
- install -d ${D}${includedir}/dc
- install -d ${D}${includedir}/lac
-
- echo 'KERNEL=="qat_adf_ctl" MODE="0660" GROUP="qat"' > ${D}/etc/udev/rules.d/00-qat.rules
- echo 'KERNEL=="qat_dev_processes" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
- echo 'KERNEL=="usdm_drv" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
- echo 'KERNEL=="uio*" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
- echo 'KERNEL=="hugepages" MODE="0660" GROUP="qat"' >> ${D}/etc/udev/rules.d/00-qat.rules
-
- mkdir -p ${D}${base_libdir}
-
- install -D -m 0755 ${S}/quickassist/lookaside/access_layer/src/build/linux_2.6/user_space/libqat_s.so ${D}${base_libdir}
- install -D -m 0755 ${S}/quickassist/lookaside/access_layer/src/build/linux_2.6/user_space/libqat.a ${D}${base_libdir}
- install -D -m 0755 ${S}/quickassist/utilities/osal/src/build/linux_2.6/user_space/libosal_s.so ${D}${base_libdir}
- install -D -m 0755 ${S}/quickassist/utilities/osal/src/build/linux_2.6/user_space/libosal.a ${D}${base_libdir}
- install -D -m 0755 ${S}/quickassist/lookaside/access_layer/src/qat_direct/src/build/linux_2.6/user_space/libadf_user.a ${D}${base_libdir}/libadf.a
- install -D -m 0755 ${S}/quickassist/utilities/libusdm_drv/libusdm_drv_s.so ${D}${base_libdir}
- install -D -m 0755 ${S}/quickassist/utilities/libusdm_drv/libusdm_drv.a ${D}${base_libdir}
- install -D -m 0750 ${S}/quickassist/utilities/adf_ctl/adf_ctl ${D}${sbindir}
-
- install -D -m 640 ${S}/quickassist/utilities/adf_ctl/conf_files/*.conf ${D}${sysconfdir}/conf_files
- install -D -m 640 ${S}/quickassist/utilities/adf_ctl/conf_files/*.conf.vm ${D}${sysconfdir}/conf_files
-
- install -m 0755 ${S}/quickassist/qat/fw/qat_d15xx.bin ${D}${nonarch_base_libdir}/firmware
- install -m 0755 ${S}/quickassist/qat/fw/qat_d15xx_mmp.bin ${D}${nonarch_base_libdir}/firmware
-
- install -m 640 ${S}/quickassist/include/*.h ${D}${includedir}
- install -m 640 ${S}/quickassist/include/dc/*.h ${D}${includedir}/dc/
- install -m 640 ${S}/quickassist/include/lac/*.h ${D}${includedir}/lac/
- install -m 640 ${S}/quickassist/lookaside/access_layer/include/*.h ${D}${includedir}
- install -m 640 ${S}/quickassist/utilities/libusdm_drv/*.h ${D}${includedir}
-
- install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary ${D}${nonarch_base_libdir}/firmware
- install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/calgary32 ${D}${nonarch_base_libdir}/firmware
- install -m 0755 ${S}/quickassist/lookaside/access_layer/src/sample_code/performance/compression/canterbury ${D}${nonarch_base_libdir}/firmware
-
- #install qat source
- cp ${DL_DIR}/qat1.7.l.${PV}.tar.gz ${D}${prefix}/src/qat/
-}
-
-PACKAGES += "${PN}-app"
-
-FILES_${PN}-dev = "${includedir}/ \
- ${nonarch_base_libdir}/*.a \
- "
-
-FILES_${PN} += "\
- ${libdir}/ \
- ${nonarch_base_libdir}/firmware \
- ${sysconfdir}/ \
- ${sbindir}/ \
- ${base_libdir}/*.so \
- ${prefix}/src/qat \
- "
-
-FILES_${PN}-dbg += "${sysconfdir}/init.d/.debug/ \
- "
-
-FILES_${PN}-app += "${bindir}/* \
- ${prefix}/qat \
- "
diff --git a/recipes-extended/qatlib/qatlib_23.11.0.bb b/recipes-extended/qatlib/qatlib_23.11.0.bb
new file mode 100644
index 0000000..903a4c9
--- /dev/null
+++ b/recipes-extended/qatlib/qatlib_23.11.0.bb
@@ -0,0 +1,36 @@
+DESCRIPTION = "Intel QuickAssist Technology Library (QATlib)"
+HOMEPAGE = "https://github.com/intel/qatlib"
+
+LICENSE = "BSD-3-Clause"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=64dc5eee9d532c8a1633bb63ed0d1aac"
+
+COMPATIBLE_HOST:x86-x32 = 'null'
+COMPATIBLE_HOST:libc-musl:class-target = 'null'
+
+SRC_URI = "git://github.com/intel/qatlib.git;protocol=https;branch=main"
+SRCREV = "142e305970ec66a860945d20bb7c330f99ed900b"
+
+S = "${WORKDIR}/git"
+
+inherit autotools-brokensep systemd useradd
+
+DEPENDS = "openssl zlib nasm-native"
+
+USERADD_PACKAGES = "${PN}"
+GROUPADD_PARAM:${PN} = "qat"
+
+SYSTEMD_SERVICE:${PN} = "qat.service"
+
+# The systemd unit path "/lib/systemd/system" cannot be correctly passed to build system of QATlib. So hardcode here.
+# Checking "cross_compiling" is not smart and sometimes causes fatal error due to wrong path of ELF file interpreter.
+EXTRA_OECONF += "systemdsystemunitdir=${systemd_system_unitdir} cross_compiling=yes"
+
+do_compile:append () {
+ oe_runmake samples
+}
+
+do_install:append () {
+ oe_runmake 'DESTDIR=${D}' samples-install
+}
+
+FILES:${PN} += "${datadir}/qat"
diff --git a/recipes-extended/qatzip/files/remove-rpath.patch b/recipes-extended/qatzip/files/remove-rpath.patch
new file mode 100644
index 0000000..2658c23
--- /dev/null
+++ b/recipes-extended/qatzip/files/remove-rpath.patch
@@ -0,0 +1,29 @@
+From 8e24408b8b8de6b35f60a489104eb65b635d23ad Mon Sep 17 00:00:00 2001
+From: Yongxin Liu <yongxin.liu@windriver.com>
+Date: Sun, 5 Jun 2022 16:05:43 +0800
+Subject: [PATCH] remove rpath
+
+The libraries of QAT have been installed to stardard search path,
+thus there is no need to hard code the path to executable files.
+
+Upstream-Status: Inappropriate [Yocto specific]
+
+Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index b000c03..be24ecf 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -143,7 +143,7 @@ AS_IF([test ! -z "${ICP_ROOT}"],
+ -I${ICP_ROOT}/quickassist/include/dc/ \
+ -I${ICP_ROOT}/quickassist/utilities/libusdm_drv/ \
+ -I${ICP_ROOT}/quickassist/lookaside/access_layer/include/ "
+- LDFLAGS+=" -Wl,-rpath,${ICP_ROOT}/build/ -L${ICP_ROOT}/build/ "
++ LDFLAGS+=" -L${ICP_ROOT}/build/ "
+ ]
+ )
+ AC_SUBST(ICP_INCLUDE_CFLAGS)
+--
diff --git a/recipes-extended/qatzip/qatzip_1.1.2.bb b/recipes-extended/qatzip/qatzip_1.1.2.bb
new file mode 100644
index 0000000..571b08e
--- /dev/null
+++ b/recipes-extended/qatzip/qatzip_1.1.2.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "QATzip is a user space library built on top of the Intel QAT user space library, \
+to offload the compression and decompression requests to the Intel Chipset Series."
+
+HOMEPAGE = "https://github.com/intel/QATzip"
+
+LICENSE = "BSD-3-Clause & GPL-2.0-only"
+LIC_FILES_CHKSUM = "\
+ file://LICENSE;md5=f7b7ac1ea80d2f68f359a2641b14df09 \
+ file://config_file/LICENSE.GPL;md5=751419260aa954499f7abaabaa882bbe \
+"
+SRC_URI = "git://github.com/intel/QATzip;protocol=https;branch=master \
+ file://remove-rpath.patch \
+"
+
+SRCREV = "fdee557b5bb640827758f121102dcf3583292b7a"
+
+DEPENDS += "qat17 util-linux-native lz4 "
+
+export ICP_ROOT = "${STAGING_DIR_TARGET}/opt/intel/QAT"
+export QZ_ROOT = "${S}"
+
+# static library required to compile qzip and test
+DISABLE_STATIC = ""
+
+COMPATIBLE_MACHINE = "null"
+
+inherit autotools-brokensep
+
+S = "${WORKDIR}/git"
+
+do_configure:prepend() {
+ cd ${S}
+ ./autogen.sh
+}
+
+do_compile() {
+ oe_runmake all
+}
+
+do_install:append() {
+ install -d ${D}${sysconfdir}/QATzip/conf_file
+ cp -r ${S}/config_file/* ${D}${sysconfdir}/QATzip/conf_file
+}
diff --git a/recipes-extended/zlib-qat/zlib-qat.inc b/recipes-extended/zlib-qat/zlib-qat.inc
deleted file mode 100644
index 9e631c1..0000000
--- a/recipes-extended/zlib-qat/zlib-qat.inc
+++ /dev/null
@@ -1,87 +0,0 @@
-SUMMARY = "Zlib QAT_MEM Memory Management Module for Intel Quick Assist \
-Technology"
-
-DESCRIPTION = "This software acelerates the data compression algorithm \
-in the zlib software library via the Intel QuickAssist Technology"
-
-HOMEPAGE = "http://zlib.net/"
-SECTION = "libs"
-LICENSE = "Zlib & GPLv2 & BSD"
-LIC_FILES_CHKSUM = "file://${WORKDIR}/zlib-${ZLIB_VERSION}/zlib.h;beginline=4;endline=23;md5=fde612df1e5933c428b73844a0c494fd \
- file://${COMMON_LICENSE_DIR}/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6 \
- file://${COMMON_LICENSE_DIR}/BSD;md5=3775480a712fc46a69647678acb234cb"
-
-# For target side versions of openssl enable support for OCF Linux driver
-# if they are available.
-DEPENDS += "cryptodev-linux pkgconfig udev"
-
-SRC_URI = "http://www.zlib.net/zlib-${ZLIB_VERSION}.tar.gz;name=zlib \
- "
-SRC_URI_append_libc-musl = " file://0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch"
-
-SRC_URI[zlib.md5sum] = "44d667c142d7cda120332623eab69f40"
-SRC_URI[zlib.sha256sum] = "36658cb768a54c1d4dec43c3116c27ed893e88b02ecfcb44f2166f9c0b7f2a0d"
-
-COMPATIBLE_MACHINE = "null"
-
-ZLIB_VERSION = "1.2.8"
-
-S = "${WORKDIR}/zlib-${ZLIB_VERSION}"
-
-export ICP_ROOT = "${S}"
-export ZLIB_ROOT = "${S}"
-export KERNEL_SOURCE_ROOT = "${STAGING_KERNEL_DIR}"
-export KERNEL_BUILDDIR = "${STAGING_KERNEL_BUILDDIR}"
-export ICP_LAC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/lac"
-export ICP_DC_API_DIR = "${STAGING_DIR_TARGET}${includedir}/dc"
-export ICP_BUILD_OUTPUT = "${STAGING_DIR_TARGET}"
-
-EXTRA_OEMAKE = "-e MAKEFLAGS="
-TARGET_CC_ARCH += "${LDFLAGS}"
-
-MEM_PATH = "${S}/contrib/qat"
-
-# We invoke base do_patch at end, to incorporate any local patch
-python do_patch() {
- bb.build.exec_func('zlibqat_do_patch', d)
- bb.build.exec_func('patch_do_patch', d)
-}
-
-do_configure() {
- ./configure --prefix=${prefix} --shared --libdir=${libdir}
-}
-
-do_compile() {
- unset CFLAGS CXXFLAGS
- oe_runmake
-
- cd ${S}/contrib/qat/qat_zlib_test
- oe_runmake
-}
-
-do_install() {
- install -m 0755 -d ${D}${bindir}/
- install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
-
- install -m 0755 zpipe ${D}${bindir}
- install -m 0755 minigzip ${D}${bindir}
-
- cd ${S}/contrib/qat/qat_zlib_test
- oe_runmake DESTDIR=${D} install
-}
-
-PACKAGE_BEFORE_PN = "${PN}-app"
-
-FILES_${PN} += " \
- ${sysconfdir}/zlib_conf/ \
- "
-
-FILES_${PN}-app += " \
- ${bindir}/* \
- "
-
-FILES_${PN}-dbg += " \
- ${bindir}/.debug \
- "
-
-EXCLUDE_FROM_WORLD_core2-32-intel-common = "1"
diff --git a/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch b/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch
deleted file mode 100644
index b45ae79..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/0001-qat_zlib.h-Add-pthread.h-for-MUSL.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 30c4a1181cbe696dd1b9f52c8e9422ef8c331e8f Mon Sep 17 00:00:00 2001
-From: Saul Wold <sgw@linux.intel.com>
-Date: Thu, 9 Feb 2017 12:40:47 -0800
-Subject: [PATCH] qat_zlib.h: Add pthread.h for MUSL
-
-MUSL is stricter when it comes to header file inclusion, so add
-the additional header thats needed to compile with MUSL.
-
-Upstream-Status: Pending
-Signed-off-by: Saul Wold <sgw@linux.intel.com>
----
- qat_zlib.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/qat_zlib.h b/qat_zlib.h
-index 2747f84..d9ac312 100644
---- a/qat_zlib.h
-+++ b/qat_zlib.h
-@@ -8,6 +8,7 @@
- #include <stdlib.h>
- #include <assert.h>
- #include <time.h>
-+#include <pthread.h>
-
- #include "cpa_dc.h"
- #ifdef USE_QAE_MEM
---
-2.7.4
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch
deleted file mode 100644
index 2da2bb7..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From d14d6ea2072ede5d1afddf738cb1801263e90d70 Mon Sep 17 00:00:00 2001
-From: "Tan, Raymond" <raymond.tan@intel.com>
-Date: Fri, 10 Aug 2018 15:45:38 +0800
-Subject: [PATCH 2/3] zlib: Remove rpaths from makefile
-
-Upstream-Status: Inappropriate [configuration]
-
-This removes references to RPATHS that are no longer
-necesary when building using bitbake.
-
-Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
----
- Makefile.in | 9 +++++----
- contrib/qat/qat_zlib_test/Makefile | 3 ---
- 2 files changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 0100f59..8978ef1 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -59,12 +59,13 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
- ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
- CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
- SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
--ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
--SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
-+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
-+#SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
-+SHARED_APP_FLAGS=-L$(ZLIB_ROOT) -lz
-
- ifdef ICP_BUILD_OUTPUT
- TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
-- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
-+# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
- endif
-
- ifdef UPSTREAM_DRIVER_CMN_ROOT
-@@ -91,7 +92,7 @@ ADDITIONAL_SHAREDLIBC=-L$(ICP_BUILD_OUTPUT) -l$(DRIVER)_s -lpthread -lrt
-
- ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
- TEST_LDFLAGS+= $(CMN_ROOT)/libusdm_drv.a
--ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
-+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(CMN_ROOT) -L$(CMN_ROOT) -lusdm_drv_s
- endif
-
- STATICLIB=libz.a
-diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
-index 47829ac..bfcf86d 100644
---- a/contrib/qat/qat_zlib_test/Makefile
-+++ b/contrib/qat/qat_zlib_test/Makefile
-@@ -85,9 +85,6 @@ COVERAGE_OBJS =
- EXE=
- LIBQAT=
- UDEV=
--ifdef ICP_BUILD_OUTPUT
-- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
--endif
-
- ifdef UPSTREAM_DRIVER_CMN_ROOT
- DRIVER=qat
---
-1.9.1
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch
deleted file mode 100644
index 3a202e9..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 943dd3c2b9d68385c9e71b1cc215cf03e2dd74fd Mon Sep 17 00:00:00 2001
-From: "Tan, Raymond" <raymond.tan@intel.com>
-Date: Wed, 29 Aug 2018 13:35:44 +0800
-Subject: [PATCH 1/3] zlib-qat: add a install target to makefile
-
-Upstream-Status: Inappropriate [Configuration]$
-
-This adds an install target to qat_zlib_test makefiles
-to facilitate the installation of test binaries to {D}.
-
-Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
----
- contrib/qat/qat_zlib_test/Makefile | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
-index 7b86028..47829ac 100644
---- a/contrib/qat/qat_zlib_test/Makefile
-+++ b/contrib/qat/qat_zlib_test/Makefile
-@@ -132,5 +132,7 @@ comptestappsh$(EXE): $(OBJS) Makefile
- $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
- $(SHAREDLIBQAT)
-
-+install:
-+ cp comptestapp $(DESTDIR)$(bindir)
- clean:
- rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
---
-1.9.1
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch
deleted file mode 100644
index 5352cb9..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 7d74f6aa82042c2bb03e46fafe580bf4d117a24a Mon Sep 17 00:00:00 2001
-From: "Tan, Raymond" <raymond.tan@intel.com>
-Date: Thu, 16 Aug 2018 14:29:05 +0800
-Subject: [PATCH 3/3] zlib-qat: correct the order for static linking libudev
-
-Upstream-Status: Inappropriate [Configuration]
-
-This changes the order of linking command to link libudev after libadf
-to avoid undefined reference on udev.
-
-Signed-off-by: Tan, Raymond <raymond.tan@intel.com>
----
- contrib/qat/qat_zlib_test/Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
-index bfcf86d..0498da8 100644
---- a/contrib/qat/qat_zlib_test/Makefile
-+++ b/contrib/qat/qat_zlib_test/Makefile
-@@ -101,7 +101,7 @@ ifdef WITH_CPA_MUX
- endif
-
- SHAREDLIBQAT= -Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz -ldl -lrt -lpthread
--STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) $(UDEV) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread
-+STATICLIBQAT= $(ZLIB_ROOT)/libz.a $(LIBQAT) -l$(DRIVER) -l$(ADFPROXY) -losal -lcrypto -ldl -lrt -lpthread $(UDEV)
-
- ifeq ($(ZLIB_MEMORY_DRIVER),usdm_drv)
- STATICLIBQAT+= $(CMN_ROOT)/libusdm_drv.a
---
-1.9.1
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
deleted file mode 100644
index 9e774db..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From aa65d69632142d24ec44ed4c2d66371e1a1be7b4 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anujx.mittal@intel.com>
-Date: Thu, 18 Jun 2015 11:56:08 +0800
-Subject: [PATCH] qat_mem: build qat_mem ko against yocto kernel src
-
-Upstream-Status: Inappropriate [Configuration]
-
-This tweaks the kernel source and build path in the makefile
-to make sure the module is built against the right source.
-
-Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
----
- contrib/qat/qat_mem/Makefile | 13 +++++--------
- 1 file changed, 5 insertions(+), 8 deletions(-)
-
-diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
-index ddf5b59..ad6d4a4 100644
---- a/contrib/qat/qat_mem/Makefile
-+++ b/contrib/qat/qat_mem/Makefile
-@@ -61,16 +61,10 @@
- #########################################################################
-
- MODULENAME := qat_mem
--KDIR := /lib/modules/$(shell uname -r)/build
-+KDIR := $(KERNEL_SOURCE_ROOT)
- PWD := $(shell pwd)
-
--ifeq ($(shell uname -r|grep -c grsec-WR), 1)
--AUTO_CONF=/lib/modules/$(shell uname -r)/build/include/generated/autoconf.h
--else
--AUTO_CONF=/usr/src/kernels/$(shell uname -r)/include/linux/autoconf.h
--endif
--
--CC := gcc -Wall -imacros $(AUTO_CONF)
-+CC := ${CC} -Wall -imacros $(KERNEL_BUILDDIR)/include/generated/autoconf.h
-
- ifeq ($(KERNELRELEASE),)
- all: $(MODULENAME)_test
-@@ -80,6 +74,9 @@ else
- obj-m := $(MODULENAME).o
- endif
-
-+modules_install:
-+ $(MAKE) -C $(KDIR) M=$(PWD) modules_install
-+
- $(MODULENAME)_test: $(MODULENAME)_test.c
- $(CC) -g -o $(MODULENAME)_test $(MODULENAME)_test.c
-
---
-1.7.9.5
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
deleted file mode 100644
index c360511..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From aad2675c7bb635d8b7be47fa89a3ee87ba19d2e8 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anujx.mittal@intel.com>
-Date: Thu, 18 Jun 2015 11:46:17 +0800
-Subject: [PATCH] zlib: Remove rpaths from makefile
-
-Upstream-Status: Inappropriate [configuration]
-
-This removes references to RPATHS that are no longer
-necesary when building using bitbake.
-
-Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
----
- Makefile.in | 4 ++--
- contrib/qat/qat_zlib_test/Makefile | 3 ---
- 2 files changed, 2 insertions(+), 5 deletions(-)
-
-diff --git a/Makefile.in b/Makefile.in
-index 94d8a80..cba5291 100644
---- a/Makefile.in
-+++ b/Makefile.in
-@@ -59,12 +59,12 @@ ICP_LAC_API_DIR=$(ICP_API_DIR)/lac/
- ICP_DC_API_DIR=$(ICP_API_DIR)/dc/
- CFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
- SFLAGS+=-D_GNU_SOURCE -I$(ICP_API_DIR) -I$(ICP_DC_API_DIR) -I$(ICP_LAC_API_DIR) -I$(ICP_SAL_API_DIR)
--ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
-+#ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ZLIB_ROOT) -lz
- SHARED_APP_FLAGS=-Wl,-rpath,$(ZLIB_ROOT) -L$(ZLIB_ROOT) -lz
-
- ifdef ICP_BUILD_OUTPUT
- TEST_LDFLAGS+=-L$(ICP_BUILD_OUTPUT)
-- ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
-+# ADDITIONAL_LDFLAGS+=-Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
- endif
-
- ifdef ZLIB_DH895XCC
-diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
-index 8a29a92..ca31dd2 100644
---- a/contrib/qat/qat_zlib_test/Makefile
-+++ b/contrib/qat/qat_zlib_test/Makefile
-@@ -84,9 +84,6 @@ OBJS = $(SRCS:%.c=%.o)
- COVERAGE_OBJS =
- EXE=
- LIBQAT=
--ifdef ICP_BUILD_OUTPUT
-- LIBQAT+= -Wl,-rpath,$(ICP_BUILD_OUTPUT) -L$(ICP_BUILD_OUTPUT)
--endif
-
- DRIVER=icp_qa_al
- ifdef WITH_CPA_MUX
---
-1.7.9.5
-
diff --git a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch b/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
deleted file mode 100644
index c7aec55..0000000
--- a/recipes-extended/zlib-qat/zlib-qat/zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d78121d790c4a248bc47d1c662791fe57ac4af38 Mon Sep 17 00:00:00 2001
-From: Anuj Mittal <anujx.mittal@intel.com>
-Date: Thu, 18 Jun 2015 11:53:23 +0800
-Subject: [PATCH] zlib-qat: add a install target to makefile
-
-Upstream-Status: Inappropriate [Configuration]
-
-This adds an install target to qat_zlib_test and qat_mem makefiles
-to facilitate the installation of test binaries to {D}.
-
-Signed-off-by: Anuj Mittal <anujx.mittal@intel.com>
----
- contrib/qat/qat_mem/Makefile | 3 +++
- contrib/qat/qat_zlib_test/Makefile | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/contrib/qat/qat_mem/Makefile b/contrib/qat/qat_mem/Makefile
-index ad6d4a4..e4d77b6 100644
---- a/contrib/qat/qat_mem/Makefile
-+++ b/contrib/qat/qat_mem/Makefile
-@@ -74,6 +74,9 @@ else
- obj-m := $(MODULENAME).o
- endif
-
-+install: modules_install
-+ cp qat_mem_test $(INSTALL_MOD_PATH)$(bindir)
-+
- modules_install:
- $(MAKE) -C $(KDIR) M=$(PWD) modules_install
-
-diff --git a/contrib/qat/qat_zlib_test/Makefile b/contrib/qat/qat_zlib_test/Makefile
-index ca31dd2..7da5ddd 100644
---- a/contrib/qat/qat_zlib_test/Makefile
-+++ b/contrib/qat/qat_zlib_test/Makefile
-@@ -112,5 +112,8 @@ comptestappsh$(EXE): $(OBJS) Makefile
- $(CC) -o comptestappsh $(OBJS) $(COVERAGE) \
- $(SHAREDLIBQAT)
-
-+install:
-+ cp comptestapp $(DESTDIR)$(bindir)
-+
- clean:
- rm -f $(OBJS) $(COVERAGE_OBJS) comptestapp comptestappsh
---
-1.7.9.5
-
diff --git a/recipes-extended/zlib-qat/zlib-qat_0.4.10-003.bb b/recipes-extended/zlib-qat/zlib-qat_0.4.10-003.bb
deleted file mode 100644
index c3e623c..0000000
--- a/recipes-extended/zlib-qat/zlib-qat_0.4.10-003.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-require zlib-qat.inc
-
-DEPENDS += "qat17"
-
-SRC_URI += "https://01.org/sites/default/files/downloads/zlibshim0.4.10-003.tar.gz;name=zlibqat \
- file://zlib-qat-0.4.10-001-zlib-qat-add-a-install-target-to-makefile.patch \
- file://zlib-qat-0.4.10-001-zlib-Remove-rpaths-from-makefile.patch \
- file://zlib-qat-0.4.10-001-zlib-qat-correct-the-order-for-static-linking-libude.patch \
- "
-
-SRC_URI[zlibqat.md5sum] = "cea60976411bcb8378adbe1007f7fa6a"
-SRC_URI[zlibqat.sha256sum] = "b01f40e2df1a456435972ba46812a23f898e4a592b17ed76240f836b5b992bbd"
-
-ZLIB_QAT_VERSION = "0.4.10-003"
-
-export ZLIB_MEMORY_DRIVER = "usdm_drv"
-export CMN_ROOT = "${STAGING_DIR_TARGET}${base_libdir}"
-export UPSTREAM_DRIVER_CMN_ROOT = "${STAGING_DIR_TARGET}${base_libdir}"
-
-zlibqat_do_patch() {
- cd ${WORKDIR}
- tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
- cd ${S}
- if [ ! -d ${S}/debian/patches ]; then
- mkdir -p ${S}/debian/patches
- cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches
- echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
- fi
- quilt pop -a || true
- if [ -d ${S}/.pc-zlibqat ]; then
- rm -rf ${S}/.pc
- mv ${S}/.pc-zlibqat ${S}/.pc
- QUILT_PATCHES=${S}/debian/patches quilt pop -a
- rm -rf ${S}/.pc
- fi
- QUILT_PATCHES=${S}/debian/patches quilt push -a
- mv ${S}/.pc ${S}/.pc-zlibqat
-}
-
-do_install_append() {
- install -m 660 ${MEM_PATH}/config/c3xxx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
- install -m 660 ${MEM_PATH}/config/c6xx/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
-}
diff --git a/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb b/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
deleted file mode 100644
index c2de063..0000000
--- a/recipes-extended/zlib-qat/zlib-qat_0.4.7-002.bb
+++ /dev/null
@@ -1,80 +0,0 @@
-require zlib-qat.inc
-
-DEPENDS += "qat16"
-
-SRC_URI += "https://01.org/sites/default/files/page/zlib_shim_0.4.7-002_withdocumentation.zip;name=zlibqat \
- file://zlib-qat-0.4.7-002-qat_mem-build-qat_mem-ko-against-yocto-kernel-src.patch \
- file://zlib-qat-0.4.7-002-zlib-qat-add-a-install-target-to-makefile.patch \
- file://zlib-qat-0.4.7-002-zlib-Remove-rpaths-from-makefile.patch \
- "
-
-SRC_URI[zlibqat.md5sum] = "dfde8618198aa8d35ecc00d10dcc7000"
-SRC_URI[zlibqat.sha256sum] = "8e5786400bbc2a879ae705c864ec63b53ae019b4f2d1c94524a97223847b6e46"
-
-ZLIB_QAT_VERSION = "0.4.7-002"
-QAT_PATCH_VERSION = "l.0.4.7_002"
-
-export ZLIB_DH895XCC = "1"
-export ZLIB_MEMORY_DRIVER = "qat_mem"
-
-# qat_mem OOT kernel module, thus inherit module.bbclass
-inherit module
-
-zlibqat_do_patch() {
- cd ${WORKDIR}
- unzip -q -o zlib_quickassist_patch_${QAT_PATCH_VERSION}_stable.zip
- cd zlib_quickassist_patch_${QAT_PATCH_VERSION}_devbranch
- tar -xvzf zlib-${ZLIB_VERSION}-qat.L.${ZLIB_QAT_VERSION}.tar.gz
- cp -f zlib-${ZLIB_VERSION}-qat.patch ${WORKDIR}
- cd ${S}
- if [ ! -d ${S}/debian/patches ]; then
- mkdir -p ${S}/debian/patches
- cp -f ${WORKDIR}/zlib-${ZLIB_VERSION}-qat.patch ${S}/debian/patches
- echo "zlib-${ZLIB_VERSION}-qat.patch -p1" > ${S}/debian/patches/series
- fi
- quilt pop -a || true
- if [ -d ${S}/.pc-zlibqat ]; then
- rm -rf ${S}/.pc
- mv ${S}/.pc-zlibqat ${S}/.pc
- QUILT_PATCHES=${S}/debian/patches quilt pop -a
- rm -rf ${S}/.pc
- fi
- QUILT_PATCHES=${S}/debian/patches quilt push -a
- mv ${S}/.pc ${S}/.pc-zlibqat
-}
-
-# do_compile will override the module_do_compile from inherited module.bbclass
-# which causes issues for components other than qat_mem.ko
-do_compile() {
- unset CFLAGS CXXFLAGS
- oe_runmake
-
- cd ${S}/contrib/qat/qat_zlib_test
- oe_runmake
-
- cd ${S}/contrib/qat/qat_mem
- oe_runmake
-}
-
-# do_install will override the module_do_install inherited from module.bbclass
-# which causes issues for components other than qat_mem.ko
-do_install() {
- install -m 0755 -d ${D}${bindir}/
- install -m 0755 -d ${D}${sysconfdir}/zlib_conf/
-
- install -m 0755 zpipe ${D}${bindir}
- install -m 0755 minigzip ${D}${bindir}
-
- cd ${S}/contrib/qat/qat_zlib_test
- oe_runmake DESTDIR=${D} install
-
- cd ${MEM_PATH}/qat_mem
- oe_runmake INSTALL_MOD_PATH=${D} INSTALL_MOD_DIR="kernel/drivers" install
-
- install -m 660 ${MEM_PATH}/config/dh895xcc/multi_thread_optimized/* ${D}${sysconfdir}/zlib_conf/
-}
-
-# module.bbclass will reset FILES variable
-FILES_${PN} += " \
- ${sysconfdir}/zlib_conf/ \
- "