The following series adds support for Marvell Cryptographic Acceleration
Unit(CPT) on OcteonTX2 CN96XX SoC.
This series is tested with CRYPTO_EXTRA_TESTS enabled and
CRYPTO_DISABLE_TESTS disabled.
Srujana Challa (4):
octeontx2-af: add support to manage the CPT unit
drivers: crypto: add support for OCTEONTX2 CPT engine
drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT
crypto: marvell: enable OcteonTX2 cpt options for build
drivers/crypto/marvell/Kconfig | 17 +
drivers/crypto/marvell/Makefile | 1 +
drivers/crypto/marvell/octeontx2/Makefile | 14 +
drivers/crypto/marvell/octeontx2/otx2_cpt_common.h | 53 +
.../crypto/marvell/octeontx2/otx2_cpt_hw_types.h | 572 ++++++
.../marvell/octeontx2/otx2_cpt_mbox_common.c | 286 +++
.../marvell/octeontx2/otx2_cpt_mbox_common.h | 100 +
drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h | 202 ++
drivers/crypto/marvell/octeontx2/otx2_cptlf.h | 370 ++++
drivers/crypto/marvell/octeontx2/otx2_cptlf_main.c | 964 +++++++++
drivers/crypto/marvell/octeontx2/otx2_cptpf.h | 79 +
drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 599 ++++++
drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c | 694 +++++++
.../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2173 ++++++++++++++++++++
.../crypto/marvell/octeontx2/otx2_cptpf_ucode.h | 180 ++
drivers/crypto/marvell/octeontx2/otx2_cptvf.h | 29 +
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 1708 +++++++++++++++
drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h | 172 ++
drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 229 +++
drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.c | 189 ++
.../crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 543 +++++
drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +-
drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 85 +
drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 7 +
.../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 343 +++
.../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 342 +++
.../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 76 +
.../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 65 +-
29 files changed, 10088 insertions(+), 8 deletions(-)
create mode 100644 drivers/crypto/marvell/octeontx2/Makefile
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_hw_types.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf_main.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.c
create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
--
1.9.1
Add OcteonTX2 cpt options in crypto Kconfig and Makefile
Signed-off-by: Srujana Challa <[email protected]>
---
drivers/crypto/marvell/Kconfig | 17 +++++++++++++++++
drivers/crypto/marvell/Makefile | 1 +
drivers/crypto/marvell/octeontx2/Makefile | 14 ++++++++++++++
3 files changed, 32 insertions(+)
create mode 100644 drivers/crypto/marvell/octeontx2/Makefile
diff --git a/drivers/crypto/marvell/Kconfig b/drivers/crypto/marvell/Kconfig
index 1306338..fe4f48c 100644
--- a/drivers/crypto/marvell/Kconfig
+++ b/drivers/crypto/marvell/Kconfig
@@ -35,3 +35,20 @@ config CRYPTO_DEV_OCTEONTX_CPT
To compile this driver as module, choose M here:
the modules will be called octeontx-cpt and octeontx-cptvf
+
+config CRYPTO_DEV_OCTEONTX2_CPT
+ tristate "Support for Marvell OcteonTX2 CPT driver"
+ depends on ARCH_THUNDER || COMPILE_TEST
+ depends on PCI_MSI && 64BIT
+ depends on CRYPTO_LIB_AES
+ select OCTEONTX2_MBOX
+ select CRYPTO_SKCIPHER
+ select CRYPTO_HASH
+ select CRYPTO_AEAD
+ select CRYPTO_DEV_MARVELL
+ help
+ This driver allows you to utilize the Marvell Cryptographic
+ Accelerator Unit(CPT) found in OcteonTX2 series of processors.
+
+ To compile this driver as module, choose M here:
+ the modules will be called octeontx2-cpt and octeontx2-cptvf
diff --git a/drivers/crypto/marvell/Makefile b/drivers/crypto/marvell/Makefile
index 6c6a151..39db6d9 100644
--- a/drivers/crypto/marvell/Makefile
+++ b/drivers/crypto/marvell/Makefile
@@ -2,3 +2,4 @@
obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += cesa/
obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx/
+obj-$(CONFIG_CRYPTO_DEV_OCTEONTX2_CPT) += octeontx2/
diff --git a/drivers/crypto/marvell/octeontx2/Makefile b/drivers/crypto/marvell/octeontx2/Makefile
new file mode 100644
index 0000000..49b988c
--- /dev/null
+++ b/drivers/crypto/marvell/octeontx2/Makefile
@@ -0,0 +1,14 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_CRYPTO_DEV_OCTEONTX2_CPT) += octeontx2-cpt.o octeontx2-cptvf.o
+
+common-objs := otx2_cpt_mbox_common.o
+octeontx2-cpt-objs := otx2_cptpf_main.o otx2_cptpf_mbox.o otx2_cptpf_ucode.o \
+ ${common-objs}
+octeontx2-cptvf-objs := otx2_cptvf_main.o otx2_cptvf_mbox.o otx2_cptlf_main.o \
+ otx2_cptvf_reqmgr.o otx2_cptvf_algs.o
+
+ifeq ($(CONFIG_CRYPTO_DEV_OCTEONTX2_CPT), m)
+ octeontx2-cptvf-objs += ${common-objs}
+endif
+
+ccflags-y += -I$(src)/../../../net/ethernet/marvell/octeontx2/af/
--
1.9.1
Hi Srujana,
I love your patch! Yet something to improve:
[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master sparc-next/master linus/master v5.8-rc6 next-20200724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Srujana-Challa/Add-Support-for-Marvell-OcteonTX2-Cryptographic/20200724-211100
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1d09ecf36175f7910ffedd6d497c07b5c74c22fb)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
In file included from drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c:5:
In file included from drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.h:8:
In file included from drivers/crypto/marvell/octeontx2/otx2_cptpf.h:8:
In file included from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h:12:
>> drivers/crypto/marvell/octeontx2/otx2_cpt_common.h:14:10: fatal error: 'rvu.h' file not found
#include "rvu.h"
^~~~~~~
1 error generated.
--
In file included from drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c:4:
>> drivers/crypto/marvell/octeontx2/otx2_cptvf.h:8:10: fatal error: 'mbox.h' file not found
#include "mbox.h"
^~~~~~~~
1 error generated.
vim +14 drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
9b59f386596e8e1 Srujana Challa 2020-07-24 7
9b59f386596e8e1 Srujana Challa 2020-07-24 8 #include <linux/pci.h>
9b59f386596e8e1 Srujana Challa 2020-07-24 9 #include <linux/types.h>
9b59f386596e8e1 Srujana Challa 2020-07-24 10 #include <linux/module.h>
9b59f386596e8e1 Srujana Challa 2020-07-24 11 #include <linux/delay.h>
9b59f386596e8e1 Srujana Challa 2020-07-24 12 #include <linux/crypto.h>
9b59f386596e8e1 Srujana Challa 2020-07-24 13 #include "otx2_cpt_hw_types.h"
9b59f386596e8e1 Srujana Challa 2020-07-24 @14 #include "rvu.h"
9b59f386596e8e1 Srujana Challa 2020-07-24 15
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Hi Srujana,
I love your patch! Yet something to improve:
[auto build test ERROR on cryptodev/master]
[also build test ERROR on crypto/master sparc-next/master linus/master v5.8-rc6 next-20200724]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Srujana-Challa/Add-Support-for-Marvell-OcteonTX2-Cryptographic/20200724-211100
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>
All errors (new ones prefixed by >>):
In file included from drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h:12,
from drivers/crypto/marvell/octeontx2/otx2_cptpf.h:8,
from drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.h:8,
from drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c:5:
>> drivers/crypto/marvell/octeontx2/otx2_cpt_common.h:14:10: fatal error: rvu.h: No such file or directory
14 | #include "rvu.h"
| ^~~~~~~
compilation terminated.
--
In file included from drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c:4:
>> drivers/crypto/marvell/octeontx2/otx2_cptvf.h:8:10: fatal error: mbox.h: No such file or directory
8 | #include "mbox.h"
| ^~~~~~~~
compilation terminated.
vim +14 drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
9b59f386596e8e Srujana Challa 2020-07-24 7
9b59f386596e8e Srujana Challa 2020-07-24 8 #include <linux/pci.h>
9b59f386596e8e Srujana Challa 2020-07-24 9 #include <linux/types.h>
9b59f386596e8e Srujana Challa 2020-07-24 10 #include <linux/module.h>
9b59f386596e8e Srujana Challa 2020-07-24 11 #include <linux/delay.h>
9b59f386596e8e Srujana Challa 2020-07-24 12 #include <linux/crypto.h>
9b59f386596e8e Srujana Challa 2020-07-24 13 #include "otx2_cpt_hw_types.h"
9b59f386596e8e Srujana Challa 2020-07-24 @14 #include "rvu.h"
9b59f386596e8e Srujana Challa 2020-07-24 15
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Hi Srujana,
On Fri, Jul 24, 2020 at 6:39 PM Srujana Challa <[email protected]> wrote:
>
> The following series adds support for Marvell Cryptographic Acceleration
> Unit(CPT) on OcteonTX2 CN96XX SoC.
> This series is tested with CRYPTO_EXTRA_TESTS enabled and
> CRYPTO_DISABLE_TESTS disabled.
>
> Srujana Challa (4):
> octeontx2-af: add support to manage the CPT unit
> drivers: crypto: add support for OCTEONTX2 CPT engine
> drivers: crypto: add the Virtual Function driver for OcteonTX2 CPT
> crypto: marvell: enable OcteonTX2 cpt options for build
>
> drivers/crypto/marvell/Kconfig | 17 +
> drivers/crypto/marvell/Makefile | 1 +
> drivers/crypto/marvell/octeontx2/Makefile | 14 +
> drivers/crypto/marvell/octeontx2/otx2_cpt_common.h | 53 +
> .../crypto/marvell/octeontx2/otx2_cpt_hw_types.h | 572 ++++++
> .../marvell/octeontx2/otx2_cpt_mbox_common.c | 286 +++
> .../marvell/octeontx2/otx2_cpt_mbox_common.h | 100 +
> drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h | 202 ++
> drivers/crypto/marvell/octeontx2/otx2_cptlf.h | 370 ++++
> drivers/crypto/marvell/octeontx2/otx2_cptlf_main.c | 964 +++++++++
> drivers/crypto/marvell/octeontx2/otx2_cptpf.h | 79 +
> drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c | 599 ++++++
> drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c | 694 +++++++
> .../crypto/marvell/octeontx2/otx2_cptpf_ucode.c | 2173 ++++++++++++++++++++
> .../crypto/marvell/octeontx2/otx2_cptpf_ucode.h | 180 ++
> drivers/crypto/marvell/octeontx2/otx2_cptvf.h | 29 +
> drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c | 1708 +++++++++++++++
> drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h | 172 ++
> drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c | 229 +++
> drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.c | 189 ++
> .../crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c | 543 +++++
> drivers/net/ethernet/marvell/octeontx2/af/Makefile | 2 +-
> drivers/net/ethernet/marvell/octeontx2/af/mbox.h | 85 +
> drivers/net/ethernet/marvell/octeontx2/af/rvu.c | 2 +-
> drivers/net/ethernet/marvell/octeontx2/af/rvu.h | 7 +
> .../net/ethernet/marvell/octeontx2/af/rvu_cpt.c | 343 +++
> .../ethernet/marvell/octeontx2/af/rvu_debugfs.c | 342 +++
> .../net/ethernet/marvell/octeontx2/af/rvu_nix.c | 76 +
> .../net/ethernet/marvell/octeontx2/af/rvu_reg.h | 65 +-
> 29 files changed, 10088 insertions(+), 8 deletions(-)
> create mode 100644 drivers/crypto/marvell/octeontx2/Makefile
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_common.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_hw_types.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_mbox_common.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cpt_reqmgr.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptlf_main.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_main.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_mbox.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptpf_ucode.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_algs.h
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_main.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_mbox.c
> create mode 100644 drivers/crypto/marvell/octeontx2/otx2_cptvf_reqmgr.c
> create mode 100644 drivers/net/ethernet/marvell/octeontx2/af/rvu_cpt.c
Please include everyone in
./scripts/get_maintainer.pl drivers/net/ethernet/marvell/octeontx2/
or atleast
./scripts/get_maintainer.pl drivers/net/ethernet/marvell/octeontx2/af/
Thanks,
Sundeep
>
> --
> 1.9.1
>