Message ID | 20231214114239.2635325-1-quic_mdalam@quicinc.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8478932dys; Thu, 14 Dec 2023 03:43:49 -0800 (PST) X-Google-Smtp-Source: AGHT+IEgRU8VNS3+mOiVVWZ15AuA902pyC/LuYrwA/JUY2K5OZTr6d0K5/fr8bZdU5sQwSLF2d5u X-Received: by 2002:a05:6a00:4581:b0:6d2:6b0c:613f with SMTP id it1-20020a056a00458100b006d26b0c613fmr222947pfb.67.1702554229087; Thu, 14 Dec 2023 03:43:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702554229; cv=none; d=google.com; s=arc-20160816; b=In/Ixpe7LUqza0eHK83ONuHjuPj3Kbb3cR2CXkkYw8l5diLXOieNMky0+9HLpU178o 9X+L1rhK7kReoIczthOwovEEo9FqvgvkdRMw7lMk7HPMTgbBAZus7nTiEDLlD57j2kB/ CgTSCF3tvpniYr4SD2fnzHKd7BeLfomyj7xpH/Dkqg4Pao4NNTkC/jg0BKuOkWu11Ppw kWnmE7REEEchMlX4qa2yl57gViQbM39IoKRhxpeR5NCAFN9hrQ6thlIlwY/9bl0vK39N CVc/XRettYaa+rxeY2q3zSeGGCT71WjWkR27gmzPvUeERpv/+EdXTd7TUjI0clYrUsus 6Y2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=UaPkvFvrgs/7Kiutb4T2XzNFd/EKJ1AzPTC8kfhBZE4=; fh=TEn06IatapHMgkFhNRCYXHrnqycBlFaJECTG22CvvEc=; b=w4m2EG5DzTuLYpNtw7WT4qN32vtF/j7zEV61JsvNtRTzjrtsdReTYfEiG/CE+tzBhi IoytcaT/oQVAJjfZNGb7SUb3m+XnKfll+VzW9vR+Rs2MZZlJtPIjZJFwDXR3imeJyU7v SSs90xW00Axm3iOctIOgIU0PjuCkPBUS7qwwHi6zLHLZYsuu4x+v99WJjtOolEvcmDp4 J3UXwOQzoE3qG5HQfgAEBLGntDUe6rDMjEuGiHcc05WTIlSDuTIlRV2BZTFRYIJxk7EL E7Npw13sspMM4y9X1VO3DUNVDGqkKnE8ujXP124rFszGgMpQOQUHefvSHDbS/heVdhmF gUQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Bqjbd6Hj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id s7-20020a056a0008c700b006d09ceb6d1asi5616311pfu.173.2023.12.14.03.43.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 03:43:49 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=Bqjbd6Hj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id ED05982271B3; Thu, 14 Dec 2023 03:43:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1444176AbjLNLnc (ORCPT <rfc822;dexuan.linux@gmail.com> + 99 others); Thu, 14 Dec 2023 06:43:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1444075AbjLNLmx (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 14 Dec 2023 06:42:53 -0500 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AE16B2; Thu, 14 Dec 2023 03:43:00 -0800 (PST) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 3BE5tKH8000547; Thu, 14 Dec 2023 11:42:49 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; s=qcppdkim1; bh=UaPkvFvrgs/7Kiutb4T2 XzNFd/EKJ1AzPTC8kfhBZE4=; b=Bqjbd6HjqtgfwrN1X32fHLW4lG/+8MoxpPLR OAN2yEqCqRZ0maPPBtcLj9e5zDYXyWofXUs5y5L7YRVFtbAuQXSKXH/z7/gdZs1X rVH6hZMyPhoDv6hy1llB5vbhAjhhRttYuKUJt8EO4ybVOwJrSKOf1aKjz81ou/Ci 4l+F/akw6y5+FELOnIo20+dly7fNQvMlYJr9c8gk+AHyOX6eDCBofok6w9anYUUI P6GaQfqECGrTYX18Nkbo0f8t1ZDHyYQ4ddwQ2PD5o8G9rV9sTfdhT5TXHWp5qgTC vkLs12idH3QSI8fEUWDiT7ygfHOQ6yCuMXKbFV5ni2F414Izag== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3uyp0p9a38-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 11:42:48 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 3BEBgh38003053; Thu, 14 Dec 2023 11:42:43 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3uvhaktcgh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 11:42:43 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BEBghom002916; Thu, 14 Dec 2023 11:42:43 GMT Received: from hu-devc-blr-u22-a.qualcomm.com (hu-mdalam-blr.qualcomm.com [10.131.36.157]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3BEBghj5002826 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Dec 2023 11:42:43 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id 81C9D414B7; Thu, 14 Dec 2023 17:12:42 +0530 (+0530) From: Md Sadre Alam <quic_mdalam@quicinc.com> To: thara.gopinath@gmail.com, herbert@gondor.apana.org.au, davem@davemloft.net, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, vkoul@kernel.org, linux-crypto@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, quic_srichara@quicinc.com, quic_varada@quicinc.com Cc: quic_mdalam@quicinc.com Subject: [PATCH 00/11] Add cmd descriptor support Date: Thu, 14 Dec 2023 17:12:28 +0530 Message-Id: <20231214114239.2635325-1-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: tqziVHUzaBsXNm0zfwIgwYP9Qqh9ElzM X-Proofpoint-GUID: tqziVHUzaBsXNm0zfwIgwYP9Qqh9ElzM X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-09_02,2023-12-07_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 mlxlogscore=491 mlxscore=0 priorityscore=1501 phishscore=0 impostorscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2311290000 definitions=main-2312140080 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 14 Dec 2023 03:43:43 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785257503294206486 X-GMAIL-MSGID: 1785257503294206486 |
Series |
Add cmd descriptor support
|
|
Message
Md Sadre Alam
Dec. 14, 2023, 11:42 a.m. UTC
This series of patches will add command descriptor support to read/write crypto engine register via BAM/DMA We need this support because if there is multiple EE's (Execution Environment) accessing the same CE even with different BAM pipe , then there will be race condition. To avoid this race condition BAM HW having LOCK/UNLOCK feature on BAM pipes and this LOCK/UNLOCK will be set via command descriptor only. Since each EE's having their dedicated BAM pipe, BAM allows Locking and Unlocking on BAM pipe. So if one EE's requesting for CE5 access then that EE's first has to LOCK the BAM pipe while setting LOCK bit on command descriptor and then access it. After finishing the request EE's has to UNLOCK the BAM pipe so in this way we race condition will not happen. Md Sadre Alam (11): crypto: qce - Add support for crypto address read crypto: qce - Add bam dma support for crypto register r/w crypto: qce - Convert register r/w for skcipher via BAM/DMA crypto: qce - Convert register r/w for sha via BAM/DMA crypto: qce - Convert register r/w for aead via BAM/DMA drivers: bam_dma: Add LOCK & UNLOCK flag support crypto: qce - Add LOCK and UNLOCK flag support crypto: qce - Add support for lock aquire,lock release api. crypto: qce - Add support for lock/unlock in skcipher crypto: qce - Add support for lock/unlock in sha crypto: qce - Add support for lock/unlock in aead drivers/crypto/qce/aead.c | 16 +++ drivers/crypto/qce/common.c | 144 +++++++++++++------ drivers/crypto/qce/core.c | 9 ++ drivers/crypto/qce/core.h | 12 ++ drivers/crypto/qce/dma.c | 238 +++++++++++++++++++++++++++++++ drivers/crypto/qce/dma.h | 26 +++- drivers/crypto/qce/sha.c | 16 +++ drivers/crypto/qce/skcipher.c | 16 +++ drivers/dma/qcom/bam_dma.c | 10 ++ include/linux/dma/qcom_bam_dma.h | 2 + 10 files changed, 447 insertions(+), 42 deletions(-)