devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 00/16] Add cmd descriptor support
@ 2024-08-15  8:57 Md Sadre Alam
  2024-08-15  8:57 ` [PATCH v2 01/16] dt-bindings: dma: qcom,bam: Add bam pipe lock Md Sadre Alam
                   ` (17 more replies)
  0 siblings, 18 replies; 43+ messages in thread
From: Md Sadre Alam @ 2024-08-15  8:57 UTC (permalink / raw)
  To: vkoul, robh, krzk+dt, conor+dt, andersson, konradybcio,
	thara.gopinath, herbert, davem, gustavoars, u.kleine-koenig, kees,
	agross, linux-arm-msm, dmaengine, devicetree, linux-kernel,
	linux-crypto
  Cc: quic_srichara, quic_varada, quic_mdalam, quic_utiwari

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 then there
will be race condition. To avoid this race condition
BAM HW hsving LOC/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.

tested with "tcrypt.ko" and "kcapi" tool.

Need help to test these all the patches on msm platform

v2:
 * Addressed all the comments from v1
 * Added the dt-binding
 * Added locking/unlocking mechanism in bam driver

v1:
 * https://lore.kernel.org/lkml/20231214114239.2635325-1-quic_mdalam@quicinc.com/
 * Initial set of patches for cmd descriptor support

Md Sadre Alam (16):
  dt-bindings: dma: qcom,bam: Add bam pipe lock
  dmaengine: qcom: bam_dma: add bam_pipe_lock dt property
  dmaengine: qcom: bam_dma: add LOCK & UNLOCK flag support
  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
  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
  arm64: dts: qcom: ipq9574: enable bam pipe locking/unlocking
  arm64: dts: qcom: ipq8074: enable bam pipe locking/unlocking
  arm64: dts: qcom: ipq6018: enable bam pipe locking/unlocking

 .../devicetree/bindings/dma/qcom,bam-dma.yaml |   8 +
 arch/arm64/boot/dts/qcom/ipq6018.dtsi         |   1 +
 arch/arm64/boot/dts/qcom/ipq8074.dtsi         |   1 +
 arch/arm64/boot/dts/qcom/ipq9574.dtsi         |   1 +
 drivers/crypto/qce/aead.c                     |   4 +
 drivers/crypto/qce/common.c                   | 142 +++++++----
 drivers/crypto/qce/core.c                     |  13 +-
 drivers/crypto/qce/core.h                     |  12 +
 drivers/crypto/qce/dma.c                      | 232 ++++++++++++++++++
 drivers/crypto/qce/dma.h                      |  26 +-
 drivers/crypto/qce/sha.c                      |   4 +
 drivers/crypto/qce/skcipher.c                 |   4 +
 drivers/dma/qcom/bam_dma.c                    |  14 +-
 include/linux/dmaengine.h                     |   6 +
 14 files changed, 424 insertions(+), 44 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2024-09-06  7:11 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-15  8:57 [PATCH v2 00/16] Add cmd descriptor support Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 01/16] dt-bindings: dma: qcom,bam: Add bam pipe lock Md Sadre Alam
2024-08-16 15:53   ` Bjorn Andersson
2024-08-21  4:54     ` Md Sadre Alam
2024-08-17  9:08   ` Krzysztof Kozlowski
2024-08-21 16:34     ` Md Sadre Alam
2024-08-22  6:27       ` Krzysztof Kozlowski
2024-08-22 11:45         ` Md Sadre Alam
2024-08-23  9:07           ` Krzysztof Kozlowski
2024-08-24  7:07             ` Md Sadre Alam
2024-08-23 15:39   ` Manivannan Sadhasivam
2024-08-24  7:04     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 02/16] dmaengine: qcom: bam_dma: add bam_pipe_lock dt property Md Sadre Alam
2024-08-17  9:08   ` Krzysztof Kozlowski
2024-08-21 16:36     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 03/16] dmaengine: qcom: bam_dma: add LOCK & UNLOCK flag support Md Sadre Alam
2024-08-16 16:22   ` Bjorn Andersson
2024-08-21 16:31     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 04/16] crypto: qce - Add support for crypto address read Md Sadre Alam
2024-08-17  9:10   ` Krzysztof Kozlowski
2024-08-21 16:40     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 05/16] crypto: qce - Add bam dma support for crypto register r/w Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 06/16] crypto: qce - Convert register r/w for skcipher via BAM/DMA Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 07/16] crypto: qce - Convert register r/w for sha " Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 08/16] crypto: qce - Convert register r/w for aead " Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 09/16] crypto: qce - Add LOCK and UNLOCK flag support Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 10/16] crypto: qce - Add support for lock aquire,lock release api Md Sadre Alam
2024-08-16 16:38   ` Bjorn Andersson
2024-08-21  5:14     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 11/16] crypto: qce - Add support for lock/unlock in skcipher Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 12/16] crypto: qce - Add support for lock/unlock in sha Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 13/16] crypto: qce - Add support for lock/unlock in aead Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 14/16] arm64: dts: qcom: ipq9574: enable bam pipe locking/unlocking Md Sadre Alam
2024-08-16 16:40   ` Bjorn Andersson
2024-08-21  5:16     ` Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 15/16] arm64: dts: qcom: ipq8074: " Md Sadre Alam
2024-08-15  8:57 ` [PATCH v2 16/16] arm64: dts: qcom: ipq6018: " Md Sadre Alam
2024-08-15 13:08 ` [PATCH v2 00/16] Add cmd descriptor support Caleb Connolly
2024-08-16 12:03   ` Md Sadre Alam
2024-08-16 15:45     ` Bjorn Andersson
2024-09-06  7:06       ` Md Sadre Alam
2024-08-16 16:01 ` Bjorn Andersson
2024-08-21  4:57   ` Md Sadre Alam

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).