diff mbox series

[v2,4/4] Enable Driver compilation in crypto Kconfig and Makefile file

Message ID 20240412035342.1233930-5-pavitrakumarm@vayavyalabs.com (mailing list archive)
State Changes Requested
Delegated to: Herbert Xu
Headers show
Series Add spacc crypto driver support | expand

Commit Message

Pavitrakumar Managutte April 12, 2024, 3:53 a.m. UTC
Signed-off-by: Pavitrakumar M <pavitrakumarm@vayavyalabs.com>
Acked-by: Ruud Derwig <Ruud.Derwig@synopsys.com>
---
 drivers/crypto/Kconfig  | 1 +
 drivers/crypto/Makefile | 1 +
 2 files changed, 2 insertions(+)

Comments

kernel test robot April 12, 2024, 2:12 p.m. UTC | #1
Hi Pavitrakumar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 4ad27a8be9dbefd4820da0f60da879d512b2f659]

url:    https://github.com/intel-lab-lkp/linux/commits/Pavitrakumar-M/Add-SPAcc-driver-to-Linux-kernel/20240412-115552
base:   4ad27a8be9dbefd4820da0f60da879d512b2f659
patch link:    https://lore.kernel.org/r/20240412035342.1233930-5-pavitrakumarm%40vayavyalabs.com
patch subject: [PATCH v2 4/4] Enable Driver compilation in crypto Kconfig and Makefile file
config: i386-randconfig-061-20240412 (https://download.01.org/0day-ci/archive/20240412/202404122115.QyB2yx7M-lkp@intel.com/config)
compiler: gcc-13 (Ubuntu 13.2.0-4ubuntu3) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240412/202404122115.QyB2yx7M-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202404122115.QyB2yx7M-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/crypto/dwc-spacc/spacc_manager.c:663:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned int [usertype] *ciph_key @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_manager.c:663:31: sparse:     expected unsigned int [usertype] *ciph_key
   drivers/crypto/dwc-spacc/spacc_manager.c:663:31: sparse:     got void [noderef] __iomem *
>> drivers/crypto/dwc-spacc/spacc_manager.c:665:31: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected unsigned int [usertype] *hash_key @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_manager.c:665:31: sparse:     expected unsigned int [usertype] *hash_key
   drivers/crypto/dwc-spacc/spacc_manager.c:665:31: sparse:     got void [noderef] __iomem *
--
>> drivers/crypto/dwc-spacc/spacc_core.c:1384:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1384:59: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1384:59: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1388:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1388:59: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1388:59: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1393:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1393:59: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1393:59: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1397:59: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1397:59: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1397:59: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1405:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1405:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1405:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1409:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1409:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1409:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1412:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1412:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1412:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1416:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1416:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1416:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1420:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1420:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1420:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1424:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1424:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1424:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1427:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1427:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1427:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:1430:51: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:1430:51: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:1430:51: sparse:     got void [noderef] __iomem *
   drivers/crypto/dwc-spacc/spacc_core.c:2442:52: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void *addr @@     got void [noderef] __iomem * @@
   drivers/crypto/dwc-spacc/spacc_core.c:2442:52: sparse:     expected void *addr
   drivers/crypto/dwc-spacc/spacc_core.c:2442:52: sparse:     got void [noderef] __iomem *
>> drivers/crypto/dwc-spacc/spacc_core.c:2524:23: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected void [noderef] __iomem *regmap @@     got void *baseaddr @@
   drivers/crypto/dwc-spacc/spacc_core.c:2524:23: sparse:     expected void [noderef] __iomem *regmap
   drivers/crypto/dwc-spacc/spacc_core.c:2524:23: sparse:     got void *baseaddr
   drivers/crypto/dwc-spacc/spacc_core.c:2646:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void * @@
   drivers/crypto/dwc-spacc/spacc_core.c:2646:45: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/crypto/dwc-spacc/spacc_core.c:2646:45: sparse:     got void *
   drivers/crypto/dwc-spacc/spacc_core.c:2647:45: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *addr @@     got void * @@
   drivers/crypto/dwc-spacc/spacc_core.c:2647:45: sparse:     expected void volatile [noderef] __iomem *addr
   drivers/crypto/dwc-spacc/spacc_core.c:2647:45: sparse:     got void *
   drivers/crypto/dwc-spacc/spacc_core.c:2648:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void * @@
   drivers/crypto/dwc-spacc/spacc_core.c:2648:38: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/crypto/dwc-spacc/spacc_core.c:2648:38: sparse:     got void *
   drivers/crypto/dwc-spacc/spacc_core.c:2650:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@     expected void const volatile [noderef] __iomem *addr @@     got void * @@
   drivers/crypto/dwc-spacc/spacc_core.c:2650:38: sparse:     expected void const volatile [noderef] __iomem *addr
   drivers/crypto/dwc-spacc/spacc_core.c:2650:38: sparse:     got void *

vim +663 drivers/crypto/dwc-spacc/spacc_manager.c

ed973f332d62f8 Pavitrakumar M 2024-04-12  646  
ed973f332d62f8 Pavitrakumar M 2024-04-12  647  /* Context manager */
ed973f332d62f8 Pavitrakumar M 2024-04-12  648  /* This will reset all reference counts, pointers, etc */
ed973f332d62f8 Pavitrakumar M 2024-04-12  649  void spacc_ctx_init_all(struct spacc_device *spacc)
ed973f332d62f8 Pavitrakumar M 2024-04-12  650  {
ed973f332d62f8 Pavitrakumar M 2024-04-12  651  	int x;
ed973f332d62f8 Pavitrakumar M 2024-04-12  652  	struct spacc_ctx *ctx;
ed973f332d62f8 Pavitrakumar M 2024-04-12  653  	unsigned long lock_flag;
ed973f332d62f8 Pavitrakumar M 2024-04-12  654  
ed973f332d62f8 Pavitrakumar M 2024-04-12  655  	spin_lock_irqsave(&spacc->ctx_lock, lock_flag);
ed973f332d62f8 Pavitrakumar M 2024-04-12  656  	/* initialize contexts */
ed973f332d62f8 Pavitrakumar M 2024-04-12  657  	for (x = 0; x < spacc->config.num_ctx; x++) {
ed973f332d62f8 Pavitrakumar M 2024-04-12  658  		ctx = &spacc->ctx[x];
ed973f332d62f8 Pavitrakumar M 2024-04-12  659  
ed973f332d62f8 Pavitrakumar M 2024-04-12  660  		/* sets everything including ref_cnt and ncontig to 0 */
ed973f332d62f8 Pavitrakumar M 2024-04-12  661  		memset(ctx, 0, sizeof(*ctx));
ed973f332d62f8 Pavitrakumar M 2024-04-12  662  
ed973f332d62f8 Pavitrakumar M 2024-04-12 @663  		ctx->ciph_key = spacc->regmap + SPACC_CTX_CIPH_KEY + (x *
ed973f332d62f8 Pavitrakumar M 2024-04-12  664  				spacc->config.ciph_page_size);
ed973f332d62f8 Pavitrakumar M 2024-04-12 @665  		ctx->hash_key = spacc->regmap + SPACC_CTX_HASH_KEY + (x *
ed973f332d62f8 Pavitrakumar M 2024-04-12  666  				spacc->config.hash_page_size);
ed973f332d62f8 Pavitrakumar M 2024-04-12  667  	}
ed973f332d62f8 Pavitrakumar M 2024-04-12  668  	spin_unlock_irqrestore(&spacc->ctx_lock, lock_flag);
ed973f332d62f8 Pavitrakumar M 2024-04-12  669  }
ed973f332d62f8 Pavitrakumar M 2024-04-12  670
diff mbox series

Patch

diff --git a/drivers/crypto/Kconfig b/drivers/crypto/Kconfig
index 3d02702456a5..aa384d138ae1 100644
--- a/drivers/crypto/Kconfig
+++ b/drivers/crypto/Kconfig
@@ -704,6 +704,7 @@  config CRYPTO_DEV_BCM_SPU
 	  ahash, and aead algorithms with the kernel cryptographic API.
 
 source "drivers/crypto/stm32/Kconfig"
+source "drivers/crypto/dwc-spacc/Kconfig"
 
 config CRYPTO_DEV_SAFEXCEL
 	tristate "Inside Secure's SafeXcel cryptographic engine driver"
diff --git a/drivers/crypto/Makefile b/drivers/crypto/Makefile
index 95331bc6456b..4408927a5a0c 100644
--- a/drivers/crypto/Makefile
+++ b/drivers/crypto/Makefile
@@ -47,6 +47,7 @@  obj-$(CONFIG_CRYPTO_DEV_BCM_SPU) += bcm/
 obj-$(CONFIG_CRYPTO_DEV_SAFEXCEL) += inside-secure/
 obj-$(CONFIG_CRYPTO_DEV_ARTPEC6) += axis/
 obj-y += xilinx/
+obj-y += dwc-spacc/
 obj-y += hisilicon/
 obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
 obj-y += intel/