Re: [PATCH 3/3] pci/msi: remove pci_msi_ignore_mask

kernel test robot
2025-01-11T12:25:01Z

Hi Roger,

kernel test robot noticed the following build errors:

[auto build test ERROR on pci/next]
[also build test ERROR on pci/for-linus xen-tip/linux-next tip/irq/core linus/master v6.13-rc6 next-20250110]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url: https://github.com/intel-lab-lkp/linux/commits/Roger-Pau-Monne/xen-pci-do-not-register-devices-outside-of-PCI-segment-scope/20250110-220331
base: https://git.kernel.org/pub/scm/linux/kernel/git/pci/pci.git next
patch link: https://lore.kernel.org/r/20250110140152.27624-4-roger.pau%40citrix.com
patch subject: [PATCH 3/3] pci/msi: remove pci_msi_ignore_mask
config: riscv-defconfig (https://download.01.org/0day-ci/archive/20250111/202501112048.6yCFh2ma-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250111/202501112048.6yCFh2ma-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202501112048.6yCFh2ma-lkp@intel.com/

All errors (new ones prefixed by >>):

In file included from drivers/pci/msi/msi.c:12:
In file included from include/linux/irq.h:23:
In file included from arch/riscv/include/asm/irq.h:10:
In file included from include/linux/interrupt.h:22:
In file included from arch/riscv/include/asm/sections.h:9:
In file included from include/linux/mm.h:2223:
include/linux/vmstat.h:518:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion]
518 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_"
| ~~~~~~~~~~~ ^ ~~~
>> drivers/pci/msi/msi.c:288:40: error: incomplete definition of type 'const struct irq_domain'
288 | const struct msi_domain_info *info = d->host_data;
| ~^
include/linux/irq.h:130:8: note: forward declaration of 'struct irq_domain'
130 | struct irq_domain;
| ^
drivers/pci/msi/msi.c:604:40: error: incomplete definition of type 'const struct irq_domain'
604 | const struct msi_domain_info *info = d->host_data;
| ~^
include/linux/irq.h:130:8: note: forward declaration of 'struct irq_domain'
130 | struct irq_domain;
| ^
drivers/pci/msi/msi.c:714:40: error: incomplete definition of type 'const struct irq_domain'
714 | const struct msi_domain_info *info = d->host_data;
| ~^
include/linux/irq.h:130:8: note: forward declaration of 'struct irq_domain'
130 | struct irq_domain;
| ^
1 warning and 3 errors generated.

vim +288 drivers/pci/msi/msi.c

283
284 static int msi_setup_msi_desc(struct pci_dev *dev, int nvec,
285 struct irq_affinity_desc *masks)
286 {
287 const struct irq_domain *d = dev_get_msi_domain(&dev->dev);
> 288 const struct msi_domain_info *info = d->host_data;
289 struct msi_desc desc;
290 u16 control;
291
292 /* MSI Entry Initialization */
293 memset(&desc, 0, sizeof(desc));
294
295 pci_read_config_word(dev, dev->msi_cap + PCI_MSI_FLAGS, &control);
296 /* Lies, damned lies, and MSIs */
297 if (dev->dev_flags & PCI_DEV_FLAGS_HAS_MSI_MASKING)
298 control |= PCI_MSI_FLAGS_MASKBIT;
299 if (info->flags & MSI_FLAG_NO_MASK)
300 control &= ~PCI_MSI_FLAGS_MASKBIT;
301
302 desc.nvec_used = nvec;
303 desc.pci.msi_attrib.is_64 = !!(control & PCI_MSI_FLAGS_64BIT);
304 desc.pci.msi_attrib.can_mask = !!(control & PCI_MSI_FLAGS_MASKBIT);
305 desc.pci.msi_attrib.default_irq = dev->irq;
306 desc.pci.msi_attrib.multi_cap = FIELD_GET(PCI_MSI_FLAGS_QMASK, control);
307 desc.pci.msi_attrib.multiple = ilog2(__roundup_pow_of_two(nvec));
308 desc.affinity = masks;
309
310 if (control & PCI_MSI_FLAGS_64BIT)
311 desc.pci.mask_pos = dev->msi_cap + PCI_MSI_MASK_64;
312 else
313 desc.pci.mask_pos = dev->msi_cap + PCI_MSI_MASK_32;
314
315 /* Save the initial mask status */
316 if (desc.pci.msi_attrib.can_mask)
317 pci_read_config_dword(dev, desc.pci.mask_pos, &desc.pci.msi_mask);
318
319 return msi_insert_msi_desc(&dev->dev, &desc);
320 }
321

--
0-DAY CI Kernel Test Service