devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jonathan Cameron <jonathan.cameron@huawei.com>
To: linux-crypto@vger.kernel.org
Cc: linuxarm@huawei.com, xuzaibo@huawei.com,
	"Herbert Xu" <herbert@gondor.apana.org.au>,
	"David S . Miller" <davem@davemloft.net>,
	"Stephan Müller" <smueller@chronox.de>,
	devicetree@vger.kernel.org, "Mark Brown" <broonie@kernel.org>,
	"Xiongfeng Wang" <xiongfeng.wang@linaro.org>,
	"Jonathan Cameron" <Jonathan.Cameron@huawei.com>
Subject: [RFC PATCH 0/3] Hisilicon SEC accelerator driver
Date: Tue, 30 Jan 2018 15:29:50 +0000	[thread overview]
Message-ID: <20180130152953.14068-1-jonathan.cameron@huawei.com> (raw)

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

This an RFC for a couple of reasons:
1) There is some ongoing discussion on how to handle IVs in the AF_ALG
   interface when doing async IO.  There are a few corners of handling
   in here that are performance enhancements based on Stephan's recent
   set.
2) The handling of iommu presence is ugly.  I need to discuss this with
   iommu maintainer and interested parties.
3) The hardware is limited to 32MB per queued job. We need to handle
   splitting this up into multiple jobs and related IV chaining.

This driver provides in kernel support for the Hisilicon SEC
accelerators found on the hip06 and hip07 SoCs.  There are 4 such
units on the D05 board for which DT bindings are provided.  ACPI
configuration also works with an appropriate UEFI build.

The hardware does not update the IV in chaining or counting modes.
This is done in the driver on completion of the cipher operation.

If we are relying on IV chaining with current AF_ALG it is necessary
to ensure we do not stream the elements directly into the hardware
queues.  For modes where this necessary we use a front end software
queue.

The driver currently supports AES, DES and 3DES block ciphers.
Hash support and AAED support to follow.

Jonathan Cameron (3):
  dt-bindings: Add bindings for Hisilicon SEC crypto accelerators.
  crypto: hisilicon hacv1 driver
  arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC

 .../bindings/crypto/hisilicon,hip07-sec.txt        |   71 +
 arch/arm64/boot/dts/hisilicon/hip07.dtsi           |  293 ++++
 drivers/crypto/Kconfig                             |    2 +
 drivers/crypto/Makefile                            |    1 +
 drivers/crypto/hisilicon/Kconfig                   |   16 +
 drivers/crypto/hisilicon/Makefile                  |    2 +
 drivers/crypto/hisilicon/sec/Makefile              |    3 +
 drivers/crypto/hisilicon/sec/sec_algs.c            | 1082 +++++++++++++++
 drivers/crypto/hisilicon/sec/sec_drv.c             | 1418 ++++++++++++++++++++
 drivers/crypto/hisilicon/sec/sec_drv.h             |  282 ++++
 10 files changed, 3170 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/crypto/hisilicon,hip07-sec.txt
 create mode 100644 drivers/crypto/hisilicon/Kconfig
 create mode 100644 drivers/crypto/hisilicon/Makefile
 create mode 100644 drivers/crypto/hisilicon/sec/Makefile
 create mode 100644 drivers/crypto/hisilicon/sec/sec_algs.c
 create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.c
 create mode 100644 drivers/crypto/hisilicon/sec/sec_drv.h

-- 
2.11.0

             reply	other threads:[~2018-01-30 15:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-30 15:29 Jonathan Cameron [this message]
2018-01-30 15:29 ` [RFC PATCH 1/3] dt-bindings: Add bindings for Hisilicon SEC crypto accelerators Jonathan Cameron
     [not found]   ` <20180130152953.14068-2-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-02-05  6:07     ` Rob Herring
2018-01-30 15:29 ` [RFC PATCH 2/3] crypto: hisilicon hacv1 driver Jonathan Cameron
     [not found]   ` <20180130152953.14068-3-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-02-03 11:16     ` Stephan Müller
2018-02-05 14:02       ` Jonathan Cameron
2018-02-05 14:10         ` Stephan Mueller
     [not found] ` <20180130152953.14068-1-jonathan.cameron-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
2018-01-30 15:29   ` [RFC PATCH 3/3] arm64: dts: hisi: add SEC crypto accelerator nodes for hip07 SoC Jonathan Cameron

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180130152953.14068-1-jonathan.cameron@huawei.com \
    --to=jonathan.cameron@huawei.com \
    --cc=broonie@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=smueller@chronox.de \
    --cc=xiongfeng.wang@linaro.org \
    --cc=xuzaibo@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).