Re: [PATCH v1 4/4] Enable Driver compilation in crypto Kconfig and Makefile file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Pavitrakumar,

kernel test robot noticed the following build warnings:

[auto build test WARNING on 6a8dbd71a70620c42d4fa82509204ba18231f28d]

url:    https://github.com/intel-lab-lkp/linux/commits/Pavitrakumar-M/Add-SPAcc-driver-to-Linux-kernel/20240329-023010
base:   6a8dbd71a70620c42d4fa82509204ba18231f28d
patch link:    https://lore.kernel.org/r/20240328182652.3587727-5-pavitrakumarm%40vayavyalabs.com
patch subject: [PATCH v1 4/4] Enable Driver compilation in crypto Kconfig and Makefile file
config: mips-randconfig-r122-20240330 (https://download.01.org/0day-ci/archive/20240330/202403300840.vE1pjy9E-lkp@xxxxxxxxx/config)
compiler: clang version 19.0.0git (https://github.com/llvm/llvm-project 79ba323bdd0843275019e16b6e9b35133677c514)
reproduce: (https://download.01.org/0day-ci/archive/20240330/202403300840.vE1pjy9E-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403300840.vE1pjy9E-lkp@xxxxxxxxx/

sparse warnings: (new ones prefixed by >>)
>> drivers/crypto/dwc-spacc/spacc_manager.c:135:46: sparse: sparse: incorrect type in argument 2 (different address spaces) @@     expected void volatile [noderef] __iomem *mem @@     got void * @@
   drivers/crypto/dwc-spacc/spacc_manager.c:135:46: sparse:     expected void volatile [noderef] __iomem *mem
   drivers/crypto/dwc-spacc/spacc_manager.c:135:46: sparse:     got void *

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

b37587c90bca57 Pavitrakumar M 2024-03-28  107  
b37587c90bca57 Pavitrakumar M 2024-03-28  108  static int spacc_ctx_release(struct spacc_device *spacc, int ctx_id)
b37587c90bca57 Pavitrakumar M 2024-03-28  109  {
b37587c90bca57 Pavitrakumar M 2024-03-28  110  	unsigned long lock_flag;
b37587c90bca57 Pavitrakumar M 2024-03-28  111  	int ncontig;
b37587c90bca57 Pavitrakumar M 2024-03-28  112  	int y;
b37587c90bca57 Pavitrakumar M 2024-03-28  113  
b37587c90bca57 Pavitrakumar M 2024-03-28  114  
b37587c90bca57 Pavitrakumar M 2024-03-28  115  	if (ctx_id < 0 || ctx_id > spacc->config.num_ctx)
b37587c90bca57 Pavitrakumar M 2024-03-28  116  		return -EINVAL;
b37587c90bca57 Pavitrakumar M 2024-03-28  117  
b37587c90bca57 Pavitrakumar M 2024-03-28  118  	spin_lock_irqsave(&spacc->ctx_lock, lock_flag);
b37587c90bca57 Pavitrakumar M 2024-03-28  119  	/* release the base context and contiguous block */
b37587c90bca57 Pavitrakumar M 2024-03-28  120  	ncontig = (&spacc->ctx[ctx_id])->ncontig;
b37587c90bca57 Pavitrakumar M 2024-03-28  121  	for (y = 0; y <= ncontig; y++) {
b37587c90bca57 Pavitrakumar M 2024-03-28  122  		if ((&spacc->ctx[ctx_id + y])->ref_cnt > 0)
b37587c90bca57 Pavitrakumar M 2024-03-28  123  			(&spacc->ctx[ctx_id + y])->ref_cnt--;
b37587c90bca57 Pavitrakumar M 2024-03-28  124  	}
b37587c90bca57 Pavitrakumar M 2024-03-28  125  
b37587c90bca57 Pavitrakumar M 2024-03-28  126  	if ((&spacc->ctx[ctx_id])->ref_cnt == 0) {
b37587c90bca57 Pavitrakumar M 2024-03-28  127  		(&spacc->ctx[ctx_id])->ncontig = 0;
b37587c90bca57 Pavitrakumar M 2024-03-28  128  #ifdef CONFIG_CRYPTO_DEV_SPACC_SECURE_MODE
b37587c90bca57 Pavitrakumar M 2024-03-28  129  		/* TODO:  This driver works in harmony with "normal" kernel
b37587c90bca57 Pavitrakumar M 2024-03-28  130  		 * processes so we release the context all the time
b37587c90bca57 Pavitrakumar M 2024-03-28  131  		 * normally this would be done from a "secure" kernel process
b37587c90bca57 Pavitrakumar M 2024-03-28  132  		 * (trustzone/etc).  This hack is so that SPACC.0
b37587c90bca57 Pavitrakumar M 2024-03-28  133  		 * cores can both use the same context space.
b37587c90bca57 Pavitrakumar M 2024-03-28  134  		 */
b37587c90bca57 Pavitrakumar M 2024-03-28 @135  		writel(ctx_id, spacc->regmap + SPACC_REG_SECURE_RELEASE);
b37587c90bca57 Pavitrakumar M 2024-03-28  136  #endif
b37587c90bca57 Pavitrakumar M 2024-03-28  137  	}
b37587c90bca57 Pavitrakumar M 2024-03-28  138  
b37587c90bca57 Pavitrakumar M 2024-03-28  139  	spin_unlock_irqrestore(&spacc->ctx_lock, lock_flag);
b37587c90bca57 Pavitrakumar M 2024-03-28  140  
b37587c90bca57 Pavitrakumar M 2024-03-28  141  	return CRYPTO_OK;
b37587c90bca57 Pavitrakumar M 2024-03-28  142  }
b37587c90bca57 Pavitrakumar M 2024-03-28  143  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]
  Powered by Linux