* drivers/hv/channel_mgmt.c:785 init_vp_index() error: uninitialized symbol 'target_cpu'.
@ 2022-04-17 21:55 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2022-04-17 21:55 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 8019 bytes --]
CC: kbuild-all(a)lists.01.org
BCC: lkp(a)intel.com
CC: linux-kernel(a)vger.kernel.org
TO: Haiyang Zhang <haiyangz@microsoft.com>
CC: Wei Liu <wei.liu@kernel.org>
CC: Michael Kelley <mikelley@microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a1901b464e7e3e28956ae7423db2847dbbfb5be8
commit: 7c9ff3deeee61b253715dcf968a6307af148c9b2 Drivers: hv: vmbus: Fix duplicate CPU assignments within a device
date: 9 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 9 months ago
config: x86_64-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220418/202204180525.9FX5pouS-lkp(a)intel.com/config)
compiler: gcc-11 (Debian 11.2.0-19) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/hv/channel_mgmt.c:785 init_vp_index() error: uninitialized symbol 'target_cpu'.
vim +/target_cpu +785 drivers/hv/channel_mgmt.c
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 714
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 715 /*
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 716 * Starting with Win8, we can statically distribute the incoming
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 717 * channel interrupt load by binding a channel to VCPU.
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 718 *
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 719 * For pre-win8 hosts or non-performance critical channels we assign the
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 720) * VMBUS_CONNECT_CPU.
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 721) *
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 722) * Starting with win8, performance critical channels will be distributed
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 723) * evenly among all the available NUMA nodes. Once the node is assigned,
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 724) * we will assign the CPU based on a simple round robin scheme.
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 725 */
afaa33da08abd10 Andrea Parri (Microsoft 2020-05-22 726) static void init_vp_index(struct vmbus_channel *channel)
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 727 {
afaa33da08abd10 Andrea Parri (Microsoft 2020-05-22 728) bool perf_chn = hv_is_perf_channel(channel);
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 729 u32 i, ncpu = num_online_cpus();
25355252607ca28 Dexuan Cui 2018-09-23 730 cpumask_var_t available_mask;
9f01ec53458d9e9 K. Y. Srinivasan 2015-08-05 731 struct cpumask *alloced_mask;
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 732) u32 target_cpu;
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 733) int numa_node;
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 734
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 735 if ((vmbus_proto_version == VERSION_WS2008) ||
25355252607ca28 Dexuan Cui 2018-09-23 736 (vmbus_proto_version == VERSION_WIN7) || (!perf_chn) ||
25355252607ca28 Dexuan Cui 2018-09-23 737 !alloc_cpumask_var(&available_mask, GFP_KERNEL)) {
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 738 /*
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 739 * Prior to win8, all channel interrupts are
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 740) * delivered on VMBUS_CONNECT_CPU.
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 741 * Also if the channel is not a performance critical
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 742) * channel, bind it to VMBUS_CONNECT_CPU.
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 743) * In case alloc_cpumask_var() fails, bind it to
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 744) * VMBUS_CONNECT_CPU.
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 745 */
d570aec0f2154e1 Andrea Parri (Microsoft 2020-04-06 746) channel->target_cpu = VMBUS_CONNECT_CPU;
afaa33da08abd10 Andrea Parri (Microsoft 2020-05-22 747) if (perf_chn)
afaa33da08abd10 Andrea Parri (Microsoft 2020-05-22 748) hv_set_alloced_cpu(VMBUS_CONNECT_CPU);
d3ba720dd58cdf6 K. Y. Srinivasan 2014-04-08 749 return;
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 750 }
ce59fec836a9b4d Vitaly Kuznetsov 2015-05-06 751
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 752 for (i = 1; i <= ncpu + 1; i++) {
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 753 while (true) {
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 754) numa_node = next_numa_node_id++;
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 755) if (numa_node == nr_node_ids) {
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 756) next_numa_node_id = 0;
509879bdb30b8e1 K. Y. Srinivasan 2016-09-02 757 continue;
509879bdb30b8e1 K. Y. Srinivasan 2016-09-02 758 }
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 759) if (cpumask_empty(cpumask_of_node(numa_node)))
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 760 continue;
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 761 break;
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 762 }
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 763) alloced_mask = &hv_context.hv_numa_map[numa_node];
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 764
9f01ec53458d9e9 K. Y. Srinivasan 2015-08-05 765 if (cpumask_weight(alloced_mask) ==
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 766) cpumask_weight(cpumask_of_node(numa_node))) {
ce59fec836a9b4d Vitaly Kuznetsov 2015-05-06 767 /*
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 768 * We have cycled through all the CPUs in the node;
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 769 * reset the alloced map.
ce59fec836a9b4d Vitaly Kuznetsov 2015-05-06 770 */
9f01ec53458d9e9 K. Y. Srinivasan 2015-08-05 771 cpumask_clear(alloced_mask);
ce59fec836a9b4d Vitaly Kuznetsov 2015-05-06 772 }
ce59fec836a9b4d Vitaly Kuznetsov 2015-05-06 773
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 774 cpumask_xor(available_mask, alloced_mask,
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 775 cpumask_of_node(numa_node));
79fd8e706637a5c Vitaly Kuznetsov 2016-01-27 776
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 777) target_cpu = cpumask_first(available_mask);
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 778) cpumask_set_cpu(target_cpu, alloced_mask);
1f656ff3fdddc2f K. Y. Srinivasan 2015-05-30 779
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 780 if (channel->offermsg.offer.sub_channel_index >= ncpu ||
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 781 i > ncpu || !hv_cpuself_used(target_cpu, channel))
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 782 break;
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 783 }
7c9ff3deeee61b2 Haiyang Zhang 2021-07-16 784
8ef4c4abbbcdcd9 Andrea Parri (Microsoft 2020-04-06 @785) channel->target_cpu = target_cpu;
25355252607ca28 Dexuan Cui 2018-09-23 786
25355252607ca28 Dexuan Cui 2018-09-23 787 free_cpumask_var(available_mask);
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 788 }
a119845f6e98c89 K. Y. Srinivasan 2012-12-01 789
:::::: The code at line 785 was first introduced by commit
:::::: 8ef4c4abbbcdcd9d4bc0fd9454df03e6dac24b73 Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity logic
:::::: TO: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
:::::: CC: Wei Liu <wei.liu@kernel.org>
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* drivers/hv/channel_mgmt.c:785 init_vp_index() error: uninitialized symbol 'target_cpu'.
@ 2021-07-26 14:28 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-07-26 14:28 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 7921 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Haiyang Zhang <haiyangz@microsoft.com>
CC: Wei Liu <wei.liu@kernel.org>
CC: Michael Kelley <mikelley@microsoft.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: ff1176468d368232b684f75e82563369208bc371
commit: 7c9ff3deeee61b253715dcf968a6307af148c9b2 Drivers: hv: vmbus: Fix duplicate CPU assignments within a device
date: 7 days ago
:::::: branch date: 16 hours ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-m001-20210726 (attached as .config)
compiler: gcc-10 (Ubuntu 10.3.0-1ubuntu1~20.04) 10.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/hv/channel_mgmt.c:785 init_vp_index() error: uninitialized symbol 'target_cpu'.
vim +/target_cpu +785 drivers/hv/channel_mgmt.c
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 714
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 715 /*
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 716 * Starting with Win8, we can statically distribute the incoming
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 717 * channel interrupt load by binding a channel to VCPU.
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 718 *
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 719 * For pre-win8 hosts or non-performance critical channels we assign the
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 720) * VMBUS_CONNECT_CPU.
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 721) *
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 722) * Starting with win8, performance critical channels will be distributed
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 723) * evenly among all the available NUMA nodes. Once the node is assigned,
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 724) * we will assign the CPU based on a simple round robin scheme.
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 725 */
afaa33da08abd1 Andrea Parri (Microsoft 2020-05-22 726) static void init_vp_index(struct vmbus_channel *channel)
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 727 {
afaa33da08abd1 Andrea Parri (Microsoft 2020-05-22 728) bool perf_chn = hv_is_perf_channel(channel);
7c9ff3deeee61b Haiyang Zhang 2021-07-16 729 u32 i, ncpu = num_online_cpus();
25355252607ca2 Dexuan Cui 2018-09-23 730 cpumask_var_t available_mask;
9f01ec53458d9e K. Y. Srinivasan 2015-08-05 731 struct cpumask *alloced_mask;
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 732) u32 target_cpu;
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 733) int numa_node;
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 734
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 735 if ((vmbus_proto_version == VERSION_WS2008) ||
25355252607ca2 Dexuan Cui 2018-09-23 736 (vmbus_proto_version == VERSION_WIN7) || (!perf_chn) ||
25355252607ca2 Dexuan Cui 2018-09-23 737 !alloc_cpumask_var(&available_mask, GFP_KERNEL)) {
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 738 /*
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 739 * Prior to win8, all channel interrupts are
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 740) * delivered on VMBUS_CONNECT_CPU.
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 741 * Also if the channel is not a performance critical
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 742) * channel, bind it to VMBUS_CONNECT_CPU.
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 743) * In case alloc_cpumask_var() fails, bind it to
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 744) * VMBUS_CONNECT_CPU.
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 745 */
d570aec0f2154e Andrea Parri (Microsoft 2020-04-06 746) channel->target_cpu = VMBUS_CONNECT_CPU;
afaa33da08abd1 Andrea Parri (Microsoft 2020-05-22 747) if (perf_chn)
afaa33da08abd1 Andrea Parri (Microsoft 2020-05-22 748) hv_set_alloced_cpu(VMBUS_CONNECT_CPU);
d3ba720dd58cdf K. Y. Srinivasan 2014-04-08 749 return;
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 750 }
ce59fec836a9b4 Vitaly Kuznetsov 2015-05-06 751
7c9ff3deeee61b Haiyang Zhang 2021-07-16 752 for (i = 1; i <= ncpu + 1; i++) {
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 753 while (true) {
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 754) numa_node = next_numa_node_id++;
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 755) if (numa_node == nr_node_ids) {
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 756) next_numa_node_id = 0;
509879bdb30b8e K. Y. Srinivasan 2016-09-02 757 continue;
509879bdb30b8e K. Y. Srinivasan 2016-09-02 758 }
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 759) if (cpumask_empty(cpumask_of_node(numa_node)))
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 760 continue;
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 761 break;
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 762 }
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 763) alloced_mask = &hv_context.hv_numa_map[numa_node];
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 764
9f01ec53458d9e K. Y. Srinivasan 2015-08-05 765 if (cpumask_weight(alloced_mask) ==
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 766) cpumask_weight(cpumask_of_node(numa_node))) {
ce59fec836a9b4 Vitaly Kuznetsov 2015-05-06 767 /*
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 768 * We have cycled through all the CPUs in the node;
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 769 * reset the alloced map.
ce59fec836a9b4 Vitaly Kuznetsov 2015-05-06 770 */
9f01ec53458d9e K. Y. Srinivasan 2015-08-05 771 cpumask_clear(alloced_mask);
ce59fec836a9b4 Vitaly Kuznetsov 2015-05-06 772 }
ce59fec836a9b4 Vitaly Kuznetsov 2015-05-06 773
7c9ff3deeee61b Haiyang Zhang 2021-07-16 774 cpumask_xor(available_mask, alloced_mask,
7c9ff3deeee61b Haiyang Zhang 2021-07-16 775 cpumask_of_node(numa_node));
79fd8e706637a5 Vitaly Kuznetsov 2016-01-27 776
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 777) target_cpu = cpumask_first(available_mask);
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 778) cpumask_set_cpu(target_cpu, alloced_mask);
1f656ff3fdddc2 K. Y. Srinivasan 2015-05-30 779
7c9ff3deeee61b Haiyang Zhang 2021-07-16 780 if (channel->offermsg.offer.sub_channel_index >= ncpu ||
7c9ff3deeee61b Haiyang Zhang 2021-07-16 781 i > ncpu || !hv_cpuself_used(target_cpu, channel))
7c9ff3deeee61b Haiyang Zhang 2021-07-16 782 break;
7c9ff3deeee61b Haiyang Zhang 2021-07-16 783 }
7c9ff3deeee61b Haiyang Zhang 2021-07-16 784
8ef4c4abbbcdcd Andrea Parri (Microsoft 2020-04-06 @785) channel->target_cpu = target_cpu;
25355252607ca2 Dexuan Cui 2018-09-23 786
25355252607ca2 Dexuan Cui 2018-09-23 787 free_cpumask_var(available_mask);
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 788 }
a119845f6e98c8 K. Y. Srinivasan 2012-12-01 789
:::::: The code at line 785 was first introduced by commit
:::::: 8ef4c4abbbcdcd9d4bc0fd9454df03e6dac24b73 Drivers: hv: vmbus: Remove the unused HV_LOCALIZED channel affinity logic
:::::: TO: Andrea Parri (Microsoft) <parri.andrea@gmail.com>
:::::: CC: Wei Liu <wei.liu@kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 37509 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-04-17 21:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-17 21:55 drivers/hv/channel_mgmt.c:785 init_vp_index() error: uninitialized symbol 'target_cpu' kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-07-26 14:28 kernel test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.