Removed patches:
qat17_4.7.0-00006-Drop-pr_warning-definition.patch
qat17_4.7.0-00006-Link-driver-with-object-files.patch
qat17_4.7.0-00006-Switch-to-skcipher-API.patch
qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch
qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
use-CC-for-LD.patch
Renamed and rebased patches:
qat16_2.3.0-34-qat-fix-for-cross-compilation-issue.patch
=> 0001-qat-fix-for-cross-compilation-issue.patch
qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
=> 0002-qat-remove-local-path-from-makefile.patch
qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
=> 0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch
=> 0004-update-KDIR-for-cross-compilation.patch
qat17_0.8.0-37-qat-added-include-dir-path.patch
=> 0005-Added-include-dir-path.patch
qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch
=> 0006-qat-add-install-target-and-add-folder.patch
qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
=> 0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch
qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
=> 0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
=> 0009-crypto-qat-Silence-smp_processor_id-warning.patch
qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
=> 0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
=> 0011-qat17-use-namespace-CRYPTO_INTERNAL.patch
Signed-off-by: Yongxin Liu <[email protected]>
---
.../0001-qat-fix-for-cross-compilation-issue.patch | 61 ++
...0002-qat-remove-local-path-from-makefile.patch} | 8 +-
...ride-CC-LD-AR-only-when-it-is-not-define.patch} | 15 +-
...> 0004-update-KDIR-for-cross-compilation.patch} | 17 +-
...ath.patch => 0005-Added-include-dir-path.patch} | 18 +-
...06-qat-add-install-target-and-add-folder.patch} | 16 +-
...ic-lib-for-linking-under-cpa-sample-code.patch} | 31 +-
...rite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch} | 8 +-
...pto-qat-Silence-smp_processor_id-warning.patch} | 8 +-
...sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch} | 40 +-
...0011-qat17-use-namespace-CRYPTO_INTERNAL.patch} | 28 +-
...17_4.7.0-00006-Drop-pr_warning-definition.patch | 31 -
...4.7.0-00006-Link-driver-with-object-files.patch | 91 --
.../qat17_4.7.0-00006-Switch-to-skcipher-API.patch | 1158 --------------------
...adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch | 32 -
...-00006-make-it-compatible-with-kernel-5.6.patch | 96 --
...-linux-cryptohash.h-with-crypto-sha.h-for.patch | 35 -
recipes-extended/qat/files/use-CC-for-LD.patch | 17 -
...{qat17_4.7.0-00006.bb => qat17_4.12.0-00011.bb} | 63 +-
19 files changed, 170 insertions(+), 1603 deletions(-)
create mode 100644
recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch
rename
recipes-extended/qat/files/{qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
=> 0002-qat-remove-local-path-from-makefile.patch} (85%)
rename
recipes-extended/qat/files/{qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
=> 0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch} (77%)
rename
recipes-extended/qat/files/{qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch
=> 0004-update-KDIR-for-cross-compilation.patch} (84%)
rename
recipes-extended/qat/files/{qat17_0.8.0-37-qat-added-include-dir-path.patch =>
0005-Added-include-dir-path.patch} (79%)
rename
recipes-extended/qat/files/{qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch
=> 0006-qat-add-install-target-and-add-folder.patch} (92%)
rename
recipes-extended/qat/files/{qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
=> 0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch} (57%)
rename
recipes-extended/qat/files/{qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
=> 0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch} (88%)
rename
recipes-extended/qat/files/{qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
=> 0009-crypto-qat-Silence-smp_processor_id-warning.patch} (93%)
rename
recipes-extended/qat/files/{qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
=> 0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch} (73%)
rename
recipes-extended/qat/files/{qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
=> 0011-qat17-use-namespace-CRYPTO_INTERNAL.patch} (74%)
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-Drop-pr_warning-definition.patch
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-Link-driver-with-object-files.patch
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch
delete mode 100644
recipes-extended/qat/files/qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
delete mode 100644 recipes-extended/qat/files/use-CC-for-LD.patch
rename recipes-extended/qat/{qat17_4.7.0-00006.bb => qat17_4.12.0-00011.bb}
(69%)
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..45689a9
--- /dev/null
+++ b/recipes-extended/qat/files/0001-qat-fix-for-cross-compilation-issue.patch
@@ -0,0 +1,61 @@
+From 563cc2fc8d1b120a63aa9d157effed04d39bd58f Mon Sep 17 00:00:00 2001
+From: venkatasubramanian pattu <[email protected]>
+Date: Mon, 6 Jul 2015 15:57:20 +0800
+Subject: [PATCH 01/11] qat: fix for cross-compilation issue
+
+Upstream-Status: Inappropriate [Configuration]
+
+Ensure that we are not using host compiler.
+
+Signed-off-by: venkatasubramanian pattu <[email protected]>
+Signed-off-by: Anuj Mittal <[email protected]>
+[YL: modified for patching to qat17_4.12.0-00011]
+Signed-off-by: Yongxin Liu <[email protected]>
+---
+ quickassist/lookaside/access_layer/src/sample_code/functional/common.mk | 2 +-
+ .../access_layer/src/sample_code/functional/dc/dc_dp_sample/Makefile | 2 +-
+ quickassist/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 8c2fa3c..9402873 100644
+--- a/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk
++++ b/quickassist/lookaside/access_layer/src/sample_code/functional/common.mk
+@@ -150,7 +150,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)
+
+ ifeq ($(WITH_UPSTREAM),1)
+ ifeq ($(WITH_ICP_TARGET),1)
+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 7a4d593..06cbc3d 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 4b6857f..3914c1b 100644
+--- a/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
++++ b/quickassist/lookaside/access_layer/src/sample_code/performance/Makefile
+@@ -341,7 +341,7 @@ endif
+
+
+
+-ADDITIONAL_OBJECTS += -L/Lib -lpthread
++ADDITIONAL_OBJECTS += -lpthread
+ ADDITIONAL_OBJECTS += -lcrypto
+ ifeq ($(WITH_UPSTREAM),1)
+ ifeq ($(OS),linux)
+--
+2.14.5
+
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
similarity index 85%
rename from
recipes-extended/qat/files/qat16_2.3.0-34-qat-remove-local-path-from-makefile.patch
rename to
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 <[email protected]>
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 <[email protected]>
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
similarity index 77%
rename from
recipes-extended/qat/files/qat16_2.6.0-65-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
rename to
recipes-extended/qat/files/0003-qat-override-CC-LD-AR-only-when-it-is-not-define.patch
index a25fdae..f3b8fe6 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,7 +1,7 @@
-From b21929c42aca4bc80f6c48b5ac31bf20165b2f3e Mon Sep 17 00:00:00 2001
+From 0a881aefea89006f21b82fcafc5a422b04fc0c9a Mon Sep 17 00:00:00 2001
From: Rahul Kumar Gupta <[email protected]>
-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]
@@ -14,7 +14,7 @@ Signed-off-by: Rahul Kumar Gupta
<[email protected]>
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
similarity index 84%
rename from
recipes-extended/qat/files/qat17_0.6.0-1-qat-update-KDIR-for-cross-compilation.patch
rename to
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" <[email protected]>
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 <[email protected]>
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
similarity index 79%
rename from
recipes-extended/qat/files/qat17_0.8.0-37-qat-added-include-dir-path.patch
rename to 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" <[email protected]>
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
similarity index 92%
rename from
recipes-extended/qat/files/qat17_0.9.0-4-qat-add-install-target-and-add-folder.patch
rename to
recipes-extended/qat/files/0006-qat-add-install-target-and-add-folder.patch
index a810cfc..62d25e0 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,23 +1,22 @@
-From a94af9df0fa6f2c41efaf7ef6c17d0e5bb8aa80d Mon Sep 17 00:00:00 2001
+From fc2ae28063d10721282a4e6009cec9143ce37c80 Mon Sep 17 00:00:00 2001
From: "Tan, Raymond" <[email protected]>
Date: Mon, 4 Jun 2018 09:26:33 +0800
-Subject: [PATCH] qat-add-install-target-and-add-folder
+Subject: [PATCH 06/11] qat-add-install-target-and-add-folder
Upstream-Status: Inappropriate [Configuration]
Modify Makefile to add install target and add folder
Signed-off-by: Tan, Raymond <[email protected]>
-
---
quickassist/Makefile | 25 ++++++++++++++++++++++---
1 file changed, 22 insertions(+), 3 deletions(-)
diff --git a/quickassist/Makefile b/quickassist/Makefile
-index 93990f2..70a4353 100644
+index 558f85d..4cc0f2b 100644
--- a/quickassist/Makefile
+++ b/quickassist/Makefile
-@@ -97,6 +97,7 @@ ICP_BUILD_OUTPUT?=build_$(DATE)
+@@ -96,6 +96,7 @@ ICP_BUILD_OUTPUT?=build_$(DATE)
ICP_TOP_ENV=$(ICP_BUILDSYSTEM_PATH)/build_files/env_files/
export ICP_ACCEL_INC=YES
LAC_LIB_DIR=$(LAC_PATH)/build/libs
@@ -25,7 +24,7 @@ index 93990f2..70a4353 100644
#Release Package build steps
ALL_TARGETS = lac_user lac_kernel
-@@ -114,10 +115,14 @@ all: $(ALL_TARGETS)
+@@ -113,10 +114,14 @@ all: $(ALL_TARGETS)
user: lac_lib_dir libosal_user lac_user
@@ -42,7 +41,7 @@ index 93990f2..70a4353 100644
#
# Common memory driver
-@@ -200,8 +205,22 @@ ifeq ($(ICP_NO_CLEAN),)
+@@ -199,8 +204,22 @@ ifeq ($(ICP_NO_CLEAN),)
endif
@@ -66,3 +65,6 @@ index 93990f2..70a4353 100644
lac_lib_dir: clean
test -d $(LAC_LIB_DIR) || mkdir -p $(LAC_LIB_DIR);
+--
+2.14.5
+
diff --git
a/recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
b/recipes-extended/qat/files/0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch
similarity index 57%
rename from
recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
rename to
recipes-extended/qat/files/0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch
index f786a10..fc8828e 100644
---
a/recipes-extended/qat/files/qat17_4.1.0-00022-qat-use-static-lib-for-linking.patch
+++
b/recipes-extended/qat/files/0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch
@@ -1,7 +1,7 @@
-From 026fd275834ac4e345464c8ce2b0163d052d0262 Mon Sep 17 00:00:00 2001
+From 54d537415c88b52c6cc682db17ecd0b6c077a8bf Mon Sep 17 00:00:00 2001
From: "Tan, Raymond" <[email protected]>
-Date: Wed, 30 May 2018 13:27:03 +0800
-Subject: [PATCH] qat-use-static-lib-for-linking-under-cpa-sample-code
+Date: Mon, 12 Apr 2021 08:52:17 +0800
+Subject: [PATCH 07/11] qat-use-static-lib-for-linking-under-cpa-sample-code
Upstream-Status: Inappropriate [Configuration]
@@ -14,17 +14,18 @@ Signed-off-by: Tan, Raymond <[email protected]>
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
+index 3914c1b..a22e366 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
+@@ -319,7 +319,7 @@ ifneq ($(PREBUILD_BINS),0)
+ 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
+--
+2.14.5
+
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
b/recipes-extended/qat/files/0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
similarity index 88%
rename from
recipes-extended/qat/files/qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
rename to
recipes-extended/qat/files/0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
index 6af5a6a..b511473 100644
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
+++
b/recipes-extended/qat/files/0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
@@ -1,7 +1,7 @@
-From bf4053e4685bbbf84e6f91d18809dbf4487d03d9 Mon Sep 17 00:00:00 2001
+From 315838f92b83da62afd2800b57eddd03d0cfde58 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <[email protected]>
Date: Wed, 25 Nov 2020 07:58:07 +0800
-Subject: [PATCH] qat: overwrite KBUILD_BUILTIN in kernel's Makefile
+Subject: [PATCH 08/11] qat: overwrite KBUILD_BUILTIN in kernel's Makefile
Since kernel v5.10-rc1, commit 6212804f2d78 ("kbuild: do not create
built-in objects for external module builds"), QAT static libraries
@@ -16,7 +16,7 @@ Signed-off-by: Yongxin Liu <[email protected]>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
b/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
-index a692b37..302ae19 100644
+index 71bbeb7..8a5cfbc 100644
--- a/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
+++ b/quickassist/build_system/build_files/OS/linux_2.6_kernel_space_rules.mk
@@ -72,7 +72,7 @@ endif
@@ -29,5 +29,5 @@ index a692b37..302ae19 100644
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); \
--
-2.14.4
+2.14.5
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
b/recipes-extended/qat/files/0009-crypto-qat-Silence-smp_processor_id-warning.patch
similarity index 93%
rename from
recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
rename to
recipes-extended/qat/files/0009-crypto-qat-Silence-smp_processor_id-warning.patch
index 262651f..d619cc3 100644
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
+++
b/recipes-extended/qat/files/0009-crypto-qat-Silence-smp_processor_id-warning.patch
@@ -1,7 +1,7 @@
-From 21b67ec634271aafd73cffb3e73c0ba494dce3cd Mon Sep 17 00:00:00 2001
+From a79112f8673c3d4912bb28592e64a90f237a31e5 Mon Sep 17 00:00:00 2001
From: Alexander Sverdlin <[email protected]>
Date: Tue, 23 Jul 2019 07:24:01 +0000
-Subject: [PATCH] crypto: qat - Silence smp_processor_id() warning
+Subject: [PATCH 09/11] crypto: qat - Silence smp_processor_id() warning
It seems that smp_processor_id() is only used for a best-effort
load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
@@ -55,7 +55,7 @@ Signed-off-by: Yongxin Liu <[email protected]>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
b/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
-index 08e3519..87dd5f1 100644
+index 8d57925..38bad69 100644
--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
+++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
@@ -100,7 +100,7 @@ struct service_hndl {
@@ -68,5 +68,5 @@ index 08e3519..87dd5f1 100644
int adf_service_register(struct service_hndl *service);
--
-2.14.4
+2.14.5
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
b/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
similarity index 73%
rename from
recipes-extended/qat/files/qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
rename to
recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
index cf22fa1..b86d1db 100644
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
+++
b/recipes-extended/qat/files/0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
@@ -1,8 +1,8 @@
-From f27fe17a282206b6d4e8c3ad8d5aac8757f38ab5 Mon Sep 17 00:00:00 2001
+From c9e04ec8d8be3a1f21a5bdc6c5c79f50191d57dd Mon Sep 17 00:00:00 2001
From: Yongxin Liu <[email protected]>
Date: Thu, 28 Jan 2021 13:07:59 +0800
-Subject: [PATCH] qat: include sha1.h and sha2.h instead of sha.h in kernel
- v5.11
+Subject: [PATCH 10/11] qat: include sha1.h and sha2.h instead of sha.h in
+ kernel v5.11
In kernel commit a24d22b225ce ("crypto: sha - split sha.h into sha1.h and
sha2.h"),
<crypto/sha.h> was split into two headers <crypto/sha1.h> and <crypto/sha2.h>.
@@ -11,17 +11,17 @@ Upstream-Status: Inappropriate [Code released in tarball
form only]
Signed-off-by: Yongxin Liu <[email protected]>
---
- quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c | 5 +++++
- .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c | 7 +++++--
- 2 files changed, 10 insertions(+), 2 deletions(-)
+ quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c | 5 +++++
+ .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
+ 2 files changed, 10 insertions(+)
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..a7961a4 100644
+index 37ac11e..08680ca 100644
--- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-@@ -50,7 +50,12 @@
- #include <linux/crypto.h>
+@@ -52,7 +52,12 @@
#include <crypto/internal/aead.h>
+ #include <crypto/internal/skcipher.h>
#include <crypto/aes.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#include <crypto/sha1.h>
@@ -33,27 +33,19 @@ index c4edb3c..a7961a4 100644
#include <crypto/algapi.h>
#include <crypto/authenc.h>
diff --git
a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-index 92ee35b..483aef2 100644
+index 9d2e85c..de24fa0 100644
--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-@@ -66,15 +66,18 @@
-
- #include "Osal.h"
- #include <linux/crypto.h>
--#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
+@@ -69,7 +69,12 @@
+ #include <linux/version.h>
+ #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
+ #include <crypto/internal/hash.h>
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
+#include <crypto/sha1.h>
+#include <crypto/sha2.h>
-+#elif (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
++#else
#include <crypto/sha.h>
- #else
- #include <linux/cryptohash.h>
-+#include <crypto/sha.h>
- #endif
- #include <linux/version.h>
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- #include <crypto/internal/hash.h>
--#include <crypto/sha.h>
++#endif
#define OSAL_MAX_SHASH_DECSIZE 512
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
b/recipes-extended/qat/files/0011-qat17-use-namespace-CRYPTO_INTERNAL.patch
similarity index 74%
rename from
recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
rename to
recipes-extended/qat/files/0011-qat17-use-namespace-CRYPTO_INTERNAL.patch
index a4fad3c..1a7a647 100644
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch
+++ b/recipes-extended/qat/files/0011-qat17-use-namespace-CRYPTO_INTERNAL.patch
@@ -1,7 +1,7 @@
-From 3b45583612822851a0841cff8381d8795c831a23 Mon Sep 17 00:00:00 2001
+From 9b2b7a79fc9d9323fe9ec44de7619ea175c45bc1 Mon Sep 17 00:00:00 2001
From: Yongxin Liu <[email protected]>
Date: Tue, 23 Mar 2021 09:31:25 +0000
-Subject: [PATCH] qat17: use namespace CRYPTO_INTERNAL
+Subject: [PATCH 11/11] qat17: use namespace CRYPTO_INTERNAL
Due to kernel commit 0eb76ba29d16 ("crypto: remove cipher routines from
public crypto API") in v5.12-rc1, some crypto APIs are exported into a new
@@ -11,12 +11,12 @@ Upstream-Status: Inappropriate [Code released in tarball
form only]
Signed-off-by: Yongxin Liu <[email protected]>
---
- quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++
- .../osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
+ quickassist/lookaside/access_layer/src/linux/icp_qa_module.c | 3 +++
+ .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c | 5 +++++
2 files changed, 8 insertions(+)
diff --git a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
-index c9c6946..a9dd704 100644
+index 413eb07..f3a371e 100644
--- a/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
+++ b/quickassist/lookaside/access_layer/src/linux/icp_qa_module.c
@@ -120,3 +120,6 @@ module_exit(kapi_mod_exit);
@@ -27,21 +27,21 @@ index c9c6946..a9dd704 100644
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
diff --git
a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-index 483aef2..a150a86 100644
+index de24fa0..96c29c0 100644
--- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-@@ -66,6 +66,11 @@
-
- #include "Osal.h"
- #include <linux/crypto.h>
+@@ -75,6 +75,11 @@
+ #else
+ #include <crypto/sha.h>
+ #endif
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,12,0))
+#include <crypto/internal/cipher.h>
+#include <linux/module.h>
+MODULE_IMPORT_NS(CRYPTO_INTERNAL);
+#endif
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
- #include <crypto/sha1.h>
- #include <crypto/sha2.h>
+
+ #define OSAL_MAX_SHASH_DECSIZE 512
+
--
-2.29.2
+2.14.5
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 <[email protected]>
-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 <[email protected]>
----
- 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 <[email protected]>
-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 <[email protected]>
-
----
- 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 aa2f890..0000000
--- a/recipes-extended/qat/files/qat17_4.7.0-00006-Switch-to-skcipher-API.patch
+++ /dev/null
@@ -1,1158 +0,0 @@
-From d12ae3d48d429e24ad4b0f219a16e09af8da3b1a Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <[email protected]>
-Date: Thu, 28 Jan 2021 10:02:22 +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 <[email protected]>
----
- .../drivers/crypto/qat/qat_common/qat_algs.c | 674 ++++++++++--------
- .../crypto/qat/qat_common/qat_crypto.h | 6 +-
- 2 files changed, 394 insertions(+), 286 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 a7961a4..f600ad3 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-@@ -49,6 +49,7 @@
- #include <linux/slab.h>
- #include <linux/crypto.h>
- #include <crypto/internal/aead.h>
-+#include <crypto/internal/skcipher.h>
- #include <crypto/aes.h>
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,11,0))
- #include <crypto/sha1.h>
-@@ -57,6 +58,7 @@
- #include <crypto/sha.h>
- #endif
- #include <crypto/hash.h>
-+#include <crypto/hmac.h>
- #include <crypto/algapi.h>
- #include <crypto/authenc.h>
- #include <linux/dma-mapping.h>
-@@ -118,11 +120,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;
-@@ -130,7 +137,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)
-@@ -154,9 +161,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;
-@@ -165,7 +169,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) {
-@@ -183,8 +186,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))
-@@ -198,22 +201,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;
-@@ -234,22 +237,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;
-@@ -259,7 +262,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);
-@@ -269,12 +289,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,
-@@ -309,7 +329,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);
-@@ -396,7 +416,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);
-@@ -450,17 +470,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;
-@@ -472,28 +492,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)
-@@ -553,86 +573,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,
-@@ -680,8 +724,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;
-@@ -693,7 +736,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;
-@@ -706,7 +749,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;
-@@ -718,16 +761,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;
-@@ -739,7 +781,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++;
- }
-@@ -754,8 +796,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,
-@@ -765,17 +819,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;
- }
-
-@@ -794,19 +839,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)
-@@ -828,7 +879,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))
-@@ -849,13 +900,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;
- }
-
-@@ -869,7 +921,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))
-@@ -895,159 +947,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)
-@@ -1090,30 +1213,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;
-
-@@ -1122,15 +1245,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);
-@@ -1192,92 +1315,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;
-@@ -1287,7 +1393,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;
- }
-
-@@ -1298,7 +1404,7 @@ 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);
-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.29.2
-
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
b/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
deleted file mode 100644
index dc8a53d..0000000
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From db44bce60b322754e6a8b96d93218135db00b46a Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <[email protected]>
-Date: Sun, 31 May 2020 10:56:27 +0800
-Subject: [PATCH] crypto: qat/adf_aer - Remove
- pci_cleanup_aer_uncorrect_error_status()
-
-In kernel upstream commit 62b36c3ea664 ("PCI/AER: Remove
-pci_cleanup_aer_uncorrect_error_status() calls"), AER interfaces
-to clear error status registers were removed from device dirver.
-
-Upstream-Status: Inappropriate [Code released in tarball form only]
-
-Signed-off-by: Yongxin Liu <[email protected]>
----
- quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
-index 5e98b70..3935d77 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_aer.c
-@@ -281,7 +281,6 @@ static pci_ers_result_t adf_slot_reset(struct pci_dev
*pdev)
- pr_err("QAT: Can't find acceleration device\n");
- return PCI_ERS_RESULT_DISCONNECT;
- }
-- pci_cleanup_aer_uncorrect_error_status(pdev);
- if (adf_dev_aer_schedule_reset(accel_dev, ADF_DEV_RESET_SYNC))
- return PCI_ERS_RESULT_DISCONNECT;
-
---
-2.14.4
-
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch
b/recipes-extended/qat/files/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch
deleted file mode 100644
index 0851724..0000000
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 75fe2382f42ac42333a28445bb54132afd9a27a1 Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <[email protected]>
-Date: Tue, 31 Mar 2020 19:44:25 +0000
-Subject: [PATCH] qat17: make it compatible with kernel 5.6
-
-1) In kernel commit c766d1472c70 ("y2038: hide timeval/timespec/itimerval
-/itimerspec types"), timespec was hiden, so change timespec to timespec64.
-
-2) CRYPTO_TFM_RES_BAD_KEY_LEN was removed in kernel commit 674f368a952c
-("crypto: remove CRYPTO_TFM_RES_BAD_KEY_LEN"). Add it back, since qat driver
-needs it.
-
-Upstream-Status: Inappropriate [Code released in tarball form only]
-
-Signed-off-by: Yongxin Liu <[email protected]>
----
- .../drivers/crypto/qat/qat_common/adf_clock.c | 18 +++++++++---------
- .../drivers/crypto/qat/qat_common/qat_algs.c | 2 ++
- 2 files changed, 11 insertions(+), 9 deletions(-)
-
-diff --git a/quickassist/qat/drivers/crypto/qat/qat_common/adf_clock.c
b/quickassist/qat/drivers/crypto/qat/qat_common/adf_clock.c
-index 8785f67..be3d9b8 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_clock.c
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_clock.c
-@@ -113,7 +113,7 @@ int adf_clock_debugfs_add(struct adf_accel_dev *accel_dev)
- #endif
- EXPORT_SYMBOL_GPL(adf_clock_debugfs_add);
-
--static inline s64 timespec_to_us(const struct timespec *ts)
-+static inline s64 timespec_to_us(const struct timespec64 *ts)
- {
- return ((s64)ts->tv_sec * USEC_PER_SEC +
- (ts->tv_nsec + NSEC_PER_USEC / 2) / NSEC_PER_USEC);
-@@ -129,10 +129,10 @@ static inline s64 timespec_to_us(const struct timespec
*ts)
- static int measure_clock(struct adf_accel_dev *accel_dev,
- u32 *frequency)
- {
-- struct timespec ts1;
-- struct timespec ts2;
-- struct timespec ts3;
-- struct timespec ts4;
-+ struct timespec64 ts1;
-+ struct timespec64 ts2;
-+ struct timespec64 ts3;
-+ struct timespec64 ts4;
- u64 delta_us = 0;
- u64 timestamp1 = 0;
- u64 timestamp2 = 0;
-@@ -143,13 +143,13 @@ static int measure_clock(struct adf_accel_dev *accel_dev,
- return -EIO;
-
- do {
-- getnstimeofday(&ts1);
-+ ktime_get_real_ts64(&ts1);
- if (adf_get_fw_timestamp(accel_dev, ×tamp1)) {
- dev_err(&GET_DEV(accel_dev),
- "Failed to get fw timestamp\n");
- return -EIO;
- }
-- getnstimeofday(&ts2);
-+ ktime_get_real_ts64(&ts2);
- delta_us = timespec_to_us(&ts2) - timespec_to_us(&ts1);
- } while (delta_us > MEASURE_CLOCK_DELTA_THRESHOLD &&
- ++tries < MEASURE_CLOCK_RETRIES);
-@@ -162,13 +162,13 @@ static int measure_clock(struct adf_accel_dev *accel_dev,
-
- tries = 0;
- do {
-- getnstimeofday(&ts3);
-+ ktime_get_real_ts64(&ts3);
- if (adf_get_fw_timestamp(accel_dev, ×tamp2)) {
- dev_err(&GET_DEV(accel_dev),
- "Failed to get fw timestamp\n");
- return -EIO;
- }
-- getnstimeofday(&ts4);
-+ ktime_get_real_ts64(&ts4);
- delta_us = timespec_to_us(&ts4) - timespec_to_us(&ts3);
- } while (delta_us > MEASURE_CLOCK_DELTA_THRESHOLD &&
- ++tries < MEASURE_CLOCK_RETRIES);
-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..b509dca 100644
---- a/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-+++ b/quickassist/qat/drivers/crypto/qat/qat_common/qat_algs.c
-@@ -73,6 +73,8 @@
- ICP_QAT_HW_CIPHER_KEY_CONVERT, \
- ICP_QAT_HW_CIPHER_DECRYPT)
-
-+#define CRYPTO_TFM_RES_BAD_KEY_LEN 0x00200000
-+
- static DEFINE_MUTEX(algs_lock);
- static unsigned int active_devs;
-
---
-2.24.1
-
diff --git
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
b/recipes-extended/qat/files/qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
deleted file mode 100644
index 27055ed..0000000
---
a/recipes-extended/qat/files/qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fcc9a80e47f1a9945987e398626074bddfc705c0 Mon Sep 17 00:00:00 2001
-From: Yongxin Liu <[email protected]>
-Date: Fri, 24 Jul 2020 09:27:48 +0800
-Subject: [PATCH] qat: replace linux/cryptohash.h with crypto/sha.h for kernel
- v5.8
-
-This is to accommodate kernel commit 228c4f265c6e ("crypto:
-lib/sha1 - fold linux/cryptohash.h into crypto/sha.h").
-
-Upstream-Status: Inappropriate [Code released in tarball form only]
-
-Signed-off-by: Yongxin Liu <[email protected]>
----
- .../utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git
a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-index 2d5b233..92ee35b 100644
---- a/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-+++ b/quickassist/utilities/osal/src/linux/kernel_space/OsalCryptoInterface.c
-@@ -66,7 +66,11 @@
-
- #include "Osal.h"
- #include <linux/crypto.h>
-+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5,8,0))
-+#include <crypto/sha.h>
-+#else
- #include <linux/cryptohash.h>
-+#endif
- #include <linux/version.h>
- #if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,29))
- #include <crypto/internal/hash.h>
---
-2.14.4
-
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 <[email protected]>
-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/qat17_4.7.0-00006.bb
b/recipes-extended/qat/qat17_4.12.0-00011.bb
similarity index 69%
rename from recipes-extended/qat/qat17_4.7.0-00006.bb
rename to recipes-extended/qat/qat17_4.12.0-00011.bb
index e9fb85d..28bcad7 100644
--- a/recipes-extended/qat/qat17_4.7.0-00006.bb
+++ b/recipes-extended/qat/qat17_4.12.0-00011.bb
@@ -12,56 +12,24 @@ 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 \
- file://qat17_4.7.0-00006-Switch-to-skcipher-API.patch;apply=0 \
-
file://qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch;apply=0 \
-
file://qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch
\
-
file://qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch
\
-
file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \
-
file://qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch \
-
file://qat17_4.7.0-00006-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch
\
- file://qat17_4.7.0-00006-qat17-use-namespace-CRYPTO_INTERNAL.patch \
+SRC_URI =
"https://01.org/sites/default/files/downloads//qat1.7.l.4.12.0-00011.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://0007-qat-use-static-lib-for-linking-under-cpa-sample-code.patch \
+ file://0008-qat-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch
\
+ file://0009-crypto-qat-Silence-smp_processor_id-warning.patch \
+
file://0010-qat-include-sha1.h-and-sha2.h-instead-of-sha.h-in-ke.patch \
+ file://0011-qat17-use-namespace-CRYPTO_INTERNAL.patch \
"
-do_patch[depends] += "virtual/kernel:do_shared_workdir"
+do_configure[depends] += "virtual/kernel:do_shared_workdir"
-do_patch_append () {
- kernel_version = int(d.getVar("KERNEL_VERSION").split(".")[0])
- kernel_patchlevel = int(d.getVar("KERNEL_VERSION").split(".")[1])
-
- if kernel_version >= 5 and kernel_patchlevel >= 5:
- bb.build.exec_func('do_switch_to_skcipher_api', d)
- if kernel_version >= 5 and kernel_patchlevel >= 6:
- bb.build.exec_func('do_patch_for_kernel_5_6', d)
-}
-
-do_switch_to_skcipher_api () {
- if [ ! -e
${S}/patches/qat17_4.7.0-00006-Switch-to-skcipher-API.patch.applied ]; then
- cd "${S}"
- patch -p1 < "${WORKDIR}/qat17_4.7.0-00006-Switch-to-skcipher-API.patch"
- touch
${S}/patches/qat17_4.7.0-00006-Switch-to-skcipher-API.patch.applied
- fi
-}
-
-do_patch_for_kernel_5_6 () {
- if [ ! -e
${S}/patches/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch.applied
]; then
- cd "${S}"
- patch -p1 <
"${WORKDIR}/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch"
- touch
${S}/patches/qat17_4.7.0-00006-make-it-compatible-with-kernel-5.6.patch.applied
- fi
-}
-
-
-SRC_URI[md5sum] = "ac939b51cc8836c182e31e309c065002"
-SRC_URI[sha256sum] =
"5c8bdc35fd7a42f212f1f87eb9e3d8584df7af56dae366debc487981e531fa5c"
+SRC_URI[md5sum] = "23d962944ae22ef14ff880fdbff4223b"
+SRC_URI[sha256sum] =
"6b8d643780b2640d084f5bd50546c8dae4ae9ec50cf167660a0ebdc55619eb2e"
COMPATIBLE_MACHINE = "null"
COMPATIBLE_HOST_x86-x32 = 'null'
@@ -90,6 +58,7 @@ 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
--
2.14.5
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#6994):
https://lists.yoctoproject.org/g/meta-intel/message/6994
Mute This Topic: https://lists.yoctoproject.org/mt/82033283/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/meta-intel/unsub
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-