All of lore.kernel.org
 help / color / mirror / Atom feed
* [stable:linux-4.19.y 7623/9999] drivers/pci/msi.c:175:42: error: 'struct device' has no member named 'msi_lock'
@ 2023-06-01  0:44 kernel test robot
  2023-06-01  7:34 ` Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2023-06-01  0:44 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: oe-kbuild-all, Sasha Levin, Marc Zyngier, Greg Kroah-Hartman

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
head:   a8b7a32a3427d592a38cb0ed9c33088d44c82840
commit: 3c9534778d4cc2bd01e20d4dcffc55df0962aa12 [7623/9999] PCI/MSI: Protect msi_desc::masked for multi-MSI
config: powerpc-randconfig-r032-20230531 (https://download.01.org/0day-ci/archive/20230601/202306010832.aoPNj3I5-lkp@intel.com/config)
compiler: powerpc-linux-gcc (GCC) 12.3.0
reproduce (this is a W=1 build):
        mkdir -p ~/bin
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=3c9534778d4cc2bd01e20d4dcffc55df0962aa12
        git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
        git fetch --no-tags stable linux-4.19.y
        git checkout 3c9534778d4cc2bd01e20d4dcffc55df0962aa12
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/pci/

If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202306010832.aoPNj3I5-lkp@intel.com/

All errors (new ones prefixed by >>):

   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:142:17: note: in expansion of macro 'for_each_pci_msi_entry'
     142 |                 for_each_pci_msi_entry(entry, dev) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/compiler.h:396:23: note: in definition of macro '__compiletime_assert'
     396 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler.h:416:9: note: in expansion of macro '_compiletime_assert'
     416 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
      45 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |         ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:27: note: in expansion of macro '__same_type'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |                           ^~~~~~~~~~~
   include/linux/list.h:396:9: note: in expansion of macro 'container_of'
     396 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:407:9: note: in expansion of macro 'list_entry'
     407 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:494:20: note: in expansion of macro 'list_first_entry'
     494 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
         |                    ^~~~~~~~~~~~~~~~
   include/linux/msi.h:118:9: note: in expansion of macro 'list_for_each_entry'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:142:17: note: in expansion of macro 'for_each_pci_msi_entry'
     142 |                 for_each_pci_msi_entry(entry, dev) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/compiler.h:396:23: note: in definition of macro '__compiletime_assert'
     396 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler.h:416:9: note: in expansion of macro '_compiletime_assert'
     416 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
      45 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |         ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:999:27: note: in expansion of macro '__same_type'
     999 |                          !__same_type(*(ptr), void),                    \
         |                           ^~~~~~~~~~~
   include/linux/list.h:396:9: note: in expansion of macro 'container_of'
     396 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:407:9: note: in expansion of macro 'list_entry'
     407 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:494:20: note: in expansion of macro 'list_first_entry'
     494 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
         |                    ^~~~~~~~~~~~~~~~
   include/linux/msi.h:118:9: note: in expansion of macro 'list_for_each_entry'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:142:17: note: in expansion of macro 'for_each_pci_msi_entry'
     142 |                 for_each_pci_msi_entry(entry, dev) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/list.h:495:31: note: in definition of macro 'list_for_each_entry'
     495 |              &pos->member != (head);                                    \
         |                               ^~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:142:17: note: in expansion of macro 'for_each_pci_msi_entry'
     142 |                 for_each_pci_msi_entry(entry, dev) {
         |                 ^~~~~~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c: In function '__pci_msi_desc_mask_irq':
>> drivers/pci/msi.c:175:42: error: 'struct device' has no member named 'msi_lock'
     175 |         raw_spinlock_t *lock = &desc->dev->msi_lock;
         |                                          ^~
   drivers/pci/msi.c: In function 'default_restore_msi_irqs':
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/kernel.h:997:33: note: in definition of macro 'container_of'
     997 |         void *__mptr = (void *)(ptr);                                   \
         |                                 ^~~
   include/linux/list.h:407:9: note: in expansion of macro 'list_entry'
     407 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:494:20: note: in expansion of macro 'list_first_entry'
     494 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
         |                    ^~~~~~~~~~~~~~~~
   include/linux/msi.h:118:9: note: in expansion of macro 'list_for_each_entry'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:264:9: note: in expansion of macro 'for_each_pci_msi_entry'
     264 |         for_each_pci_msi_entry(entry, dev)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/compiler.h:396:23: note: in definition of macro '__compiletime_assert'
     396 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler.h:416:9: note: in expansion of macro '_compiletime_assert'
     416 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
      45 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |         ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:27: note: in expansion of macro '__same_type'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |                           ^~~~~~~~~~~
   include/linux/list.h:396:9: note: in expansion of macro 'container_of'
     396 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:407:9: note: in expansion of macro 'list_entry'
     407 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:494:20: note: in expansion of macro 'list_first_entry'
     494 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
         |                    ^~~~~~~~~~~~~~~~
   include/linux/msi.h:118:9: note: in expansion of macro 'list_for_each_entry'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
     131 |         for_each_msi_entry((desc), &(pdev)->dev)
         |         ^~~~~~~~~~~~~~~~~~
   drivers/pci/msi.c:264:9: note: in expansion of macro 'for_each_pci_msi_entry'
     264 |         for_each_pci_msi_entry(entry, dev)
         |         ^~~~~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:114:48: error: 'struct device' has no member named 'msi_list'
     114 | #define dev_to_msi_list(dev)            (&(dev)->msi_list)
         |                                                ^~
   include/linux/compiler.h:396:23: note: in definition of macro '__compiletime_assert'
     396 |                 if (!(condition))                                       \
         |                       ^~~~~~~~~
   include/linux/compiler.h:416:9: note: in expansion of macro '_compiletime_assert'
     416 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/build_bug.h:45:37: note: in expansion of macro 'compiletime_assert'
      45 | #define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
         |                                     ^~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:998:9: note: in expansion of macro 'BUILD_BUG_ON_MSG'
     998 |         BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) &&   \
         |         ^~~~~~~~~~~~~~~~
   include/linux/kernel.h:999:27: note: in expansion of macro '__same_type'
     999 |                          !__same_type(*(ptr), void),                    \
         |                           ^~~~~~~~~~~
   include/linux/list.h:396:9: note: in expansion of macro 'container_of'
     396 |         container_of(ptr, type, member)
         |         ^~~~~~~~~~~~
   include/linux/list.h:407:9: note: in expansion of macro 'list_entry'
     407 |         list_entry((ptr)->next, type, member)
         |         ^~~~~~~~~~
   include/linux/list.h:494:20: note: in expansion of macro 'list_first_entry'
     494 |         for (pos = list_first_entry(head, typeof(*pos), member);        \
         |                    ^~~~~~~~~~~~~~~~
   include/linux/msi.h:118:9: note: in expansion of macro 'list_for_each_entry'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |         ^~~~~~~~~~~~~~~~~~~
   include/linux/msi.h:118:37: note: in expansion of macro 'dev_to_msi_list'
     118 |         list_for_each_entry((desc), dev_to_msi_list((dev)), list)
         |                                     ^~~~~~~~~~~~~~~
   include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PCI_MSI
   Depends on [n]: PCI [=n]
   Selected by [y]:
   - KILAUEA [=y] && 40x [=y]
   WARNING: unmet direct dependencies detected for PPC4xx_PCI_EXPRESS
   Depends on [n]: PCI [=n] && 4xx [=y]
   Selected by [y]:
   - KILAUEA [=y] && 40x [=y]
   WARNING: unmet direct dependencies detected for PPC4xx_MSI
   Depends on [n]: PCI_MSI [=y] && PCI [=n] && 4xx [=y]
   Selected by [y]:
   - KILAUEA [=y] && 40x [=y]


vim +175 drivers/pci/msi.c

   135	
   136	static void default_restore_msi_irq(struct pci_dev *dev, int irq)
   137	{
   138		struct msi_desc *entry;
   139	
   140		entry = NULL;
   141		if (dev->msix_enabled) {
 > 142			for_each_pci_msi_entry(entry, dev) {
   143				if (irq == entry->irq)
   144					break;
   145			}
   146		} else if (dev->msi_enabled)  {
   147			entry = irq_get_msi_desc(irq);
   148		}
   149	
   150		if (entry)
   151			__pci_write_msi_msg(entry, &entry->msg);
   152	}
   153	
   154	void __weak arch_restore_msi_irqs(struct pci_dev *dev)
   155	{
   156		return default_restore_msi_irqs(dev);
   157	}
   158	
   159	static inline __attribute_const__ u32 msi_mask(unsigned x)
   160	{
   161		/* Don't shift by >= width of type */
   162		if (x >= 5)
   163			return 0xffffffff;
   164		return (1 << (1 << x)) - 1;
   165	}
   166	
   167	/*
   168	 * PCI 2.3 does not specify mask bits for each MSI interrupt.  Attempting to
   169	 * mask all MSI interrupts by clearing the MSI enable bit does not work
   170	 * reliably as devices without an INTx disable bit will then generate a
   171	 * level IRQ which will never be cleared.
   172	 */
   173	void __pci_msi_desc_mask_irq(struct msi_desc *desc, u32 mask, u32 flag)
   174	{
 > 175		raw_spinlock_t *lock = &desc->dev->msi_lock;
   176		unsigned long flags;
   177	
   178		if (pci_msi_ignore_mask || !desc->msi_attrib.maskbit)
   179			return;
   180	
   181		raw_spin_lock_irqsave(lock, flags);
   182		desc->masked &= ~mask;
   183		desc->masked |= flag;
   184		pci_write_config_dword(msi_desc_to_pci_dev(desc), desc->mask_pos,
   185				       desc->masked);
   186		raw_spin_unlock_irqrestore(lock, flags);
   187	}
   188	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [stable:linux-4.19.y 7623/9999] drivers/pci/msi.c:175:42: error: 'struct device' has no member named 'msi_lock'
  2023-06-01  0:44 [stable:linux-4.19.y 7623/9999] drivers/pci/msi.c:175:42: error: 'struct device' has no member named 'msi_lock' kernel test robot
@ 2023-06-01  7:34 ` Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2023-06-01  7:34 UTC (permalink / raw)
  To: kernel test robot
  Cc: oe-kbuild-all, Sasha Levin, Marc Zyngier, Greg Kroah-Hartman

On Thu, Jun 01 2023 at 08:44, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-4.19.y
> head:   a8b7a32a3427d592a38cb0ed9c33088d44c82840
> commit: 3c9534778d4cc2bd01e20d4dcffc55df0962aa12 [7623/9999] PCI/MSI: Protect msi_desc::masked for multi-MSI
> config: powerpc-randconfig-r032-20230531 (https://download.01.org/0day-ci/archive/20230601/202306010832.aoPNj3I5-lkp@intel.com/config)
> compiler: powerpc-linux-gcc (GCC) 12.3.0
> reproduce (this is a W=1 build):
>         mkdir -p ~/bin
>         wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=3c9534778d4cc2bd01e20d4dcffc55df0962aa12
>         git remote add stable https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
>         git fetch --no-tags stable linux-4.19.y
>         git checkout 3c9534778d4cc2bd01e20d4dcffc55df0962aa12
>         # save the config file
>         mkdir build_dir && cp config build_dir/.config
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc olddefconfig
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.3.0 ~/bin/make.cross W=1 O=build_dir ARCH=powerpc SHELL=/bin/bash drivers/pci/
>
> If you fix the issue, kindly add following tag where applicable
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202306010832.aoPNj3I5-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>    include/linux/msi.h:131:9: note: in expansion of macro 'for_each_msi_entry'
>      131 |         for_each_msi_entry((desc), &(pdev)->dev)
>          |         ^~~~~~~~~~~~~~~~~~

# CONFIG_PCI is not set
CONFIG_PCI_MSI=y

PCI_MSI depends on PCI but there are quite some places in Kconfigs which
select PCI_MSI independent of PCI

Not sure what to do about that.

Thanks

        tglx

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-06-01  7:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-01  0:44 [stable:linux-4.19.y 7623/9999] drivers/pci/msi.c:175:42: error: 'struct device' has no member named 'msi_lock' kernel test robot
2023-06-01  7:34 ` Thomas Gleixner

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.