Message ID | 20240815085725.2740390-14-quic_mdalam@quicinc.com (mailing list archive) |
---|---|
State | Handled Elsewhere |
Headers | show
Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 25D3D1CB31B; Thu, 15 Aug 2024 08:57:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.180.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723712280; cv=none; b=p+itmnzG02LPrRdw1mbH3+kJ5LK5mmsrqJRRyQ4FfklWpFuTEtKSH95dmFdk08kKKgMm/52FsobHevyQUwsCR5NT1Opp/vPJnjsPDiwEMItm2o2iSjP7tEG3AQJQtpctb0H5fRGU/AlhbZcAc2l5+3ZgA67wWi9uQg7MheJ8zVk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723712280; c=relaxed/simple; bh=1l5TdOHbgcWuHfUzMxTaN2hJS2ywBZSk4KF70DeecsM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=ZumnBp8ZiBCf6sxxAuwmR+ZcZaOF8hG4OpasE1vq/gMNDF12DlIAVz0vr3QP5PWqGdfB8G0Lge7XRzIkX+xkZPdRkJ3QhuIxRHxwMjNedyeHZ0d0YkZ/HYIdBSGdJN+q8iPcTS1WnI5m1QZftJzo3L4b9/DxJlaxaaeBx5KTzws= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=qualcomm.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Tt3zkGX6; arc=none smtp.client-ip=205.220.180.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Tt3zkGX6" Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 47F7GpEK027147; Thu, 15 Aug 2024 08:57:34 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:date:from:in-reply-to:message-id :mime-version:references:subject:to; s=qcppdkim1; bh=bMVve0lmRS9 buNBEdR3qGI9yOpRoUH561CNAj+F5q08=; b=Tt3zkGX6r20K3H9yu6z0mtERSBE YRZP489tdj+/j7DJvCv1pnR5socEOo/MrUHO5s/suH5MTMKxlORqvMPFXTbV2iAG roAhH5T2BwgiBpdLwjX2SAA1UZYrCHyFfuCHHpU5mNebFpuLV9V+yd+ZU3b5+kBo EqmbaIHtw4/dTelwtC/UOjG9qJCvM76+ccjhgERGVxn6XMELhXGeBZB/TDzts5F2 /4Pb6H5aa2/5LLYISHrshE46hSWD6jrJUUmPUF687LlDHzW+a3kcGfh5iAM/DwKe W442xccbJEVVvUUu43Xlea3BVgTEIA67moPGj3WSr6oVAOTyDfdtoJvJCpA== 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 411d5688pd-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Aug 2024 08:57:33 +0000 (GMT) Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTP id 47F8u8eE028285; Thu, 15 Aug 2024 08:57:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 40xkmhennv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Aug 2024 08:57:31 +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 47F8vSF6029646; Thu, 15 Aug 2024 08:57:30 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 47F8vToF029697 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 15 Aug 2024 08:57:30 +0000 Received: by hu-devc-blr-u22-a.qualcomm.com (Postfix, from userid 466583) id B9606417FB; Thu, 15 Aug 2024 14:27:27 +0530 (+0530) From: Md Sadre Alam <quic_mdalam@quicinc.com> To: vkoul@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, andersson@kernel.org, konradybcio@kernel.org, thara.gopinath@gmail.com, herbert@gondor.apana.org.au, davem@davemloft.net, gustavoars@kernel.org, u.kleine-koenig@pengutronix.de, kees@kernel.org, agross@kernel.org, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org Cc: quic_srichara@quicinc.com, quic_varada@quicinc.com, quic_mdalam@quicinc.com, quic_utiwari@quicinc.com Subject: [PATCH v2 13/16] crypto: qce - Add support for lock/unlock in aead Date: Thu, 15 Aug 2024 14:27:22 +0530 Message-Id: <20240815085725.2740390-14-quic_mdalam@quicinc.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240815085725.2740390-1-quic_mdalam@quicinc.com> References: <20240815085725.2740390-1-quic_mdalam@quicinc.com> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: <dmaengine.vger.kernel.org> List-Subscribe: <mailto:dmaengine+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:dmaengine+unsubscribe@vger.kernel.org> 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-GUID: pWga5pM_evWnirxuErqi5Phsp8rwPfoA X-Proofpoint-ORIG-GUID: pWga5pM_evWnirxuErqi5Phsp8rwPfoA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-08-15_01,2024-08-13_02,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 malwarescore=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 bulkscore=0 clxscore=1015 phishscore=0 priorityscore=1501 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2407110000 definitions=main-2408150064 |
Series |
Add cmd descriptor support
|
expand
|
diff --git a/drivers/crypto/qce/aead.c b/drivers/crypto/qce/aead.c index 7d811728f047..13fb7af69f54 100644 --- a/drivers/crypto/qce/aead.c +++ b/drivers/crypto/qce/aead.c @@ -63,6 +63,8 @@ static void qce_aead_done(void *data) sg_free_table(&rctx->dst_tbl); } + qce_bam_release_lock(qce); + error = qce_check_status(qce, &status); if (error < 0 && (error != -EBADMSG)) dev_err(qce->dev, "aead operation error (%x)\n", status); @@ -433,6 +435,8 @@ qce_aead_async_req_handle(struct crypto_async_request *async_req) else rctx->assoclen = req->assoclen; + qce_bam_acquire_lock(qce); + diff_dst = (req->src != req->dst) ? true : false; dir_src = diff_dst ? DMA_TO_DEVICE : DMA_BIDIRECTIONAL; dir_dst = diff_dst ? DMA_FROM_DEVICE : DMA_BIDIRECTIONAL;
Add support for lock/unlock on bam pipe in aead. If multiple EE's(Execution Environment) try to access the same crypto engine then before accessing the crypto engine EE's has to lock the bam pipe and then submit the request to crypto engine. Once request done then EE's has to unlock the bam pipe so that others EE's can access the crypto engine. Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com> --- Change in [v2] * Removed unmap_sg() from crypto done api Change in [v1] * Added qce_bam_acquire_lock and qce_bam_release_lock api in aead drivers/crypto/qce/aead.c | 4 ++++ 1 file changed, 4 insertions(+)