Re: [PATCH v2 00/16] Add cmd descriptor support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 8/15/2024 6:38 PM, Caleb Connolly wrote:
Hi,

A note for future patches, please scope your cover letter subject:

"dmaengine: qcom: bam_dma: add cmd descriptor support"

  Sure will add this in next patch.

On 15/08/2024 10:57, Md Sadre Alam wrote:
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

DT changes here are only for a few IPQ platforms, please explain in the cover letter if this is some IPQ specific feature which doesn't exist on other platforms, or if you're only enabling it on IPQ.

   This feature is BAM hardware feature so its applicable for all the QCOM Soc where bam is there. Its not IPQ specific. Will add all the explanation in cover letter in next patch

Some broad strokes testing instructions (at the very least) and requirements (testing on what hardware?) aren't made obvious at all here.

   Sure will update in cover letter in next patch.

Kind regards,

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@xxxxxxxxxxx/
  * 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(-)






[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux