From patchwork Thu Jul 30 06:55:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ike Panhc X-Patchwork-Id: 1338685 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHLlC6msBz9sRW; Thu, 30 Jul 2020 16:55:19 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1k12TE-0000h9-Lc; Thu, 30 Jul 2020 06:55:16 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k12TD-0000gt-ME for kernel-team@lists.ubuntu.com; Thu, 30 Jul 2020 06:55:15 +0000 Received: from 1.general.ikepanhc.us.vpn ([10.172.69.54] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k12TC-0005Pf-JI for kernel-team@lists.ubuntu.com; Thu, 30 Jul 2020 06:55:15 +0000 From: Ike Panhc To: kernel-team@lists.ubuntu.com Subject: [PATCH 1/2][F] Revert "UBUNTU: [Config] Disable hisi_sec2 temporarily" Date: Thu, 30 Jul 2020 14:55:11 +0800 Message-Id: <20200730065511.13576-1-ike.pan@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200729131502.GR3644@ubuntu-x1> References: <20200729131502.GR3644@ubuntu-x1> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://launchpad.net/bugs/1867900 This reverts commit 951fbd63c04096369d8fc5ff3e53ddc2b2d5111b. Signed-off-by: Ike Panhc --- debian.master/abi/5.4.0-41.45/arm64/generic.modules | 1 + debian.master/config/annotations | 2 +- debian.master/config/config.common.ubuntu | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian.master/abi/5.4.0-41.45/arm64/generic.modules b/debian.master/abi/5.4.0-41.45/arm64/generic.modules index d6f74358a075..a41c6bc99ad9 100644 --- a/debian.master/abi/5.4.0-41.45/arm64/generic.modules +++ b/debian.master/abi/5.4.0-41.45/arm64/generic.modules @@ -1894,6 +1894,7 @@ hisi_sas_v1_hw hisi_sas_v2_hw hisi_sas_v3_hw hisi_sec +hisi_sec2 hisi_thermal hisi_zip hix5hd2_gmac diff --git a/debian.master/config/annotations b/debian.master/config/annotations index 859cdb54ebf9..5462b7f0266b 100644 --- a/debian.master/config/annotations +++ b/debian.master/config/annotations @@ -422,7 +422,7 @@ CONFIG_CRYPTO_DEV_SAFEXCEL policy<{'amd64': 'm', 'arm64': ' CONFIG_CRYPTO_DEV_ARTPEC6 policy<{'armhf': 'm'}> CONFIG_CRYPTO_DEV_CCREE policy<{'arm64': 'm', 'armhf': 'm', 'ppc64el': 'm', }> CONFIG_CRYPTO_DEV_HISI_SEC policy<{'arm64': 'm'}> -CONFIG_CRYPTO_DEV_HISI_SEC2 policy<{'arm64': 'n'}> +CONFIG_CRYPTO_DEV_HISI_SEC2 policy<{'arm64': 'm'}> CONFIG_CRYPTO_DEV_HISI_ZIP policy<{'arm64': 'm'}> CONFIG_CRYPTO_DEV_HISI_HPRE policy<{'arm64': 'm'}> # diff --git a/debian.master/config/config.common.ubuntu b/debian.master/config/config.common.ubuntu index ea5b5f51ea43..4bcbf2397407 100644 --- a/debian.master/config/config.common.ubuntu +++ b/debian.master/config/config.common.ubuntu @@ -2091,7 +2091,7 @@ CONFIG_CRYPTO_DEV_HIFN_795X_RNG=y CONFIG_CRYPTO_DEV_HISI_HPRE=m CONFIG_CRYPTO_DEV_HISI_QM=m CONFIG_CRYPTO_DEV_HISI_SEC=m -# CONFIG_CRYPTO_DEV_HISI_SEC2 is not set +CONFIG_CRYPTO_DEV_HISI_SEC2=m CONFIG_CRYPTO_DEV_HISI_ZIP=m CONFIG_CRYPTO_DEV_MARVELL_CESA=m CONFIG_CRYPTO_DEV_MEDIATEK=m From patchwork Thu Jul 30 06:55:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ike Panhc X-Patchwork-Id: 1338687 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=canonical.com Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BHLlQ4lbTz9sRN; Thu, 30 Jul 2020 16:55:30 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1k12TO-0000k5-W3; Thu, 30 Jul 2020 06:55:26 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k12TN-0000jP-FD for kernel-team@lists.ubuntu.com; Thu, 30 Jul 2020 06:55:25 +0000 Received: from 1.general.ikepanhc.us.vpn ([10.172.69.54] helo=canonical.com) by youngberry.canonical.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1k12TM-0005QH-Du for kernel-team@lists.ubuntu.com; Thu, 30 Jul 2020 06:55:25 +0000 From: Ike Panhc To: kernel-team@lists.ubuntu.com Subject: [PATCH 2/2][F][G][unstable] crypto: hisilicon - update SEC driver module parameter Date: Thu, 30 Jul 2020 14:55:20 +0800 Message-Id: <20200730065520.13631-1-ike.pan@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200729131502.GR3644@ubuntu-x1> References: <20200729131502.GR3644@ubuntu-x1> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://launchpad.net/bugs/1867900 As stress-ng running SEC engine on the Ubuntu OS, we found that SEC only supports two threads each with one TFM based on the default module parameter 'ctx_q_num'. If running more threads, stress-ng will fail since it cannot get more TFMs. In order to fix this, we adjusted the default values of the module parameters to support more TFMs. Signed-off-by: Longfang Liu Signed-off-by: Zaibo Xu (link: https://www.mail-archive.com/linux-crypto@vger.kernel.org/msg43093.html) Signed-off-by: Ike Panhc --- drivers/crypto/hisilicon/sec2/sec_main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/hisilicon/sec2/sec_main.c b/drivers/crypto/hisilicon/sec2/sec_main.c index 2bbaf1e2dae7..1656d04b19f8 100644 --- a/drivers/crypto/hisilicon/sec2/sec_main.c +++ b/drivers/crypto/hisilicon/sec2/sec_main.c @@ -29,9 +29,9 @@ #define SEC_SQE_SIZE 128 #define SEC_SQ_SIZE (SEC_SQE_SIZE * QM_Q_DEPTH) -#define SEC_PF_DEF_Q_NUM 64 +#define SEC_PF_DEF_Q_NUM 256 #define SEC_PF_DEF_Q_BASE 0 -#define SEC_CTX_Q_NUM_DEF 24 +#define SEC_CTX_Q_NUM_DEF 2 #define SEC_CTX_Q_NUM_MAX 32 #define SEC_CTRL_CNT_CLR_CE 0x301120 @@ -236,7 +236,7 @@ static const struct kernel_param_ops sec_ctx_q_num_ops = { }; static u32 ctx_q_num = SEC_CTX_Q_NUM_DEF; module_param_cb(ctx_q_num, &sec_ctx_q_num_ops, &ctx_q_num, 0444); -MODULE_PARM_DESC(ctx_q_num, "Queue num in ctx (24 default, 2, 4, ..., 32)"); +MODULE_PARM_DESC(ctx_q_num, "Queue num in ctx (2 default, 2, 4, ..., 32)"); static const struct pci_device_id sec_dev_ids[] = { { PCI_DEVICE(PCI_VENDOR_ID_HUAWEI, SEC_PF_PCI_DEVICE_ID) },