tree:
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git simple_copy
head: d6f32b90156624ae9dc06ef5873334a48e9b9806
commit: 8fcfa60ee742c99c9aeb2cc6efbc8c51ca435a77 [3/5] nvme: add simple copy support
config: arm-randconfig-s032-20210209 (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.0
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git/commit/?id...
git remote add chao-linux
https://git.kernel.org/pub/scm/linux/kernel/git/chao/linux.git
git fetch --no-tags chao-linux simple_copy
git checkout 8fcfa60ee742c99c9aeb2cc6efbc8c51ca435a77
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1
CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
> drivers/nvme/host/core.c:2009:42: sparse: sparse: cast to
restricted __le64
> drivers/nvme/host/core.c:2009:42: sparse: sparse: cast from restricted __le32
> drivers/nvme/host/core.c:2011:48: sparse: sparse: cast to restricted __le32
> drivers/nvme/host/core.c:2011:48: sparse: sparse: cast from restricted __le16
drivers/nvme/host/core.c: note: in included file (through include/linux/notifier.h,
include/linux/memory_hotplug.h, include/linux/mmzone.h, ...):
include/linux/srcu.h:179:9: sparse: sparse: context imbalance in
'nvme_put_ns_from_disk' - unexpected unlock
vim +2009 drivers/nvme/host/core.c
1990
1991 static void nvme_config_copy(struct gendisk *disk, struct nvme_ns *ns,
1992 struct nvme_id_ns *id)
1993 {
1994 struct nvme_ctrl *ctrl = ns->ctrl;
1995 struct request_queue *queue = disk->queue;
1996
1997 if (!(ctrl->oncs & NVME_CTRL_ONCS_COPY)) {
1998 queue->limits.copy_offload = 0;
1999 queue->limits.max_copy_sectors = 0;
2000 queue->limits.max_copy_range_sectors = 0;
2001 queue->limits.max_copy_nr_ranges = 0;
2002 blk_queue_flag_clear(QUEUE_FLAG_COPY, queue);
2003 return;
2004 }
2005
2006 /* setting copy limits */
2007 blk_queue_flag_test_and_set(QUEUE_FLAG_COPY, queue);
2008 queue->limits.copy_offload = 0;
2009 queue->limits.max_copy_sectors = le64_to_cpu(id->mcl) *
2010 (1 << (ns->lba_shift - 9));
2011 queue->limits.max_copy_range_sectors =
le32_to_cpu(id->mssrl) *
2012 (1 << (ns->lba_shift - 9));
2013 queue->limits.max_copy_nr_ranges = id->msrc + 1;
2014 }
2015
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org