All of lore.kernel.org
 help / color / mirror / Atom feed
* [hyperv-linux:hyperv-next 31/32] arch/x86/hyperv/irqdomain.c:27:18: sparse: sparse: incorrect type in initializer (different address spaces)
@ 2021-02-09 19:57 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-09 19:57 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6651 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/hyperv/linux.git hyperv-next
head:   9c9e1c68259d6cf8a348289fd13ed8f320c0d662
commit: 6f9128509b3f298893a0102fac73035b05ad0aea [31/32] x86/hyperv: implement an MSI domain for root partition
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/?id=6f9128509b3f298893a0102fac73035b05ad0aea
        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 6f9128509b3f298893a0102fac73035b05ad0aea
        # 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@intel.com>


"sparse warnings: (new ones prefixed by >>)"
>> arch/x86/hyperv/irqdomain.c:27:18: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   arch/x86/hyperv/irqdomain.c:27:18: sparse:     expected void const [noderef] __percpu *__vpp_verify
   arch/x86/hyperv/irqdomain.c:27:18: sparse:     got void [noderef] __percpu **
   arch/x86/hyperv/irqdomain.c:27:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hv_input_map_device_interrupt *input @@     got void [noderef] __percpu * @@
   arch/x86/hyperv/irqdomain.c:27:15: sparse:     expected struct hv_input_map_device_interrupt *input
   arch/x86/hyperv/irqdomain.c:27:15: sparse:     got void [noderef] __percpu *
   arch/x86/hyperv/irqdomain.c:28:19: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   arch/x86/hyperv/irqdomain.c:28:19: sparse:     expected void const [noderef] __percpu *__vpp_verify
   arch/x86/hyperv/irqdomain.c:28:19: sparse:     got void [noderef] __percpu **
   arch/x86/hyperv/irqdomain.c:28:16: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hv_output_map_device_interrupt *output @@     got void [noderef] __percpu * @@
   arch/x86/hyperv/irqdomain.c:28:16: sparse:     expected struct hv_output_map_device_interrupt *output
   arch/x86/hyperv/irqdomain.c:28:16: sparse:     got void [noderef] __percpu *
   arch/x86/hyperv/irqdomain.c:80:18: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected void const [noderef] __percpu *__vpp_verify @@     got void [noderef] __percpu ** @@
   arch/x86/hyperv/irqdomain.c:80:18: sparse:     expected void const [noderef] __percpu *__vpp_verify
   arch/x86/hyperv/irqdomain.c:80:18: sparse:     got void [noderef] __percpu **
>> arch/x86/hyperv/irqdomain.c:80:15: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct hv_input_unmap_device_interrupt *input @@     got void [noderef] __percpu * @@
   arch/x86/hyperv/irqdomain.c:80:15: sparse:     expected struct hv_input_unmap_device_interrupt *input
   arch/x86/hyperv/irqdomain.c:80:15: sparse:     got void [noderef] __percpu *

vim +27 arch/x86/hyperv/irqdomain.c

    14	
    15	static int hv_map_interrupt(union hv_device_id device_id, bool level,
    16			int cpu, int vector, struct hv_interrupt_entry *entry)
    17	{
    18		struct hv_input_map_device_interrupt *input;
    19		struct hv_output_map_device_interrupt *output;
    20		struct hv_device_interrupt_descriptor *intr_desc;
    21		unsigned long flags;
    22		u64 status;
    23		int nr_bank, var_size;
    24	
    25		local_irq_save(flags);
    26	
  > 27		input = *this_cpu_ptr(hyperv_pcpu_input_arg);
    28		output = *this_cpu_ptr(hyperv_pcpu_output_arg);
    29	
    30		intr_desc = &input->interrupt_descriptor;
    31		memset(input, 0, sizeof(*input));
    32		input->partition_id = hv_current_partition_id;
    33		input->device_id = device_id.as_uint64;
    34		intr_desc->interrupt_type = HV_X64_INTERRUPT_TYPE_FIXED;
    35		intr_desc->vector_count = 1;
    36		intr_desc->target.vector = vector;
    37	
    38		if (level)
    39			intr_desc->trigger_mode = HV_INTERRUPT_TRIGGER_MODE_LEVEL;
    40		else
    41			intr_desc->trigger_mode = HV_INTERRUPT_TRIGGER_MODE_EDGE;
    42	
    43		intr_desc->target.vp_set.valid_bank_mask = 0;
    44		intr_desc->target.vp_set.format = HV_GENERIC_SET_SPARSE_4K;
    45		nr_bank = cpumask_to_vpset(&(intr_desc->target.vp_set), cpumask_of(cpu));
    46		if (nr_bank < 0) {
    47			local_irq_restore(flags);
    48			pr_err("%s: unable to generate VP set\n", __func__);
    49			return EINVAL;
    50		}
    51		intr_desc->target.flags = HV_DEVICE_INTERRUPT_TARGET_PROCESSOR_SET;
    52	
    53		/*
    54		 * var-sized hypercall, var-size starts after vp_mask (thus
    55		 * vp_set.format does not count, but vp_set.valid_bank_mask
    56		 * does).
    57		 */
    58		var_size = nr_bank + 1;
    59	
    60		status = hv_do_rep_hypercall(HVCALL_MAP_DEVICE_INTERRUPT, 0, var_size,
    61				input, output);
    62		*entry = output->interrupt_entry;
    63	
    64		local_irq_restore(flags);
    65	
    66		if ((status & HV_HYPERCALL_RESULT_MASK) != HV_STATUS_SUCCESS)
    67			pr_err("%s: hypercall failed, status %lld\n", __func__, status);
    68	
    69		return status & HV_HYPERCALL_RESULT_MASK;
    70	}
    71	
    72	static int hv_unmap_interrupt(u64 id, struct hv_interrupt_entry *old_entry)
    73	{
    74		unsigned long flags;
    75		struct hv_input_unmap_device_interrupt *input;
    76		struct hv_interrupt_entry *intr_entry;
    77		u64 status;
    78	
    79		local_irq_save(flags);
  > 80		input = *this_cpu_ptr(hyperv_pcpu_input_arg);
    81	
    82		memset(input, 0, sizeof(*input));
    83		intr_entry = &input->interrupt_entry;
    84		input->partition_id = hv_current_partition_id;
    85		input->device_id = id;
    86		*intr_entry = *old_entry;
    87	
    88		status = hv_do_hypercall(HVCALL_UNMAP_DEVICE_INTERRUPT, input, NULL);
    89		local_irq_restore(flags);
    90	
    91		return status & HV_HYPERCALL_RESULT_MASK;
    92	}
    93	

---
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: 34458 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-02-09 19:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-09 19:57 [hyperv-linux:hyperv-next 31/32] arch/x86/hyperv/irqdomain.c:27:18: sparse: sparse: incorrect type in initializer (different address spaces) 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.