tree:
https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head: 9c9e1c68259d6cf8a348289fd13ed8f320c0d662
commit: ad989287208ec5e689574916ecffe730f4592a86 [25/32] x86/hyperv: provide a bunch of
helper functions
config: x86_64-randconfig-s022-20210209 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-215-g0fb77bb6-dirty
#
https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git/commit/?...
git remote add hyperv-linux
https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git
git fetch --no-tags hyperv-linux hyperv-next
git checkout ad989287208ec5e689574916ecffe730f4592a86
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)"
arch/x86/hyperv/hv_proc.c:83:23: sparse: sparse: incorrect type in initializer
(different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@
got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:83:23: sparse: expected void const [noderef] __percpu
*__vpp_verify
arch/x86/hyperv/hv_proc.c:83:23: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:83:20: sparse: sparse: incorrect type in assignment
(different address spaces) @@ expected struct hv_deposit_memory *input_page @@ got
void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:83:20: sparse: expected struct hv_deposit_memory
*input_page
arch/x86/hyperv/hv_proc.c:83:20: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:136:26: sparse: sparse: incorrect type in initializer
(different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@
got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:136:26: sparse: expected void const [noderef] __percpu
*__vpp_verify
arch/x86/hyperv/hv_proc.c:136:26: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:136:23: sparse: sparse: incorrect type in assignment
(different address spaces) @@ expected struct hv_add_logical_processor_in *input @@
got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:136:23: sparse: expected struct
hv_add_logical_processor_in *input
arch/x86/hyperv/hv_proc.c:136:23: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:138:27: sparse: sparse: incorrect type in initializer
(different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@
got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:138:27: sparse: expected void const [noderef] __percpu
*__vpp_verify
arch/x86/hyperv/hv_proc.c:138:27: sparse: got void [noderef] __percpu **
> arch/x86/hyperv/hv_proc.c:138:24: sparse: sparse: incorrect type
in assignment (different address spaces) @@ expected struct
hv_add_logical_processor_out *output @@ got void [noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:138:24: sparse: expected struct hv_add_logical_processor_out
*output
arch/x86/hyperv/hv_proc.c:138:24: sparse: got void [noderef] __percpu *
arch/x86/hyperv/hv_proc.c:186:26: sparse: sparse: incorrect type in initializer
(different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@
got void [noderef] __percpu ** @@
arch/x86/hyperv/hv_proc.c:186:26: sparse: expected void const [noderef] __percpu
*__vpp_verify
arch/x86/hyperv/hv_proc.c:186:26: sparse: got void [noderef] __percpu **
arch/x86/hyperv/hv_proc.c:186:23: sparse: sparse: incorrect type in assignment
(different address spaces) @@ expected struct hv_create_vp *input @@ got void
[noderef] __percpu * @@
arch/x86/hyperv/hv_proc.c:186:23: sparse: expected struct hv_create_vp *input
arch/x86/hyperv/hv_proc.c:186:23: sparse: got void [noderef] __percpu *
vim +138 arch/x86/hyperv/hv_proc.c
118
119 int hv_call_add_logical_proc(int node, u32 lp_index, u32 apic_id)
120 {
121 struct hv_add_logical_processor_in *input;
122 struct hv_add_logical_processor_out *output;
123 u64 status;
124 unsigned long flags;
125 int ret = 0;
126 int pxm = node_to_pxm(node);
127
128 /*
129 * When adding a logical processor, the hypervisor may return
130 * HV_STATUS_INSUFFICIENT_MEMORY. When that happens, we deposit more
131 * pages and retry.
132 */
133 do {
134 local_irq_save(flags);
135
136 input = *this_cpu_ptr(hyperv_pcpu_input_arg);
137 /*
We don't do anything with the output right now */
138 output = *this_cpu_ptr(hyperv_pcpu_output_arg);
139
140 input->lp_index = lp_index;
141 input->apic_id = apic_id;
142 input->flags = 0;
143 input->proximity_domain_info.domain_id = pxm;
144 input->proximity_domain_info.flags.reserved = 0;
145 input->proximity_domain_info.flags.proximity_info_valid = 1;
146 input->proximity_domain_info.flags.proximity_preferred = 1;
147 status = hv_do_hypercall(HVCALL_ADD_LOGICAL_PROCESSOR,
148 input, output);
149 local_irq_restore(flags);
150
151 status &= HV_HYPERCALL_RESULT_MASK;
152
153 if (status != HV_STATUS_INSUFFICIENT_MEMORY) {
154 if (status != HV_STATUS_SUCCESS) {
155 pr_err("%s: cpu %u apic ID %u, %lld\n", __func__,
156 lp_index, apic_id, status);
157 ret = status;
158 }
159 break;
160 }
161 ret = hv_call_deposit_pages(node, hv_current_partition_id, 1);
162 } while (!ret);
163
164 return ret;
165 }
166
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org