[PATCH 7/7] accel/qaic: Add AIC200 support

kernel test robot lkp at intel.com
Sat Dec 28 00:19:49 UTC 2024


Hi Jeffrey,

kernel test robot noticed the following build errors:

[auto build test ERROR on linus/master]
[also build test ERROR on v6.13-rc4 next-20241220]
[cannot apply to mani-mhi/mhi-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Jeffrey-Hugo/bus-mhi-host-Refactor-BHI-BHIe-based-firmware-loading/20241214-053540
base:   linus/master
patch link:    https://lore.kernel.org/r/20241213213340.2551697-8-quic_jhugo%40quicinc.com
patch subject: [PATCH 7/7] accel/qaic: Add AIC200 support
config: i386-randconfig-007-20241227 (https://download.01.org/0day-ci/archive/20241228/202412280859.rkIldm5t-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241228/202412280859.rkIldm5t-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 at intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202412280859.rkIldm5t-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from drivers/accel/qaic/sahara.c:5:
   In file included from include/linux/devcoredump.h:12:
   In file included from include/linux/scatterlist.h:8:
   In file included from include/linux/mm.h:2223:
   include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
     518 |         return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
         |                               ~~~~~~~~~~~ ^ ~~~
>> drivers/accel/qaic/sahara.c:781:24: error: assigning to 'const char **' from 'const char *const[76]' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
     781 |                 context->image_table = aic200_image_table;
         |                                      ^ ~~~~~~~~~~~~~~~~~~
   1 warning and 1 error generated.


vim +781 drivers/accel/qaic/sahara.c

   744	
   745	static int sahara_mhi_probe(struct mhi_device *mhi_dev, const struct mhi_device_id *id)
   746	{
   747		struct sahara_context *context;
   748		int ret;
   749		int i;
   750	
   751		context = devm_kzalloc(&mhi_dev->dev, sizeof(*context), GFP_KERNEL);
   752		if (!context)
   753			return -ENOMEM;
   754	
   755		context->rx = devm_kzalloc(&mhi_dev->dev, SAHARA_PACKET_MAX_SIZE, GFP_KERNEL);
   756		if (!context->rx)
   757			return -ENOMEM;
   758	
   759		/*
   760		 * AIC100 defines SAHARA_TRANSFER_MAX_SIZE as the largest value it
   761		 * will request for READ_DATA. This is larger than
   762		 * SAHARA_PACKET_MAX_SIZE, and we need 9x SAHARA_PACKET_MAX_SIZE to
   763		 * cover SAHARA_TRANSFER_MAX_SIZE. When the remote side issues a
   764		 * READ_DATA, it requires a transfer of the exact size requested. We
   765		 * can use MHI_CHAIN to link multiple buffers into a single transfer
   766		 * but the remote side will not consume the buffers until it sees an
   767		 * EOT, thus we need to allocate enough buffers to put in the tx fifo
   768		 * to cover an entire READ_DATA request of the max size.
   769		 */
   770		for (i = 0; i < SAHARA_NUM_TX_BUF; ++i) {
   771			context->tx[i] = devm_kzalloc(&mhi_dev->dev, SAHARA_PACKET_MAX_SIZE, GFP_KERNEL);
   772			if (!context->tx[i])
   773				return -ENOMEM;
   774		}
   775	
   776		context->mhi_dev = mhi_dev;
   777		INIT_WORK(&context->fw_work, sahara_processing);
   778		INIT_WORK(&context->dump_work, sahara_dump_processing);
   779	
   780		if (!strcmp(mhi_dev->mhi_cntrl->name, "AIC200")) {
 > 781			context->image_table = aic200_image_table;
   782			context->table_size = ARRAY_SIZE(aic200_image_table);
   783		} else {
   784			context->image_table = aic100_image_table;
   785			context->table_size = ARRAY_SIZE(aic100_image_table);
   786		}
   787	
   788		context->active_image_id = SAHARA_IMAGE_ID_NONE;
   789		dev_set_drvdata(&mhi_dev->dev, context);
   790	
   791		ret = mhi_prepare_for_transfer(mhi_dev);
   792		if (ret)
   793			return ret;
   794	
   795		ret = mhi_queue_buf(mhi_dev, DMA_FROM_DEVICE, context->rx, SAHARA_PACKET_MAX_SIZE, MHI_EOT);
   796		if (ret) {
   797			mhi_unprepare_from_transfer(mhi_dev);
   798			return ret;
   799		}
   800	
   801		return 0;
   802	}
   803	

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


More information about the dri-devel mailing list