Skip to contentSkip to conversation

Add Support for Marvell OcteonTX Cryptographic

PATCH Superseded Srujana Challa 3 participants 12 messages Mar 4, 2020 – Mar 16, 2020

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Srujana Challa

author maintainer
#0 lore raw

cover Add Support for Marvell OcteonTX Cryptographic

The following series adds support for Marvell Cryptographic Accelerarion Unit (CPT) on OcteonTX CN83XX SoC.

Srujana Challa (4):
drivers: crypto: create common Kconfig and Makefile for Marvell
drivers: crypto: add support for OCTEON TX CPT engine
drivers: crypto: add the Virtual Function driver for CPT
crypto: marvell: enable OcteonTX cpt options for build

 MAINTAINERS                                        |    2 +
 drivers/crypto/Kconfig                             |   15 +-
 drivers/crypto/Makefile                            |    2 +-
 drivers/crypto/marvell/Kconfig                     |   37 +
 drivers/crypto/marvell/Makefile                    |    7 +-
 drivers/crypto/marvell/cesa.c                      |  615 -------
 drivers/crypto/marvell/cesa.h                      |  880 ----------
 drivers/crypto/marvell/cesa/Makefile               |    3 +
 drivers/crypto/marvell/cesa/cesa.c                 |  615 +++++++
 drivers/crypto/marvell/cesa/cesa.h                 |  881 ++++++++++
 drivers/crypto/marvell/cesa/cipher.c               |  801 +++++++++
 drivers/crypto/marvell/cesa/hash.c                 | 1448 ++++++++++++++++
 drivers/crypto/marvell/cesa/tdma.c                 |  352 ++++
 drivers/crypto/marvell/cipher.c                    |  798 ---------
 drivers/crypto/marvell/hash.c                      | 1442 ----------------
 drivers/crypto/marvell/octeontx/Makefile           |    6 +
 drivers/crypto/marvell/octeontx/otx_cpt_common.h   |   51 +
 drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h |  824 +++++++++
 drivers/crypto/marvell/octeontx/otx_cptpf.h        |   34 +
 drivers/crypto/marvell/octeontx/otx_cptpf_main.c   |  307 ++++
 drivers/crypto/marvell/octeontx/otx_cptpf_mbox.c   |  253 +++
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c  | 1686 +++++++++++++++++++
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.h  |  180 ++
 drivers/crypto/marvell/octeontx/otx_cptvf.h        |  104 ++
 drivers/crypto/marvell/octeontx/otx_cptvf_algs.c   | 1744 ++++++++++++++++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_algs.h   |  188 +++
 drivers/crypto/marvell/octeontx/otx_cptvf_main.c   |  985 +++++++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c   |  247 +++
 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c |  612 +++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h |  227 +++
 drivers/crypto/marvell/tdma.c                      |  350 ----
 31 files changed, 11593 insertions(+), 4103 deletions(-)
 create mode 100644 drivers/crypto/marvell/Kconfig
 delete mode 100644 drivers/crypto/marvell/cesa.c
 delete mode 100644 drivers/crypto/marvell/cesa.h
 create mode 100644 drivers/crypto/marvell/cesa/Makefile
 create mode 100644 drivers/crypto/marvell/cesa/cesa.c
 create mode 100644 drivers/crypto/marvell/cesa/cesa.h
 create mode 100644 drivers/crypto/marvell/cesa/cipher.c
 create mode 100644 drivers/crypto/marvell/cesa/hash.c
 create mode 100644 drivers/crypto/marvell/cesa/tdma.c
 delete mode 100644 drivers/crypto/marvell/cipher.c
 delete mode 100644 drivers/crypto/marvell/hash.c
 create mode 100644 drivers/crypto/marvell/octeontx/Makefile
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cpt_common.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_main.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_mbox.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_algs.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_main.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h
 delete mode 100644 drivers/crypto/marvell/tdma.c
Signature · 1 line
1.9.1
author maintainer
#1 lore raw

PATCH 1/4 drivers: crypto: create common Kconfig and Makefile for Marvell

From: SrujanaChalla <[email protected]>

Creats common Kconfig and Makefile for Marvell crypto drivers.

---
 drivers/crypto/Kconfig               |   15 +-
 drivers/crypto/Makefile              |    2 +-
 drivers/crypto/marvell/Kconfig       |   21 +
 drivers/crypto/marvell/Makefile      |    6 +-
 drivers/crypto/marvell/cesa.c        |  615 ---------------
 drivers/crypto/marvell/cesa.h        |  880 ---------------------
 drivers/crypto/marvell/cesa/Makefile |    3 +
 drivers/crypto/marvell/cesa/cesa.c   |  615 +++++++++++++++
 drivers/crypto/marvell/cesa/cesa.h   |  881 +++++++++++++++++++++
 drivers/crypto/marvell/cesa/cipher.c |  801 +++++++++++++++++++
 drivers/crypto/marvell/cesa/hash.c   | 1448 ++++++++++++++++++++++++++++++++++
 drivers/crypto/marvell/cesa/tdma.c   |  352 +++++++++
 drivers/crypto/marvell/cipher.c      |  798 -------------------
 drivers/crypto/marvell/hash.c        | 1442 ---------------------------------
 drivers/crypto/marvell/tdma.c        |  350 --------
 15 files changed, 4126 insertions(+), 4103 deletions(-)
 create mode 100644 drivers/crypto/marvell/Kconfig
 delete mode 100644 drivers/crypto/marvell/cesa.c
 delete mode 100644 drivers/crypto/marvell/cesa.h
 create mode 100644 drivers/crypto/marvell/cesa/Makefile
 create mode 100644 drivers/crypto/marvell/cesa/cesa.c
 create mode 100644 drivers/crypto/marvell/cesa/cesa.h
 create mode 100644 drivers/crypto/marvell/cesa/cipher.c
 create mode 100644 drivers/crypto/marvell/cesa/hash.c
 create mode 100644 drivers/crypto/marvell/cesa/tdma.c
 delete mode 100644 drivers/crypto/marvell/cipher.c
 delete mode 100644 drivers/crypto/marvell/hash.c
 delete mode 100644 drivers/crypto/marvell/tdma.c
drivers/crypto/Kconfig +1 -14
index c2767ed..a829f94 100644
@@ -233,20 +233,6 @@ config CRYPTO_CRC32_S390
 
 	  It is available with IBM z13 or later.
 
-config CRYPTO_DEV_MARVELL_CESA
-	tristate "Marvell's Cryptographic Engine driver"
-	depends on PLAT_ORION || ARCH_MVEBU
-	select CRYPTO_LIB_AES
-	select CRYPTO_LIB_DES
-	select CRYPTO_SKCIPHER
-	select CRYPTO_HASH
-	select SRAM
-	help
-	  This driver allows you to utilize the Cryptographic Engines and
-	  Security Accelerator (CESA) which can be found on MVEBU and ORION
-	  platforms.
-	  This driver supports CPU offload through DMA transfers.
-
 config CRYPTO_DEV_NIAGARA2
 	tristate "Niagara2 Stream Processing Unit driver"
 	select CRYPTO_LIB_DES
@@ -606,6 +592,7 @@ config CRYPTO_DEV_MXS_DCP
 source "drivers/crypto/qat/Kconfig"
 source "drivers/crypto/cavium/cpt/Kconfig"
 source "drivers/crypto/cavium/nitrox/Kconfig"
+source "drivers/crypto/marvell/Kconfig"
 
 config CRYPTO_DEV_CAVIUM_ZIP
 	tristate "Cavium ZIP driver"
drivers/crypto/Makefile +1 -1
index 40229d4..2306d41 100644
@@ -18,7 +18,7 @@ obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
 obj-$(CONFIG_CRYPTO_DEV_HIFN_795X) += hifn_795x.o
 obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o
 obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
-obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell/
+obj-$(CONFIG_CRYPTO_DEV_MARVELL) += marvell/
 obj-$(CONFIG_CRYPTO_DEV_MEDIATEK) += mediatek/
 obj-$(CONFIG_CRYPTO_DEV_MXS_DCP) += mxs-dcp.o
 obj-$(CONFIG_CRYPTO_DEV_NIAGARA2) += n2_crypto.o
drivers/crypto/marvell/Kconfig new file +21 -0
new file mode 100644
index 0000000..9f09845
@@ -0,0 +1,21 @@
+#
+# Marvell crypto drivers configuration
+#
+
+config CRYPTO_DEV_MARVELL
+	tristate
+
+config CRYPTO_DEV_MARVELL_CESA
+	tristate "Marvell's Cryptographic Engine driver"
+	depends on PLAT_ORION || ARCH_MVEBU
+	select CRYPTO_LIB_AES
+	select CRYPTO_LIB_DES
+	select CRYPTO_BLKCIPHER
+	select CRYPTO_HASH
+	select SRAM
+	select CRYPTO_DEV_MARVELL
+	help
+	  This driver allows you to utilize the Cryptographic Engines and
+	  Security Accelerator (CESA) which can be found on MVEBU and ORION
+	  platforms.
+	  This driver supports CPU offload through DMA transfers.
drivers/crypto/marvell/Makefile +3 -3
index b27cab6..2030b0b 100644
@@ -1,3 +1,3 @@
-# SPDX-License-Identifier: GPL-2.0-only
-obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell-cesa.o
-marvell-cesa-objs := cesa.o cipher.o hash.o tdma.o
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += cesa/
drivers/crypto/marvell/cesa.c deleted +0 -615

615 lines not on this page · raw message

drivers/crypto/marvell/cesa.h deleted +0 -880

880 lines not on this page · raw message

drivers/crypto/marvell/cesa/Makefile new file +3 -0
new file mode 100644
index 0000000..b27cab6
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell-cesa.o
+marvell-cesa-objs := cesa.o cipher.o hash.o tdma.o
drivers/crypto/marvell/cesa/cesa.c new file +615 -0

615 lines not on this page · raw message

drivers/crypto/marvell/cesa/cesa.h new file +881 -0

825 lines not on this page · raw message

drivers/crypto/marvell/cesa/cipher.c new file +801 -0

801 lines not on this page · raw message

drivers/crypto/marvell/cesa/hash.c new file +1448 -0

1,448 lines not on this page · raw message

drivers/crypto/marvell/cesa/tdma.c new file +352 -0

352 lines not on this page · raw message

drivers/crypto/marvell/cipher.c deleted +0 -798

798 lines not on this page · raw message

drivers/crypto/marvell/hash.c deleted +0 -1442

1,442 lines not on this page · raw message

drivers/crypto/marvell/tdma.c deleted +0 -350

350 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.9.1

Part of the diff is not shown here. View the raw message.

author maintainer
#2 lore raw

PATCH 2/4 drivers: crypto: add support for OCTEON TX CPT engine

In reply to Srujana Challa

From: SrujanaChalla <[email protected]>

Add support for the cryptographic acceleration unit (CPT) on OcteonTX CN83XX SoC.

---
 MAINTAINERS                                        |    2 +
 drivers/crypto/marvell/octeontx/Makefile           |    4 +
 drivers/crypto/marvell/octeontx/otx_cpt_common.h   |   51 +
 drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h |  249 +++
 drivers/crypto/marvell/octeontx/otx_cptpf.h        |   34 +
 drivers/crypto/marvell/octeontx/otx_cptpf_main.c   |  307 ++++
 drivers/crypto/marvell/octeontx/otx_cptpf_mbox.c   |  253 +++
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c  | 1686 ++++++++++++++++++++
 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.h  |  180 +++
 9 files changed, 2766 insertions(+)
 create mode 100644 drivers/crypto/marvell/octeontx/Makefile
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cpt_common.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_main.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_mbox.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.h
MAINTAINERS +2 -0
index a0c1618..1e32d3e 100644
@@ -9906,7 +9906,9 @@ F:	Documentation/devicetree/bindings/phy/phy-mvebu-utmi.txt
 MARVELL CRYPTO DRIVER
 M:	Boris Brezillon <[email protected]>
 M:	Arnaud Ebalard <[email protected]>
+M:	Srujana Challa <[email protected]>
 F:	drivers/crypto/marvell/
+F:	drivers/crypto/marvell/octeontx/
 S:	Maintained
 L:	[email protected]
 
drivers/crypto/marvell/octeontx/Makefile new file +4 -0
new file mode 100644
index 0000000..627d00e
@@ -0,0 +1,4 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx-cpt.o
+
+octeontx-cpt-objs := otx_cptpf_main.o otx_cptpf_mbox.o otx_cptpf_ucode.o
drivers/crypto/marvell/octeontx/otx_cpt_common.h new file +51 -0

51 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h new file +249 -0

249 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptpf.h new file +34 -0
new file mode 100644
index 0000000..73cd0a9
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0
+ * Marvell OcteonTX CPT driver
+ *
+ * Copyright (C) 2019 Marvell International Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef __OTX_CPTPF_H
+#define __OTX_CPTPF_H
+
+#include <linux/types.h>
+#include <linux/device.h>
+#include "otx_cptpf_ucode.h"
+
+/*
+ * OcteonTX CPT device structure
+ */
+struct otx_cpt_device {
+	void __iomem *reg_base; /* Register start address */
+	struct pci_dev *pdev;	/* Pci device handle */
+	struct otx_cpt_eng_grps eng_grps;/* Engine groups information */
+	struct list_head list;
+	u8 pf_type;	/* PF type SE or AE */
+	u8 max_vfs;	/* Maximum number of VFs supported by the CPT */
+	u8 vfs_enabled;	/* Number of enabled VFs */
+};
+
+void otx_cpt_mbox_intr_handler(struct otx_cpt_device *cpt, int mbx);
+void otx_cpt_disable_all_cores(struct otx_cpt_device *cpt);
+
+#endif /* __OTX_CPTPF_H */
drivers/crypto/marvell/octeontx/otx_cptpf_main.c new file +307 -0

307 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptpf_mbox.c new file +253 -0

253 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c new file +1686 -0

1,686 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptpf_ucode.h new file +180 -0

180 lines not on this page · raw message

Signature · 1 line
1.9.1
author maintainer
#3 lore raw

PATCH 3/4 drivers: crypto: add the Virtual Function driver for CPT

In reply to Srujana Challa

From: SrujanaChalla <[email protected]>

Add support for the cryptographic accelerator unit virtual functions on OcteonTX 83XX SoC.

---
 drivers/crypto/marvell/octeontx/Makefile           |    4 +-
 drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h |  577 ++++++-
 drivers/crypto/marvell/octeontx/otx_cptvf.h        |  104 ++
 drivers/crypto/marvell/octeontx/otx_cptvf_algs.c   | 1744 ++++++++++++++++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_algs.h   |  188 +++
 drivers/crypto/marvell/octeontx/otx_cptvf_main.c   |  985 +++++++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c   |  247 +++
 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c |  612 +++++++
 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h |  227 +++
 9 files changed, 4686 insertions(+), 2 deletions(-)
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_algs.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_algs.h
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_main.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c
 create mode 100644 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h
drivers/crypto/marvell/octeontx/Makefile +3 -1
index 627d00e..5e956fe 100644
@@ -1,4 +1,6 @@
 # SPDX-License-Identifier: GPL-2.0
-obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx-cpt.o
+obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx-cpt.o octeontx-cptvf.o
 
 octeontx-cpt-objs := otx_cptpf_main.o otx_cptpf_mbox.o otx_cptpf_ucode.o
+octeontx-cptvf-objs := otx_cptvf_main.o otx_cptvf_mbox.o otx_cptvf_reqmgr.o \
+		       otx_cptvf_algs.o
drivers/crypto/marvell/octeontx/otx_cpt_hw_types.h +576 -1

603 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf.h new file +104 -0

104 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_algs.c new file +1744 -0

1,744 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_algs.h new file +188 -0

188 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_main.c new file +985 -0

354 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_mbox.c new file +247 -0

247 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c new file +612 -0

612 lines not on this page · raw message

drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.h new file +227 -0

227 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
1.9.1

Part of the diff is not shown here. View the raw message.

author maintainer
#4 lore raw

PATCH 4/4 crypto: marvell: enable OcteonTX cpt options for build

In reply to Srujana Challa

From: SrujanaChalla <[email protected]>

Add the OcteonTX cpt options in crypto Kconfig and Makefile

---
 drivers/crypto/marvell/Kconfig  | 16 ++++++++++++++++
 drivers/crypto/marvell/Makefile |  1 +
 2 files changed, 17 insertions(+)
drivers/crypto/marvell/Kconfig +16 -0
index 9f09845..4930f1a 100644
@@ -19,3 +19,19 @@ config CRYPTO_DEV_MARVELL_CESA
 	  Security Accelerator (CESA) which can be found on MVEBU and ORION
 	  platforms.
 	  This driver supports CPU offload through DMA transfers.
+
+config CRYPTO_DEV_OCTEONTX_CPT
+	tristate "Support for Marvell OcteonTX CPT driver"
+	depends on ARCH_THUNDER || COMPILE_TEST
+	depends on PCI_MSI && 64BIT
+	depends on CRYPTO_LIB_AES
+	select CRYPTO_BLKCIPHER
+	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 OcteonTX series of processors.
+
+		To compile this driver as module, choose M here:
+		the modules will be called octeontx-cpt and octeontx-cptvf
drivers/crypto/marvell/Makefile +1 -0
index 2030b0b..6c6a151 100644
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0
 
 obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += cesa/
+obj-$(CONFIG_CRYPTO_DEV_OCTEONTX_CPT) += octeontx/
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build

Thank you for the patch! Perhaps something to improve:

Hi Srujana,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master linus/master v5.6-rc4 next-20200304] [cannot apply to sparc-next/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Srujana-Challa/Add-Support-for-Marvell-OcteonTX-Cryptographic/20200305-041058
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-174-g094d5a94-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse:    expected unsigned long long [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse:    expected unsigned short [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1465:75: sparse: sparse: Using plain integer as NULL pointer
--
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse:    expected unsigned short [assigned] [usertype] opcode
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse:    expected unsigned short [assigned] [usertype] param1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse:    expected unsigned short [assigned] [usertype] param2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse:    expected unsigned short [assigned] [usertype] dlen
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse:    expected unsigned long long [assigned] [usertype] u64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse:    expected unsigned long long [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse:    got restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    expected unsigned short [usertype] len3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse:    expected unsigned long long [usertype] ptr3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    expected unsigned short [usertype] len3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse:    expected unsigned long long [usertype] ptr3

drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: expected unsigned short [usertype] len2
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: expected unsigned long long [usertype] ptr2
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: expected unsigned short [usertype] len1
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: expected unsigned long long [usertype] ptr1
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: expected unsigned short [usertype] len0
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: expected unsigned long long [usertype] ptr0
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: got restricted __be64 [usertype]
--

>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:114:6: sparse: sparse: symbol 'otx_cpt_aead_callback' was not declared. Should it be static?
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:174:6: sparse: sparse: symbol 'otx_cpt_skcipher_callback' was not declared. Should it be static?
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1405:17: sparse: sparse: symbol 'otx_cpt_aeads' was not declared. Should it be static?
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    expected unsigned long long [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    expected unsigned long long [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    expected unsigned int [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    got restricted __be32 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    expected unsigned int [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    got restricted __be32 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse: sparse: incorrect type in assignment (different base types)
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: sparse: incorrect type in assignment (different base types)
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse:    expected unsigned long long [usertype] flags

drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: sparse: incorrect type in assignment (different base types)
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: expected unsigned long long [usertype] flags
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: got restricted __be64 [usertype]

Please review and possibly fold the followup patch.

vim +306 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c

614cde32c669af SrujanaChalla 2020-03-04  281  
614cde32c669af SrujanaChalla 2020-03-04  282  static int process_tar_file(struct device *dev,
614cde32c669af SrujanaChalla 2020-03-04  283  			    struct tar_arch_info_t *tar_arch, char *filename,
614cde32c669af SrujanaChalla 2020-03-04  284  			    const u8 *data, u32 size)
614cde32c669af SrujanaChalla 2020-03-04  285  {
614cde32c669af SrujanaChalla 2020-03-04  286  	struct tar_ucode_info_t *tar_info;
614cde32c669af SrujanaChalla 2020-03-04  287  	struct otx_cpt_ucode_hdr *ucode_hdr;
614cde32c669af SrujanaChalla 2020-03-04  288  	int ucode_type, ucode_size;
614cde32c669af SrujanaChalla 2020-03-04  289  
614cde32c669af SrujanaChalla 2020-03-04  290  	/*
614cde32c669af SrujanaChalla 2020-03-04  291  	 * If size is less than microcode header size then don't report
614cde32c669af SrujanaChalla 2020-03-04  292  	 * an error because it might not be microcode file, just process
614cde32c669af SrujanaChalla 2020-03-04  293  	 * next file from archive
614cde32c669af SrujanaChalla 2020-03-04  294  	 */
614cde32c669af SrujanaChalla 2020-03-04  295  	if (size < sizeof(struct otx_cpt_ucode_hdr))
614cde32c669af SrujanaChalla 2020-03-04  296  		return 0;
614cde32c669af SrujanaChalla 2020-03-04  297  
614cde32c669af SrujanaChalla 2020-03-04  298  	ucode_hdr = (struct otx_cpt_ucode_hdr *) data;
614cde32c669af SrujanaChalla 2020-03-04  299  	/*
614cde32c669af SrujanaChalla 2020-03-04  300  	 * If microcode version can't be found don't report an error
614cde32c669af SrujanaChalla 2020-03-04  301  	 * because it might not be microcode file, just process next file
614cde32c669af SrujanaChalla 2020-03-04  302  	 */
614cde32c669af SrujanaChalla 2020-03-04  303  	if (get_ucode_type(ucode_hdr, &ucode_type))
614cde32c669af SrujanaChalla 2020-03-04  304  		return 0;
614cde32c669af SrujanaChalla 2020-03-04  305  
614cde32c669af SrujanaChalla 2020-03-04 @306  	ucode_size = ntohl(ucode_hdr->code_length) * 2;
614cde32c669af SrujanaChalla 2020-03-04  307  	if (!ucode_size || (size < round_up(ucode_size, 16) +
614cde32c669af SrujanaChalla 2020-03-04  308  	    sizeof(struct otx_cpt_ucode_hdr) + OTX_CPT_UCODE_SIGN_LEN)) {
614cde32c669af SrujanaChalla 2020-03-04  309  		dev_err(dev, "Ucode %s invalid size", filename);
614cde32c669af SrujanaChalla 2020-03-04  310  		return -EINVAL;
614cde32c669af SrujanaChalla 2020-03-04  311  	}
614cde32c669af SrujanaChalla 2020-03-04  312  
614cde32c669af SrujanaChalla 2020-03-04  313  	tar_info = kzalloc(sizeof(struct tar_ucode_info_t), GFP_KERNEL);
614cde32c669af SrujanaChalla 2020-03-04  314  	if (!tar_info)
614cde32c669af SrujanaChalla 2020-03-04  315  		return -ENOMEM;
614cde32c669af SrujanaChalla 2020-03-04  316  
614cde32c669af SrujanaChalla 2020-03-04  317  	tar_info->ucode_ptr = data;
614cde32c669af SrujanaChalla 2020-03-04  318  	set_ucode_filename(&tar_info->ucode, filename);
614cde32c669af SrujanaChalla 2020-03-04  319  	memcpy(tar_info->ucode.ver_str, ucode_hdr->ver_str,
614cde32c669af SrujanaChalla 2020-03-04  320  	       OTX_CPT_UCODE_VER_STR_SZ);
614cde32c669af SrujanaChalla 2020-03-04  321  	tar_info->ucode.ver_num = ucode_hdr->ver_num;
614cde32c669af SrujanaChalla 2020-03-04  322  	tar_info->ucode.type = ucode_type;
614cde32c669af SrujanaChalla 2020-03-04  323  	tar_info->ucode.size = ucode_size;
614cde32c669af SrujanaChalla 2020-03-04  324  	list_add_tail(&tar_info->list, &tar_arch->ucodes);
614cde32c669af SrujanaChalla 2020-03-04  325  
614cde32c669af SrujanaChalla 2020-03-04  326  	return 0;
614cde32c669af SrujanaChalla 2020-03-04  327  }
614cde32c669af SrujanaChalla 2020-03-04  328  

:::::: The code at line 306 was first introduced by commit
:::::: 614cde32c669aff28aefeef2e1f7a982d4e640bc drivers: crypto: add support for OCTEON TX CPT engine

:::::: TO: SrujanaChalla <[email protected]>
:::::: CC: 0day robot <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

#6 lore raw

[RFC PATCH] crypto: marvell: otx_cpt_aead_callback() can be static

In reply to Srujana Challa
Fixes: 094d0b677a16 ("crypto: marvell: enable OcteonTX cpt options for build")
Fixes 094d0b677a16 ("crypto: marvell: enable OcteonTX cpt options for build")
---
 otx_cptvf_algs.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c +3 -3
index 8f73e1fcf5449..946fb62949b29 100644
@@ -111,7 +111,7 @@ static inline int validate_hmac_cipher_null(struct otx_cpt_req_info *cpt_req)
 	return 0;
 }
 
-void otx_cpt_aead_callback(int status, void *arg1, void *arg2)
+static void otx_cpt_aead_callback(int status, void *arg1, void *arg2)
 {
 	struct otx_cpt_info_buffer *cpt_info = arg2;
 	struct crypto_async_request *areq = arg1;
@@ -171,7 +171,7 @@ static void output_iv_copyback(struct crypto_async_request *areq)
 	}
 }
 
-void otx_cpt_skcipher_callback(int status, void *arg1, void *arg2)
+static void otx_cpt_skcipher_callback(int status, void *arg1, void *arg2)
 {
 	struct otx_cpt_info_buffer *cpt_info = arg2;
 	struct crypto_async_request *areq = arg1;
@@ -1402,7 +1402,7 @@ static struct skcipher_alg otx_cpt_skciphers[] = { {
 	.decrypt = otx_cpt_skcipher_decrypt,
 } };
 
-struct aead_alg otx_cpt_aeads[] = { {
+static struct aead_alg otx_cpt_aeads[] = { {
 	.base = {
 		.cra_name = "authenc(hmac(sha1),cbc(aes))",
 		.cra_driver_name = "cpt_hmac_sha1_cbc_aes",
#7 lore raw

Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build

In reply to Srujana Challa
Thank you for the patch! Perhaps something to improve:

Hi Srujana,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master linus/master v5.6-rc5 next-20200310] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982]

url:    https://github.com/0day-ci/linux/commits/Srujana-Challa/Add-Support-for-Marvell-OcteonTX-Cryptographic/20200305-041058
base:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.1-174-g094d5a94-dirty
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:306:22: sparse: sparse: cast to restricted __be32

>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] @@    got nsigned long long [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:881:45: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] @@    got resunsigned short [usertype] @@

drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: expected unsigned short [usertype]
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:885:45: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:905:23: sparse: sparse: cast to restricted __be32 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c:1465:75: sparse: sparse: Using plain integer as NULL pointer
--

>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [assigned] [usertype] opcode @@    got  short [assigned] [usertype] opcode @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse:    expected unsigned short [assigned] [usertype] opcode
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:365:29: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [assigned] [usertype] param1 @@    got  short [assigned] [usertype] param1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse:    expected unsigned short [assigned] [usertype] param1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:366:29: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [assigned] [usertype] param2 @@    got  short [assigned] [usertype] param2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse:    expected unsigned short [assigned] [usertype] param2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:367:29: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [assigned] [usertype] dlen @@    got  short [assigned] [usertype] dlen @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse:    expected unsigned short [assigned] [usertype] dlen
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:368:29: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [assigned] [usertype] u64 @@    got g long [assigned] [usertype] u64 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse:    expected unsigned long long [assigned] [usertype] u64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:371:24: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:439:19: sparse: sparse: cast to restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] @@    got  long [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:209:33: sparse:    got restricted __be64
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len0 @@    got resunsigned short [usertype] len0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len1 @@    got resunsigned short [usertype] len1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len2 @@    got resunsigned short [usertype] len2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len3 @@    got resunsigned short [usertype] len3 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    expected unsigned short [usertype] len3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr0 @@    got nsigned long long [usertype] ptr0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr1 @@    got nsigned long long [usertype] ptr1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr2 @@    got nsigned long long [usertype] ptr2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr3 @@    got nsigned long long [usertype] ptr3 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse:    expected unsigned long long [usertype] ptr3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len2 @@    got resunsigned short [usertype] len2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr2 @@    got nsigned long long [usertype] ptr2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len1 @@    got resunsigned short [usertype] len1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr1 @@    got nsigned long long [usertype] ptr1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse:    got restricted __be64 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len0 @@    got resunsigned short [usertype] len0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse:    got restricted __be16 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr0 @@    got nsigned long long [usertype] ptr0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len0 @@    got resunsigned short [usertype] len0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    expected unsigned short [usertype] len0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:127:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len1 @@    got resunsigned short [usertype] len1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    expected unsigned short [usertype] len1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:128:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len2 @@    got resunsigned short [usertype] len2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    expected unsigned short [usertype] len2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:129:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned short [usertype] len3 @@    got resunsigned short [usertype] len3 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    expected unsigned short [usertype] len3
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:130:34: sparse:    got restricted __be16 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr0 @@    got nsigned long long [usertype] ptr0 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    expected unsigned long long [usertype] ptr0
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:131:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr1 @@    got nsigned long long [usertype] ptr1 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    expected unsigned long long [usertype] ptr1
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:132:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr2 @@    got nsigned long long [usertype] ptr2 @@
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    expected unsigned long long [usertype] ptr2
   drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:133:30: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] ptr3 @@    got nsigned long long [usertype] ptr3 @@

drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: expected unsigned long long [usertype] ptr3
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:134:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] len2 @@ got resunsigned short [usertype] len2 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: expected unsigned short [usertype] len2
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:141:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] ptr2 @@ got nsigned long long [usertype] ptr2 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: expected unsigned long long [usertype] ptr2
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:142:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] len1 @@ got resunsigned short [usertype] len1 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: expected unsigned short [usertype] len1
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:145:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] ptr1 @@ got nsigned long long [usertype] ptr1 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: expected unsigned long long [usertype] ptr1
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:146:30: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned short [usertype] len0 @@ got resunsigned short [usertype] len0 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: expected unsigned short [usertype] len0
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:149:34: sparse: got restricted __be16 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] ptr0 @@ got nsigned long long [usertype] ptr0 @@
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: expected unsigned long long [usertype] ptr0
drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c:150:30: sparse: got restricted __be64 [usertype]
--
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:114:6: sparse: sparse: symbol 'otx_cpt_aead_callback' was not declared. Should it be static? drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:174:6: sparse: sparse: symbol 'otx_cpt_skcipher_callback' was not declared. Should it be static? drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1405:17: sparse: sparse: symbol 'otx_cpt_aeads' was not declared. Should it be static?

>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] @@    got nsigned long long [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] @@    got nsigned long long [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:281:21: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] @@    got restrunsigned int [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    expected unsigned int [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    got restricted __be32 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned int [usertype] @@    got restrunsigned int [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    expected unsigned int [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:696:24: sparse:    got restricted __be32 [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] @@    got nsigned long long [usertype] @@
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse:    expected unsigned long long [usertype]
   drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:705:24: sparse:    got restricted __be64 [usertype]
>> drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: sparse: incorrect type in assignment (different base types) @@    expected unsigned long long [usertype] flags @@    got nsigned long long [usertype] flags @@

drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: expected unsigned long long [usertype] flags
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1012:31: sparse: got restricted __be64 [usertype]
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: sparse: incorrect type in assignment (different base types) @@ expected unsigned long long [usertype] flags @@ got nsigned long long [usertype] flags @@
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: expected unsigned long long [usertype] flags
drivers/crypto/marvell/octeontx/otx_cptvf_algs.c:1032:34: sparse: got restricted __be64 [usertype]

vim +881 drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c

614cde32c669af SrujanaChalla 2020-03-04  858  
614cde32c669af SrujanaChalla 2020-03-04  859  static int copy_ucode_to_dma_mem(struct device *dev,
614cde32c669af SrujanaChalla 2020-03-04  860  				 struct otx_cpt_ucode *ucode,
614cde32c669af SrujanaChalla 2020-03-04  861  				 const u8 *ucode_data)
614cde32c669af SrujanaChalla 2020-03-04  862  {
614cde32c669af SrujanaChalla 2020-03-04  863  	u32 i;
614cde32c669af SrujanaChalla 2020-03-04  864  
614cde32c669af SrujanaChalla 2020-03-04  865  	/*  Allocate DMAable space */
614cde32c669af SrujanaChalla 2020-03-04  866  	ucode->va = dma_alloc_coherent(dev, ucode->size +
614cde32c669af SrujanaChalla 2020-03-04  867  				       OTX_CPT_UCODE_ALIGNMENT,
614cde32c669af SrujanaChalla 2020-03-04  868  				       &ucode->dma, GFP_KERNEL);
614cde32c669af SrujanaChalla 2020-03-04  869  	if (!ucode->va) {
614cde32c669af SrujanaChalla 2020-03-04  870  		dev_err(dev, "Unable to allocate space for microcode");
614cde32c669af SrujanaChalla 2020-03-04  871  		return -ENOMEM;
614cde32c669af SrujanaChalla 2020-03-04  872  	}
614cde32c669af SrujanaChalla 2020-03-04  873  	ucode->align_va = PTR_ALIGN(ucode->va, OTX_CPT_UCODE_ALIGNMENT);
614cde32c669af SrujanaChalla 2020-03-04  874  	ucode->align_dma = PTR_ALIGN(ucode->dma, OTX_CPT_UCODE_ALIGNMENT);
614cde32c669af SrujanaChalla 2020-03-04  875  
614cde32c669af SrujanaChalla 2020-03-04  876  	memcpy((void *) ucode->align_va, (void *) ucode_data +
614cde32c669af SrujanaChalla 2020-03-04  877  	       sizeof(struct otx_cpt_ucode_hdr), ucode->size);
614cde32c669af SrujanaChalla 2020-03-04  878  
614cde32c669af SrujanaChalla 2020-03-04  879  	/* Byte swap 64-bit */
614cde32c669af SrujanaChalla 2020-03-04  880  	for (i = 0; i < (ucode->size / 8); i++)
614cde32c669af SrujanaChalla 2020-03-04 @881  		((u64 *)ucode->align_va)[i] =
614cde32c669af SrujanaChalla 2020-03-04  882  				cpu_to_be64(((u64 *)ucode->align_va)[i]);
614cde32c669af SrujanaChalla 2020-03-04  883  	/*  Ucode needs 16-bit swap */
614cde32c669af SrujanaChalla 2020-03-04  884  	for (i = 0; i < (ucode->size / 2); i++)
614cde32c669af SrujanaChalla 2020-03-04 @885  		((u16 *)ucode->align_va)[i] =
614cde32c669af SrujanaChalla 2020-03-04  886  				cpu_to_be16(((u16 *)ucode->align_va)[i]);
614cde32c669af SrujanaChalla 2020-03-04  887  	return 0;
614cde32c669af SrujanaChalla 2020-03-04  888  }

614cde32c669af SrujanaChalla 2020-03-04 889

:::::: The code at line 881 was first introduced by commit
:::::: 614cde32c669aff28aefeef2e1f7a982d4e640bc drivers: crypto: add support for OCTEON TX CPT engine

:::::: TO: SrujanaChalla <[email protected]>
:::::: CC: 0day robot <[email protected]>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

maintainer
#8 lore raw

Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build

In reply to Srujana Challa

drivers/crypto/marvell/Kconfig config CRYPTO_DEV_MARVELL_CESA · line 28

Quoted 7 lines · Srujana Challa
drivers/crypto/marvell/Kconfig +6 -0
+config CRYPTO_DEV_OCTEONTX_CPT
+	tristate "Support for Marvell OcteonTX CPT driver"
+	depends on ARCH_THUNDER || COMPILE_TEST
+	depends on PCI_MSI && 64BIT
+	depends on CRYPTO_LIB_AES
+	select CRYPTO_BLKCIPHER

The BLKCIPHER option has been replaced by SKCIPHER.

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#9 lore raw

RE: [EXT] Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build

-----Original Message-----
From: Herbert Xu <[email protected]>
Sent: Thursday, March 12, 2020 5:14 PM
To: Srujana Challa <[email protected]>
Cc: [email protected]; [email protected]; Narayana Prasad Raju Athreya <[email protected]>
Subject: [EXT] Re: [PATCH 4/4] crypto: marvell: enable OcteonTX cpt options for build

External Email

----------------------------------------------------------------------

drivers/crypto/marvell/Kconfig config CRYPTO_DEV_MARVELL_CESA · line 28

Quoted 7 lines · Srujana Challa
drivers/crypto/marvell/Kconfig +6 -0
+config CRYPTO_DEV_OCTEONTX_CPT
+	tristate "Support for Marvell OcteonTX CPT driver"
+	depends on ARCH_THUNDER || COMPILE_TEST
+	depends on PCI_MSI && 64BIT
+	depends on CRYPTO_LIB_AES
+	select CRYPTO_BLKCIPHER

The BLKCIPHER option has been replaced by SKCIPHER.

Will replace in next version of patches.

Thanks,
--
Email: Herbert Xu <[email protected]> Home Page: https://urldefense.proofpoint.com/v2/url?u=http-3A__gondor.apana.org.au_-7Eherbert_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=RtwtmKs1DMDh4ZHin6Hn9yZqcEAt5Pk8oJbz2CBzpPc&s=kUGS5TylH_VUzkI5PVgrtBKW7hclNNpEWzpTsRfvAuk&e=
PGP Key: https://urldefense.proofpoint.com/v2/url?u=http-3A__gondor.apana.org.au_-7Eherbert_pubkey.txt&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=RtwtmKs1DMDh4ZHin6Hn9yZqcEAt5Pk8oJbz2CBzpPc&s=eCzo1M4w_9vJKDxgDzV6po1WXmJKbkJg_yeUiiEl6sc&e=

maintainer
#10 lore raw
In reply to Srujana Challa
Quoted 2 lines · Srujana Challa

The following series adds support for Marvell Cryptographic Accelerarion Unit (CPT) on OcteonTX CN83XX SoC.

Does this driver pass all the crypto self-tests, including the fuzz tests?

Thanks,

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
author maintainer
#11 lore raw
Quoted 7 lines · Srujana Challa
Quoted 2 lines

The following series adds support for Marvell Cryptographic Accelerarion Unit (CPT) on OcteonTX CN83XX SoC.

Does this driver pass all the crypto self-tests, including the fuzz tests?

Yes, the crypto self-tests are passed and the patch series was tested with kernel-ipsec.

Quoted 14 lines

Thanks,
--
Email: Herbert Xu <[email protected]>
Home Page: https://urldefense.proofpoint.com/v2/url?u=http-
3A__gondor.apana.org.au_- 7Eherbert_&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcKFpANhTW dwQzjT1Jpf7veC5263T47JVpnc&m=9_yjiltEDSyBDoQbemHg3p7n3NVeM8e7tzRh m0eO6F8&s=WfuMj4mtbzrUE1baI5puOt3hLjWNelbO5UjMeAoSWJ8&e= PGP Key: https://urldefense.proofpoint.com/v2/url?u=http-
3A__gondor.apana.org.au_- 7Eherbert_pubkey.txt&d=DwIBAg&c=nKjWec2b6R0mOyPaz7xtfQ&r=Fj4OoD5hcK FpANhTWdwQzjT1Jpf7veC5263T47JVpnc&m=9_yjiltEDSyBDoQbemHg3p7n3NVe M8e7tzRhm0eO6F8&s=5ONhtHM3k3- EGaVEi7lNjyYHY7xDWJXCW9uwJ0mpWqU&e=