[PATCH] PCI/MSI: mvebu: Re-enable arch fallbacks

Marc Zyngier maz at kernel.org
Wed Mar 16 04:37:14 PDT 2022


On 2022-03-16 09:33, Domenico Andreoli wrote:
> From: Domenico Andreoli <domenico.andreoli at linux.com>
> 
> Since v5.10, my QNAP happily barks at boot as follows (5.17.0-rc8):
> 
> [    0.923811] ------------[ cut here ]------------
> [    0.928458] WARNING: CPU: 0 PID: 1 at drivers/pci/msi/msi.h:17
> pci_msi_setup_msi_irqs+0x54/0x6c
> [    0.937219] Modules linked in:
> [    0.940290] CPU: 0 PID: 1 Comm: swapper Not tainted 
> 5.17.0-rc8-marvell #6
> [    0.947117] Hardware name: Marvell Kirkwood (Flattened Device Tree)
> [    0.953428]  unwind_backtrace from show_stack+0x10/0x14
> [    0.958698]  show_stack from __warn+0xac/0xe4
> [    0.963093]  __warn from warn_slowpath_fmt+0x68/0x80
> [    0.968098]  warn_slowpath_fmt from pci_msi_setup_msi_irqs+0x54/0x6c
> [    0.974499]  pci_msi_setup_msi_irqs from 
> __pci_enable_msi_range+0x260/0x340
> [    0.981509]  __pci_enable_msi_range from
> pci_alloc_irq_vectors_affinity+0xb8/0xf8
> [    0.989043]  pci_alloc_irq_vectors_affinity from 
> xhci_run+0x164/0x474
> [    0.995532]  xhci_run from usb_add_hcd+0x444/0x6e0
> [    1.000362]  usb_add_hcd from usb_hcd_pci_probe+0x30c/0x37c
> [    1.005979]  usb_hcd_pci_probe from xhci_pci_probe+0x10/0xec
> [    1.011689]  xhci_pci_probe from pci_device_probe+0x74/0xe8
> [    1.017305]  pci_device_probe from really_probe+0x1c0/0x3f8
> [    1.022921]  really_probe from driver_probe_device+0x30/0xb0
> [    1.028623]  driver_probe_device from __driver_attach+0x11c/0x148
> [    1.034762]  __driver_attach from bus_for_each_dev+0x54/0x78
> [    1.040466]  bus_for_each_dev from bus_add_driver+0x170/0x1d8
> [    1.046256]  bus_add_driver from driver_register+0xac/0xf0
> [    1.051783]  driver_register from do_one_initcall+0x74/0x1b8
> [    1.057495]  do_one_initcall from kernel_init_freeable+0x1a8/0x1ec
> [    1.063723]  kernel_init_freeable from kernel_init+0x10/0x108
> [    1.069514]  kernel_init from ret_from_fork+0x14/0x3c
> [    1.074604] Exception stack(0xc1835fb0 to 0xc1835ff8)
> [    1.079691] 5fa0:                                     00000000
> 00000000 00000000 00000000
> [    1.087915] 5fc0: 00000000 00000000 00000000 00000000 00000000
> 00000000 00000000 00000000
> [    1.096136] 5fe0: 00000000 00000000 00000000 00000000 00000013 
> 00000000
> [    1.102787] ---[ end trace 0000000000000000 ]---
> [    1.107435] ------------[ cut here ]------------
> 
> 
> I bisected it down to commit 077ee78e392869e46ae (PCI/MSI: Make
> arch_.*_msi_irq[s] fallbacks selectable).
> 
> Re-enabling PCI/MSI arch fallbacks restores a clean bootlog.
> 
> Cc: Thomas Gleixner <tglx at linutronix.de>
> Cc: linux-arm-kernel at lists.infradead.org
> Signed-off-by: Domenico Andreoli <domenico.andreoli at linux.com>
> 
> ---
>  arch/arm/mach-mvebu/Kconfig |    1 +
>  1 file changed, 1 insertion(+)
> 
> Index: b/arch/arm/mach-mvebu/Kconfig
> ===================================================================
> --- a/arch/arm/mach-mvebu/Kconfig
> +++ b/arch/arm/mach-mvebu/Kconfig
> @@ -123,6 +123,7 @@ config MACH_KIRKWOOD
>  	select ORION_IRQCHIP
>  	select ORION_TIMER
>  	select FORCE_PCI
> +	select PCI_MSI_ARCH_FALLBACKS if PCI_MSI
>  	select PCI_QUIRKS
>  	select PINCTRL_KIRKWOOD
>  	help

This really is papering over the real issue, which probably is
that the platform *doesn't* support MSIs, and yet the PCI
controller driver doesn't advertises that.

See 645e9c38383d ("PCI: mediatek: Advertise lack of built-in MSI
handling") for an example of how to fix your PCI controller driver.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...



More information about the linux-arm-kernel mailing list