tree:
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: fb57b1fabcb28f358901b2df90abd2b48abc1ca8
commit: 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6 [3410/10701] scsi: storvsc: Re-init
stor_chns when a channel interrupt is re-assigned
config: i386-randconfig-r015-20200519 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce:
git checkout 951d33f2d785c6dc721db44bb8c00ceaa4eeb2d6
# save the attached .config to linux build tree
make ARCH=i386
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 'storvsc_change_target_cpu' [-Wmissing-prototypes]
void
storvsc_change_target_cpu(struct vmbus_channel *channel, u32 old, u32 new)
^~~~~~~~~~~~~~~~~~~~~~~~~
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