Re: Aw: Re: [PATCH] pci: mediatek: fix warning in msi.h
From: Thomas Gleixner
Date: Tue Nov 03 2020 - 05:31:23 EST
On Tue, Nov 03 2020 at 09:54, Marc Zyngier wrote:
> On 2020-11-02 22:18, Thomas Gleixner wrote:
>> So we really need some other solution and removing the warning is not
>> an option. If MSI is enabled then we want to get a warning when a PCI
>> device has no MSI domain associated. Explicitly expressing the PCIE
>> brigde misfeature of not supporting MSI is way better than silently
>> returning an error code which is swallowed anyway.
>
> I don't disagree here, though the PCI_MSI_ARCH_FALLBACKS mechanism
> makes it more difficult to establish.
Only for the few leftovers which implement msi_controller, i.e.
drivers/pci/controller/pci-hyperv.c
drivers/pci/controller/pci-tegra.c
drivers/pci/controller/pcie-rcar-host.c
drivers/pci/controller/pcie-xilinx.c
The architectures which select PCI_MSI_ARCH_FALLBACKS are:
arch/ia64/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/mips/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/powerpc/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/s390/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
arch/sparc/Kconfig: select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
implement arch_setup_msi_irq() which makes it magically work :)
>> Whatever the preferred way is via flags at host probe time or flagging
>> it post probe I don't care much as long as it is consistent.
>
> Host probe time is going to require some changes in the core PCI api,
> as everything that checks for a MSI domain is based on the pci_bus
> structure, which is only allocated much later.
Yeah, it's nasty. One possible solution is to add flags or a callback to
pci_ops, but it's not pretty either.
I think we should go with the 'mark it after pci_host_probe()' hack for
5.10-rc. The real fix will be larger and go into 5.11.
Thoughts?
Thanks,
tglx