[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202108300433.96ZaBWtx-lkp@intel.com>
Date: Mon, 30 Aug 2021 04:01:41 +0800
From: kernel test robot <lkp@...el.com>
To: Megha Dey <megha.dey@...el.com>
Cc: llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
linux-kernel@...r.kernel.org
Subject: [meghadey-crypto:d_msix 1/1] kernel/irq/msi.c:577:3: error: expected
')'
tree: https://github.com/meghadey/crypto d_msix
head: 37b5937a105abc8efe975c67fe4444e47da17c60
commit: 37b5937a105abc8efe975c67fe4444e47da17c60 [1/1] PCI/MSI: Dynamic allocation of MSI-X vectors
config: powerpc-randconfig-r031-20210829 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 510e106fa8635e7f9c51c896180b971de6309b2f)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/meghadey/crypto/commit/37b5937a105abc8efe975c67fe4444e47da17c60
git remote add meghadey-crypto https://github.com/meghadey/crypto
git fetch --no-tags meghadey-crypto d_msix
git checkout 37b5937a105abc8efe975c67fe4444e47da17c60
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross O=build_dir ARCH=powerpc SHELL=/bin/bash kernel/irq/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@...el.com>
All errors (new ones prefixed by >>):
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:43:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insb, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:164:1: note: expanded from here
__do_insb
^
arch/powerpc/include/asm/io.h:556:56: note: expanded from macro '__do_insb'
#define __do_insb(p, b, n) readsb((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:166:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:557:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:168:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:558:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:170:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:559:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:172:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:560:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from kernel/irq/msi.c:13:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:619:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:616:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:174:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:561:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
kernel/irq/msi.c:122:30: error: no member named 'msix_vec_cnt' in 'struct pci_dev'
num_msi = to_pci_dev(dev)->msix_vec_cnt;
~~~~~~~~~~~~~~~ ^
>> kernel/irq/msi.c:577:3: error: expected ')'
return ret;
^
kernel/irq/msi.c:576:5: note: to match this '('
if (ret
^
6 warnings and 2 errors generated.
vim +577 kernel/irq/msi.c
da5dd9e854d2ed Thomas Gleixner 2017-12-29 563
43e9e705dd57c4 Thomas Gleixner 2020-08-26 564 int __msi_domain_alloc_irqs(struct irq_domain *domain, struct device *dev,
d9109698be6e74 Jiang Liu 2014-11-15 565 int nvec)
d9109698be6e74 Jiang Liu 2014-11-15 566 {
d9109698be6e74 Jiang Liu 2014-11-15 567 struct msi_domain_info *info = domain->host_data;
d9109698be6e74 Jiang Liu 2014-11-15 568 struct msi_domain_ops *ops = info->ops;
da5dd9e854d2ed Thomas Gleixner 2017-12-29 569 struct irq_data *irq_data;
d9109698be6e74 Jiang Liu 2014-11-15 570 struct msi_desc *desc;
06fde695ee7642 Zenghui Yu 2020-12-18 571 msi_alloc_info_t arg = { };
b6140914fd079e Thomas Gleixner 2016-07-04 572 int i, ret, virq;
da5dd9e854d2ed Thomas Gleixner 2017-12-29 573 bool can_reserve;
d9109698be6e74 Jiang Liu 2014-11-15 574
b2eba39bcab9d6 Marc Zyngier 2015-11-23 575 ret = msi_domain_prepare_irqs(domain, dev, nvec, &arg);
37b5937a105abc Megha Dey 2021-08-26 576 if (ret
d9109698be6e74 Jiang Liu 2014-11-15 @577 return ret;
d9109698be6e74 Jiang Liu 2014-11-15 578
37b5937a105abc Megha Dey 2021-08-26 579 for_each_msi_entry_from(desc, dev) {
d9109698be6e74 Jiang Liu 2014-11-15 580 ops->set_desc(&arg, desc);
d9109698be6e74 Jiang Liu 2014-11-15 581
b6140914fd079e Thomas Gleixner 2016-07-04 582 virq = __irq_domain_alloc_irqs(domain, -1, desc->nvec_used,
06ee6d571f0e35 Thomas Gleixner 2016-07-04 583 dev_to_node(dev), &arg, false,
0972fa57f53525 Thomas Gleixner 2016-07-04 584 desc->affinity);
d9109698be6e74 Jiang Liu 2014-11-15 585 if (virq < 0) {
d9109698be6e74 Jiang Liu 2014-11-15 586 ret = -ENOSPC;
d9109698be6e74 Jiang Liu 2014-11-15 587 if (ops->handle_error)
d9109698be6e74 Jiang Liu 2014-11-15 588 ret = ops->handle_error(domain, desc, ret);
d9109698be6e74 Jiang Liu 2014-11-15 589 if (ops->msi_finish)
d9109698be6e74 Jiang Liu 2014-11-15 590 ops->msi_finish(&arg, ret);
d9109698be6e74 Jiang Liu 2014-11-15 591 return ret;
d9109698be6e74 Jiang Liu 2014-11-15 592 }
d9109698be6e74 Jiang Liu 2014-11-15 593
07557ccb8c83f3 Thomas Gleixner 2017-09-13 594 for (i = 0; i < desc->nvec_used; i++) {
d9109698be6e74 Jiang Liu 2014-11-15 595 irq_set_msi_desc_off(virq, i, desc);
07557ccb8c83f3 Thomas Gleixner 2017-09-13 596 irq_debugfs_copy_devname(virq + i, dev);
07557ccb8c83f3 Thomas Gleixner 2017-09-13 597 }
d9109698be6e74 Jiang Liu 2014-11-15 598 }
d9109698be6e74 Jiang Liu 2014-11-15 599
d9109698be6e74 Jiang Liu 2014-11-15 600 if (ops->msi_finish)
d9109698be6e74 Jiang Liu 2014-11-15 601 ops->msi_finish(&arg, 0);
d9109698be6e74 Jiang Liu 2014-11-15 602
bc976233a872c0 Thomas Gleixner 2017-12-29 603 can_reserve = msi_check_reservation_mode(domain, info, dev);
da5dd9e854d2ed Thomas Gleixner 2017-12-29 604
f3b0946d629c8b Marc Zyngier 2016-07-13 605 /*
f3b0946d629c8b Marc Zyngier 2016-07-13 606 * This flag is set by the PCI layer as we need to activate
f3b0946d629c8b Marc Zyngier 2016-07-13 607 * the MSI entries before the PCI layer enables MSI in the
f3b0946d629c8b Marc Zyngier 2016-07-13 608 * card. Otherwise the card latches a random msi message.
f3b0946d629c8b Marc Zyngier 2016-07-13 609 */
da5dd9e854d2ed Thomas Gleixner 2017-12-29 610 if (!(info->flags & MSI_FLAG_ACTIVATE_EARLY))
4c457e8cb75eda Marc Zyngier 2021-01-23 611 goto skip_activate;
f3b0946d629c8b Marc Zyngier 2016-07-13 612
37b5937a105abc Megha Dey 2021-08-26 613 for_each_msi_vector_from(desc, i, dev) {
4c457e8cb75eda Marc Zyngier 2021-01-23 614 if (desc->irq == i) {
4c457e8cb75eda Marc Zyngier 2021-01-23 615 virq = desc->irq;
4c457e8cb75eda Marc Zyngier 2021-01-23 616 dev_dbg(dev, "irq [%d-%d] for MSI\n",
4c457e8cb75eda Marc Zyngier 2021-01-23 617 virq, virq + desc->nvec_used - 1);
4c457e8cb75eda Marc Zyngier 2021-01-23 618 }
4c457e8cb75eda Marc Zyngier 2021-01-23 619 irq_data = irq_domain_get_irq_data(domain, i);
6f1a4891a5928a Thomas Gleixner 2020-01-31 620 if (!can_reserve) {
bc976233a872c0 Thomas Gleixner 2017-12-29 621 irqd_clr_can_reserve(irq_data);
6f1a4891a5928a Thomas Gleixner 2020-01-31 622 if (domain->flags & IRQ_DOMAIN_MSI_NOMASK_QUIRK)
6f1a4891a5928a Thomas Gleixner 2020-01-31 623 irqd_set_msi_nomask_quirk(irq_data);
6f1a4891a5928a Thomas Gleixner 2020-01-31 624 }
bc976233a872c0 Thomas Gleixner 2017-12-29 625 ret = irq_domain_activate_irq(irq_data, can_reserve);
bb9b428a5c832d Thomas Gleixner 2017-09-13 626 if (ret)
bb9b428a5c832d Thomas Gleixner 2017-09-13 627 goto cleanup;
da5dd9e854d2ed Thomas Gleixner 2017-12-29 628 }
da5dd9e854d2ed Thomas Gleixner 2017-12-29 629
4c457e8cb75eda Marc Zyngier 2021-01-23 630 skip_activate:
da5dd9e854d2ed Thomas Gleixner 2017-12-29 631 /*
da5dd9e854d2ed Thomas Gleixner 2017-12-29 632 * If these interrupts use reservation mode, clear the activated bit
da5dd9e854d2ed Thomas Gleixner 2017-12-29 633 * so request_irq() will assign the final vector.
da5dd9e854d2ed Thomas Gleixner 2017-12-29 634 */
da5dd9e854d2ed Thomas Gleixner 2017-12-29 635 if (can_reserve) {
37b5937a105abc Megha Dey 2021-08-26 636 for_each_msi_vector_from(desc, i, dev) {
4c457e8cb75eda Marc Zyngier 2021-01-23 637 irq_data = irq_domain_get_irq_data(domain, i);
22d0b12f3560d3 Thomas Gleixner 2017-09-13 638 irqd_clr_activated(irq_data);
f3b0946d629c8b Marc Zyngier 2016-07-13 639 }
d9109698be6e74 Jiang Liu 2014-11-15 640 }
d9109698be6e74 Jiang Liu 2014-11-15 641 return 0;
bb9b428a5c832d Thomas Gleixner 2017-09-13 642
bb9b428a5c832d Thomas Gleixner 2017-09-13 643 cleanup:
bb9b428a5c832d Thomas Gleixner 2017-09-13 644 msi_domain_free_irqs(domain, dev);
bb9b428a5c832d Thomas Gleixner 2017-09-13 645 return ret;
d9109698be6e74 Jiang Liu 2014-11-15 646 }
d9109698be6e74 Jiang Liu 2014-11-15 647
:::::: The code at line 577 was first introduced by commit
:::::: d9109698be6e7439e6082aa00d79d4556114739b genirq: Introduce msi_domain_alloc/free_irqs()
:::::: TO: Jiang Liu <jiang.liu@...ux.intel.com>
:::::: CC: Thomas Gleixner <tglx@...utronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
Download attachment ".config.gz" of type "application/gzip" (32555 bytes)
Powered by blists - more mailing lists