tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head: f69bc337f7bdb619619af0a1caf951b1feeccb08
commit: 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6 [16/27] scsi: storvsc: Re-init stor_chns
when a channel interrupt is re-assigned
config: x86_64-randconfig-a011-20200519 (attached as .config)
compiler: clang version 11.0.0 (
https://github.com/llvm/llvm-project
135b877874fae96b4372c8a3fbfaa8ff44ff86e3)
reproduce:
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>, old ones prefixed by <<):
> drivers/scsi/storvsc_drv.c:624:6: warning: no previous prototype
for function 'storvsc_change_target_cpu' [-Wmissing-prototypes]
void
storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^
drivers/scsi/storvsc_drv.c:624:1: note: declare 'static' if the function is not
intended to be used outside of this translation unit
void storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^
static
1 warning generated.
vim +/storvsc_change_target_cpu +624 drivers/scsi/storvsc_drv.c
623
624 void storvsc_change_target_cpu(struct vmbus_channel *channel, u32
old, u32 new)
625 {
626 struct storvsc_device *stor_device;
627 struct vmbus_channel *cur_chn;
628 bool old_is_alloced = false;
629 struct hv_device *device;
630 unsigned long flags;
631 int cpu;
632
633 device = channel->primary_channel ?
634 channel->primary_channel->device_obj
635 : channel->device_obj;
636 stor_device = get_out_stor_device(device);
637 if (!stor_device)
638 return;
639
640 /* See storvsc_do_io() -> get_og_chn(). */
641 spin_lock_irqsave(&device->channel->lock, flags);
642
643 /*
644 * Determines if the storvsc device has other channels assigned to
645 * the "old" CPU to update the alloced_cpus mask and the stor_chns
646 * array.
647 */
648 if (device->channel != channel && device->channel->target_cpu ==
old) {
649 cur_chn = device->channel;
650 old_is_alloced = true;
651 goto old_is_alloced;
652 }
653 list_for_each_entry(cur_chn, &device->channel->sc_list, sc_list) {
654 if (cur_chn == channel)
655 continue;
656 if (cur_chn->target_cpu == old) {
657 old_is_alloced = true;
658 goto old_is_alloced;
659 }
660 }
661
662 old_is_alloced:
663 if (old_is_alloced)
664 WRITE_ONCE(stor_device->stor_chns[old], cur_chn);
665 else
666 cpumask_clear_cpu(old, &stor_device->alloced_cpus);
667
668 /* "Flush" the stor_chns array. */
669 for_each_possible_cpu(cpu) {
670 if (stor_device->stor_chns[cpu] && !cpumask_test_cpu(
671 cpu, &stor_device->alloced_cpus))
672 WRITE_ONCE(stor_device->stor_chns[cpu], NULL);
673 }
674
675 WRITE_ONCE(stor_device->stor_chns[new], channel);
676 cpumask_set_cpu(new, &stor_device->alloced_cpus);
677
678 spin_unlock_irqrestore(&device->channel->lock, flags);
679 }
680
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org