Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp409731pxj; Fri, 11 Jun 2021 02:08:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzBRmmLEPIjCoGSk8OXBFkKjdnmFgxxafw9tnJ2YE39ZMH0mKheN3aBURKKFEoivTPBKjyY X-Received: by 2002:a17:906:2c54:: with SMTP id f20mr2749257ejh.91.1623402521417; Fri, 11 Jun 2021 02:08:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623402521; cv=none; d=google.com; s=arc-20160816; b=jBi7+1u7xYvpjHX+5vsY9v01maOb4a/m8f9G8JWLlEMVo3Bj2BdsdhBFjwtYXoZUYz 783vN8GL8uRxnJ+BlSeY+pd4rn8jqQkV4U7ZWbKoF0zJO6SbFP0vc311OrBMz+fxm5gO tgZzq+JicJHl3ix10+jTNyKdjCouEzyk/dkBaMRZ/BxozVUWiEmw683tlKFrgYc/oC+b kjQh08mUiuAc03hwBFZqgU6A3JtU0mLNTqGpj52ToIBGKM20p7UGGM9YM6MBsGKOSe0i bcU3LtDGe2QEGBvcwieT8THhuiMHMSwFtlzjLwODTQNIgvbo2h9PLGhTjjnesdtpM7Qt DTMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=D5zt7bQV1vTzlUNWqICzn8KWcJTTO+quIExooQPs1iI=; b=N056IpZcJ7O4D11mxUGJivZdxq/TcY02xVUbns0G6faq8eu6jlgE4g+ktnhU+ETWdV 2mkFnVVSSgkbJAQBPD/aaEKpZlpCv59ilfbzQbEu5w39Gvo/rqBnU74ju3Q0zuVDYXGz ba42KdIXMDeVzig9vCFQCm2telP9RDDoU/cgFHbtvzpAcwMrUR6sAPaak+IUkTA2N8OV nWTQ2YJUY7c8gc93rCJ5oPPFZqXxUtQkuA0Xsz/hN+L7aeEW6rkjxNHsdh/dNkrL/uXZ 4N7vhor8hgwIUYp328DwTKKHJ2ow3Bcm+tubOS7AudklwRCKqBQxZaW6DdOicr1e8P8F 5vYg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jo17si4491279ejb.32.2021.06.11.02.08.18; Fri, 11 Jun 2021 02:08:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231509AbhFKJJT (ORCPT + 99 others); Fri, 11 Jun 2021 05:09:19 -0400 Received: from szxga02-in.huawei.com ([45.249.212.188]:3963 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231526AbhFKJJP (ORCPT ); Fri, 11 Jun 2021 05:09:15 -0400 Received: from dggemv703-chm.china.huawei.com (unknown [172.30.72.53]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4G1Zf000z6z6xdJ; Fri, 11 Jun 2021 17:04:07 +0800 (CST) Received: from dggpeml500012.china.huawei.com (7.185.36.15) by dggemv703-chm.china.huawei.com (10.3.19.46) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 11 Jun 2021 17:07:09 +0800 Received: from huawei.com (10.69.192.56) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.2; Fri, 11 Jun 2021 17:07:09 +0800 From: Kai Ye To: CC: , , , Subject: [PATCH 7/8] crypto: hisilicon/hpre - adds the max shaper type rate Date: Fri, 11 Jun 2021 17:06:49 +0800 Message-ID: <1623402410-63906-8-git-send-email-yekai13@huawei.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1623402410-63906-1-git-send-email-yekai13@huawei.com> References: <1623402410-63906-1-git-send-email-yekai13@huawei.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.69.192.56] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org The HPRE driver support configure each function's QoS in the Host for Kunpeng930. The HPRE driver needs to configure the maximum shaper type rate. Signed-off-by: Kai Ye --- drivers/crypto/hisilicon/hpre/hpre_main.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/crypto/hisilicon/hpre/hpre_main.c b/drivers/crypto/hisilicon/hpre/hpre_main.c index 37c5296..8b0640f 100644 --- a/drivers/crypto/hisilicon/hpre/hpre_main.c +++ b/drivers/crypto/hisilicon/hpre/hpre_main.c @@ -92,6 +92,7 @@ #define HPRE_QM_PM_FLR BIT(11) #define HPRE_QM_SRIOV_FLR BIT(12) +#define HPRE_SHAPER_TYPE_RATE 128 #define HPRE_VIA_MSI_DSM 1 #define HPRE_SQE_MASK_OFFSET 8 #define HPRE_SQE_MASK_LEN 24 @@ -947,6 +948,7 @@ static int hpre_pf_probe_init(struct hpre *hpre) static int hpre_probe_init(struct hpre *hpre) { + u32 type_rate = HPRE_SHAPER_TYPE_RATE; struct hisi_qm *qm = &hpre->qm; int ret; @@ -954,6 +956,11 @@ static int hpre_probe_init(struct hpre *hpre) ret = hpre_pf_probe_init(hpre); if (ret) return ret; + /* Enable shaper type 0 */ + if (qm->ver >= QM_HW_V3) { + type_rate |= QM_SHAPER_ENABLE; + qm->type_rate = type_rate; + } } return 0; -- 2.7.4