summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch72
-rw-r--r--recipes-extended/qat/qat17_4.7.0-00006.bb1
2 files changed, 73 insertions, 0 deletions
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/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
new file mode 100644
index 0000000..262651f
--- /dev/null
+++ b/recipes-extended/qat/files/qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch
@@ -0,0 +1,72 @@
1From 21b67ec634271aafd73cffb3e73c0ba494dce3cd Mon Sep 17 00:00:00 2001
2From: Alexander Sverdlin <alexander.sverdlin@nokia.com>
3Date: Tue, 23 Jul 2019 07:24:01 +0000
4Subject: [PATCH] crypto: qat - Silence smp_processor_id() warning
5
6It seems that smp_processor_id() is only used for a best-effort
7load-balancing, refer to qat_crypto_get_instance_node(). It's not feasible
8to disable preemption for the duration of the crypto requests. Therefore,
9just silence the warning. This commit is similar to e7a9b05ca4
10("crypto: cavium - Fix smp_processor_id() warnings").
11
12Silences the following splat:
13BUG: using smp_processor_id() in preemptible [00000000] code: cryptomgr_test/2904
14caller is qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat]
15CPU: 1 PID: 2904 Comm: cryptomgr_test Tainted: P O 4.14.69 #1
16...
17Call Trace:
18 dump_stack+0x5f/0x86
19 check_preemption_disabled+0xd3/0xe0
20 qat_alg_ablkcipher_setkey+0x300/0x4a0 [intel_qat]
21 skcipher_setkey_ablkcipher+0x2b/0x40
22 __test_skcipher+0x1f3/0xb20
23 ? cpumask_next_and+0x26/0x40
24 ? find_busiest_group+0x10e/0x9d0
25 ? preempt_count_add+0x49/0xa0
26 ? try_module_get+0x61/0xf0
27 ? crypto_mod_get+0x15/0x30
28 ? __kmalloc+0x1df/0x1f0
29 ? __crypto_alloc_tfm+0x116/0x180
30 ? crypto_skcipher_init_tfm+0xa6/0x180
31 ? crypto_create_tfm+0x4b/0xf0
32 test_skcipher+0x21/0xa0
33 alg_test_skcipher+0x3f/0xa0
34 alg_test.part.6+0x126/0x2a0
35 ? finish_task_switch+0x21b/0x260
36 ? __schedule+0x1e9/0x800
37 ? __wake_up_common+0x8d/0x140
38 cryptomgr_test+0x40/0x50
39 kthread+0xff/0x130
40 ? cryptomgr_notify+0x540/0x540
41 ? kthread_create_on_node+0x70/0x70
42 ret_from_fork+0x24/0x50
43
44Fixes: ed8ccaef52 ("crypto: qat - Add support for SRIOV")
45Cc: stable@vger.kernel.org
46Signed-off-by: Alexander Sverdlin <alexander.sverdlin@nokia.com>
47Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
48
49Upstream-Status: Backport
50[https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1b82feb6c5e1996513d0fb0bbb475417088b4954]
51
52Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com>
53---
54 quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h | 2 +-
55 1 file changed, 1 insertion(+), 1 deletion(-)
56
57diff --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
58index 08e3519..87dd5f1 100644
59--- a/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
60+++ b/quickassist/qat/drivers/crypto/qat/qat_common/adf_common_drv.h
61@@ -100,7 +100,7 @@ struct service_hndl {
62
63 static inline int get_current_node(void)
64 {
65- return topology_physical_package_id(smp_processor_id());
66+ return topology_physical_package_id(raw_smp_processor_id());
67 }
68
69 int adf_service_register(struct service_hndl *service);
70--
712.14.4
72
diff --git a/recipes-extended/qat/qat17_4.7.0-00006.bb b/recipes-extended/qat/qat17_4.7.0-00006.bb
index af292cf..e1c619d 100644
--- a/recipes-extended/qat/qat17_4.7.0-00006.bb
+++ b/recipes-extended/qat/qat17_4.7.0-00006.bb
@@ -26,6 +26,7 @@ SRC_URI = "https://01.org/sites/default/files/downloads/qat1.7.l.4.7.0-00006.tar
26 file://qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch \ 26 file://qat17_4.7.0-00006-crypto-qat-adf_aer-Remove-pci_cleanup_aer_uncorrect_.patch \
27 file://qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch \ 27 file://qat17_4.7.0-00006-qat-replace-linux-cryptohash.h-with-crypto-sha.h-for.patch \
28 file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \ 28 file://qat17_4.7.0-00006-overwrite-KBUILD_BUILTIN-in-kernel-s-Makefile.patch \
29 file://qat17_4.7.0-00006-crypto-qat-Silence-smp_processor_id-warning.patch \
29 " 30 "
30 31
31do_fetch[depends] += "virtual/kernel:do_shared_workdir" 32do_fetch[depends] += "virtual/kernel:do_shared_workdir"