Re: [PATCH v1 1/3] crypto: cavium - Add support for CNN55XX adapters.

2017-05-10 Thread kbuild test robot
Hi Srikanth,

[auto build test ERROR on cryptodev/master]
[also build test ERROR on next-20170510]
[cannot apply to v4.11]
[if your patch is applied to the wrong git tree, please drop us a note to help 
improve the system]

url:
https://github.com/0day-ci/linux/commits/Srikanth-Jampala/crypto-cavium-Add-support-for-CNN55XX-adapters/20170510-211638
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
config: i386-defconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386 

All errors (new ones prefixed by >>):

   In file included from drivers/crypto/cavium/nitrox/nitrox_main.c:10:0:
   drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_read_csr':
>> drivers/crypto/cavium/nitrox/nitrox_dev.h:156:9: error: implicit declaration 
>> of function 'readq' [-Werror=implicit-function-declaration]
 return readq(ndev->bar_addr + offset);
^
   drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_write_csr':
>> drivers/crypto/cavium/nitrox/nitrox_dev.h:168:2: error: implicit declaration 
>> of function 'writeq' [-Werror=implicit-function-declaration]
 writeq(value, (ndev->bar_addr + offset));
 ^~
   cc1: some warnings being treated as errors
--
   In file included from drivers/crypto/cavium/nitrox/nitrox_hal.c:3:0:
   drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_read_csr':
>> drivers/crypto/cavium/nitrox/nitrox_dev.h:156:9: error: implicit declaration 
>> of function 'readq' [-Werror=implicit-function-declaration]
 return readq(ndev->bar_addr + offset);
^
   drivers/crypto/cavium/nitrox/nitrox_dev.h: In function 'nitrox_write_csr':
>> drivers/crypto/cavium/nitrox/nitrox_dev.h:168:2: error: implicit declaration 
>> of function 'writeq' [-Werror=implicit-function-declaration]
 writeq(value, (ndev->bar_addr + offset));
 ^~
   drivers/crypto/cavium/nitrox/nitrox_hal.c: In function 
'nitrox_config_pkt_input_rings':
   drivers/crypto/cavium/nitrox/nitrox_hal.c:120:23: warning: unused variable 
'cmdq' [-Wunused-variable]
  struct nitrox_cmdq *cmdq = >pkt_cmdqs[i];
  ^~~~
   cc1: some warnings being treated as errors

vim +/readq +156 drivers/crypto/cavium/nitrox/nitrox_dev.h

   150   * @offset: offset of the register to read
   151   *
   152   * Returns: value read
   153   */
   154  static inline u64 nitrox_read_csr(struct nitrox_device *ndev, u64 
offset)
   155  {
 > 156  return readq(ndev->bar_addr + offset);
   157  }
   158  
   159  /**
   160   * nitrox_write_csr - Write to device register
   161   * @ndev: NITROX device
   162   * @offset: offset of the register to write
   163   * @value: value to write
   164   */
   165  static inline void nitrox_write_csr(struct nitrox_device *ndev, u64 
offset,
   166  u64 value)
   167  {
 > 168  writeq(value, (ndev->bar_addr + offset));
   169  }
   170  
   171  static inline int nitrox_in_use(struct nitrox_device *ndev)

---
0-DAY kernel test infrastructureOpen Source Technology Center
https://lists.01.org/pipermail/kbuild-all   Intel Corporation


.config.gz
Description: application/gzip


[PATCH v1 1/3] crypto: cavium - Add support for CNN55XX adapters.

2017-05-10 Thread Srikanth Jampala
Add Physical Function driver support for CNN55XX crypto adapters.
CNN55XX adapters belongs to Cavium NITROX family series,
which accelerate both Symmetric and Asymmetric crypto workloads.

These adapters have crypto engines that need firmware
to become operational.

Signed-off-by: Srikanth Jampala 
---
 drivers/crypto/Kconfig   |1 +
 drivers/crypto/Makefile  |1 +
 drivers/crypto/cavium/nitrox/Kconfig |   21 +
 drivers/crypto/cavium/nitrox/Makefile|7 +
 drivers/crypto/cavium/nitrox/nitrox_common.h |   29 +
 drivers/crypto/cavium/nitrox/nitrox_csr.h| 1080 ++
 drivers/crypto/cavium/nitrox/nitrox_dev.h|  181 +
 drivers/crypto/cavium/nitrox/nitrox_hal.c|  404 ++
 drivers/crypto/cavium/nitrox/nitrox_isr.c|  449 +++
 drivers/crypto/cavium/nitrox/nitrox_lib.c|  170 
 drivers/crypto/cavium/nitrox/nitrox_main.c   |  460 +++
 drivers/crypto/cavium/nitrox/nitrox_req.h|  438 +++
 drivers/crypto/cavium/nitrox/nitrox_reqmgr.c |  572 ++
 13 files changed, 3813 insertions(+)
 create mode 100644 drivers/crypto/cavium/nitrox/Kconfig
 create mode 100644 drivers/crypto/cavium/nitrox/Makefile
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_common.h
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_csr.h
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_dev.h
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_hal.c
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_isr.c
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_lib.c
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_main.c
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_req.h
 create mode 100644 drivers/crypto/cavium/nitrox/nitrox_reqmgr.c

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index fb1e60f..235554e 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -529,6 +529,7 @@ config CRYPTO_DEV_MXS_DCP
 
 source "drivers/crypto/qat/Kconfig"
 source "drivers/crypto/cavium/cpt/Kconfig"
+source "drivers/crypto/cavium/nitrox/Kconfig"
 
 config CRYPTO_DEV_CAVIUM_ZIP
tristate "Cavium ZIP driver"
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 463f335..14209b9 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_CRYPTO_DEV_CAVIUM_ZIP) += cavium/
 obj-$(CONFIG_CRYPTO_DEV_CCP) += ccp/
 obj-$(CONFIG_CRYPTO_DEV_CHELSIO) += chelsio/
 obj-$(CONFIG_CRYPTO_DEV_CPT) += cavium/cpt/
+obj-$(CONFIG_CRYPTO_DEV_NITROX) += cavium/nitrox/
 obj-$(CONFIG_CRYPTO_DEV_EXYNOS_RNG) += exynos-rng.o
 obj-$(CONFIG_CRYPTO_DEV_FSL_CAAM) += caam/
 obj-$(CONFIG_CRYPTO_DEV_GEODE) += geode-aes.o
diff --git a/drivers/crypto/cavium/nitrox/Kconfig 
b/drivers/crypto/cavium/nitrox/Kconfig
new file mode 100644
index 000..d8b979f
--- /dev/null
+++ b/drivers/crypto/cavium/nitrox/Kconfig
@@ -0,0 +1,21 @@
+#
+# Cavium NITROX Crypto Device configuration
+#
+config CRYPTO_DEV_NITROX
+   tristate
+   select CRYPTO_BLKCIPHER
+   select CRYPTO_AES
+   select CRYPTO_DES
+   select FW_LOADER
+
+config CRYPTO_DEV_NITROX_CNN55XX
+   tristate "Support for Cavium CNN55XX driver"
+   depends on PCI_MSI
+   select CRYPTO_DEV_NITROX
+   default m
+   help
+ Support for Cavium NITROX family CNN55XX driver
+ for accelerating crypto workloads.
+
+ To compile this as a module, choose M here: the module
+ will be called n5pf.
diff --git a/drivers/crypto/cavium/nitrox/Makefile 
b/drivers/crypto/cavium/nitrox/Makefile
new file mode 100644
index 000..ef457f6
--- /dev/null
+++ b/drivers/crypto/cavium/nitrox/Makefile
@@ -0,0 +1,7 @@
+obj-$(CONFIG_CRYPTO_DEV_NITROX_CNN55XX) += n5pf.o
+
+n5pf-objs := nitrox_main.o \
+   nitrox_isr.o \
+   nitrox_lib.o \
+   nitrox_hal.o \
+   nitrox_reqmgr.o
diff --git a/drivers/crypto/cavium/nitrox/nitrox_common.h 
b/drivers/crypto/cavium/nitrox/nitrox_common.h
new file mode 100644
index 000..f79be7d
--- /dev/null
+++ b/drivers/crypto/cavium/nitrox/nitrox_common.h
@@ -0,0 +1,29 @@
+#ifndef __NITROX_COMMON_H
+#define __NITROX_COMMON_H
+
+#include "nitrox_dev.h"
+#include "nitrox_req.h"
+
+void nitrox_pf_cleanup_isr(struct nitrox_device *ndev);
+int nitrox_pf_init_isr(struct nitrox_device *ndev);
+
+int nitrox_common_sw_init(struct nitrox_device *ndev);
+void nitrox_common_sw_cleanup(struct nitrox_device *ndev);
+
+void pkt_slc_resp_handler(unsigned long data);
+int nitrox_se_request(struct nitrox_device *ndev, struct crypto_request *req);
+
+void nitrox_config_emu_unit(struct nitrox_device *ndev);
+void nitrox_config_pkt_input_rings(struct nitrox_device *ndev);
+void nitrox_config_pkt_solicit_ports(struct nitrox_device *ndev);
+void nitrox_config_vfmode(struct nitrox_device *ndev, int mode);
+void nitrox_config_nps_unit(struct nitrox_device *ndev);
+void