Re: [PATCH] pci: mediatek: fix warning in msi.h
From: Thomas Gleixner
Date: Sat Oct 31 2020 - 17:49:18 EST
Frank,
On Sat, Oct 31 2020 at 15:03, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@xxxxxxxxxxxxxxx>
>
> 5.10 shows these warnings on bootup while enabling pcie
> at least on bananapi-r2:
>
> [ 6.161730] WARNING: CPU: 2 PID: 73 at include/linux/msi.h:213 pci_msi_setup_
> msi_irqs.constprop.0+0x78/0x80
> ....
> [ 6.724607] WARNING: CPU: 2 PID: 73 at include/linux/msi.h:219 free_msi_irqs+
>
> fix this by selecting PCI_MSI_ARCH_FALLBACKS for MTK PCIe driver
That's not a fix. It's just supressing the warning.
PCI_MSI_ARCH_FALLBACKS is only valid for
1) Architectures which implement the fallbacks
2) Outdated PCI controller drivers on architectures without #1 which
implement the deprecated msi_controller mechanism. That is handled
in the weak arch fallback implementation.
The mediatek PCIE driver does not qualify for #2. It's purely irq domain
based.
So there is something else going wrong. The PCI device which tries to
allocate MSIs does not have an irq domain associated which makes it run
into that warning.
If you enable PCI_MSI_ARCH_FALLBACKS then the MSI allocation fails
silently. So it's just papering over the underlying problem.
So it needs to be figured out why the domain association is not there.
Thanks,
tglx