PCI: iproc: fix msi driver selection
Subsystems (2)
PATCH 1/1 PCI: iproc: fix msi driver selection
The newly added MSI support for iproc causes a link error when its Kconfig option is disabled:
ERROR: "iproc_msi_exit" [drivers/pci/host/pcie-iproc.ko] undefined!
ERROR: "iproc_msi_init" [drivers/pci/host/pcie-iproc.ko] undefined!
This changes the header file so we use stub functions whenever the driver is not built, even when CONFIG_MSI is enabled.
As the Kconfig logic for the driver is a bit off, I'm rectifying that as well, by making it depend on the specific drivers that call into the driver, and moving the option behind those instead of before them.
---
Found on ARM randconfig builds a couple of days ago
drivers/pci/host/Kconfig +10 -9
@@ -124,15 +124,6 @@ config PCIE_IPROC iProc family of SoCs. An appropriate bus interface driver needs to be enabled to select this. -config PCIE_IPROC_MSI - bool "Broadcom iProc PCIe MSI support" - depends on ARCH_BCM_IPROC && PCI_MSI - select PCI_MSI_IRQ_DOMAIN - default ARCH_BCM_IPROC - help - Say Y here if you want to enable MSI support for Broadcom's iProc - PCIe controller - config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST)
@@ -154,6 +145,16 @@ config PCIE_IPROC_BCMA Say Y here if you want to use the Broadcom iProc PCIe controller through the BCMA bus interface +config PCIE_IPROC_MSI + bool "Broadcom iProc PCIe MSI support" + depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA + depends on PCI_MSI + select PCI_MSI_IRQ_DOMAIN + default ARCH_BCM_IPROC + help + Say Y here if you want to enable MSI support for Broadcom's iProc + PCIe controller + config PCIE_ALTERA bool "Altera PCIe controller" depends on ARM || NIOS2
drivers/pci/host/pcie-iproc.h +1 -1
@@ -79,7 +79,7 @@ struct iproc_pcie {int iproc_pcie_setup (struct iproc_pcie *pcie,struct list_head *res);int iproc_pcie_remove (struct iproc_pcie *pcie); -#ifdef CONFIG_PCI_MSI +#ifdef CONFIG_PCIE_IPROC_MSI int iproc_msi_init (struct iproc_pcie *pcie,struct device_node *node);void iproc_msi_exit (struct iproc_pcie *pcie);#else
Hi Arnd,
Quoted 24 lines · Arnd Bergmann
The newly added MSI support for iproc causes a link error when its
Kconfigoption is disabled:ERROR: "
iproc_msi_exit" [drivers/pci/host/pcie-iproc.ko] undefined!
ERROR: "iproc_msi_init" [drivers/pci/host/pcie-iproc.ko] undefined!This changes the header file so we use stub functions whenever the driver is not built, even when
CONFIG_MSIis enabled.As the
Kconfiglogic for the driver is a bit off, I'm rectifying that as well, by making it depend on the specific drivers that call into the driver, and moving the option behind those instead of before them.Signed-off-by Arnd Bergmann <[email protected]>Fixes 610894347cbf ("PCI: iproc: Add iProc PCIe MSI support")---
Found on ARM randconfig builds a couple of days agodrivers/pci/host/Kconfig +0
-0
drivers/pci/host/Kconfig config PCIE_IPROC · line 126
Quoted 3 lines
drivers/pci/host/Kconfig +0
-0@@ -124,15 +124,6 @@ config PCIE_IPROC iProc family of SoCs. An appropriate bus interface driver needs to be enabled to select this.
I was actually not aware of the change that makes PCIE_IPROC hidden and selected by the bus drivers. But I know, :)
Quoted 36 lines
drivers/pci/host/Kconfig +10
-9-config PCIE_IPROC_MSI - bool "Broadcom iProc PCIe MSI support" - depends on ARCH_BCM_IPROC && PCI_MSI - select PCI_MSI_IRQ_DOMAIN - default ARCH_BCM_IPROC - help - Say Y here if you want to enable MSI support for Broadcom's iProc - PCIe controller - config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST)@@ -154,6 +145,16 @@ config PCIE_IPROC_BCMA Say Y here if you want to use the Broadcom iProc PCIe controller through the BCMA bus interface +config PCIE_IPROC_MSI + bool "Broadcom iProc PCIe MSI support" + depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA + depends on PCI_MSI + select PCI_MSI_IRQ_DOMAIN + default ARCH_BCM_IPROC + help + Say Y here if you want to enable MSI support for Broadcom's iProc + PCIe controller + config PCIE_ALTERA bool "Altera PCIe controller" depends on ARM || NIOS2drivers/pci/host/pcie-iproc.h +0
-0
drivers/pci/host/pcie-iproc.h struct iproc_pcie { · line 85
Quoted 8 lines
drivers/pci/host/pcie-iproc.h +1
-1@@ -79,7 +79,7 @@ struct iproc_pcie {int iproc_pcie_setup (struct iproc_pcie *pcie,struct list_head *res);int iproc_pcie_remove (struct iproc_pcie *pcie); -#ifdef CONFIG_PCI_MSI +#ifdef CONFIG_PCIE_IPROC_MSI int iproc_msi_init (struct iproc_pcie *pcie,struct device_node *node);void iproc_msi_exit (struct iproc_pcie *pcie);#else
This fix looks good to me. Thanks!
Ray
Quoted 9 lines · Arnd Bergmann
The newly added MSI support for iproc causes a link error when its
Kconfigoption is disabled:ERROR: "
iproc_msi_exit" [drivers/pci/host/pcie-iproc.ko] undefined!
ERROR: "iproc_msi_init" [drivers/pci/host/pcie-iproc.ko] undefined!This changes the header file so we use stub functions whenever the driver is not built, even when
CONFIG_MSIis enabled.
Quoted 7 lines
As the
Kconfiglogic for the driver is a bit off, I'm rectifying that as well, by making it depend on the specific drivers that call into the driver, and moving the option behind those instead of before them.Signed-off-by Arnd Bergmann <[email protected]>Fixes 610894347cbf ("PCI: iproc: Add iProc PCIe MSI support")
Applied with Ray's Reviewed-by to pci/host-iproc for v4.5, thanks!
Actually, since 610894347cbf hasn't been merged upstream yet, I just squashed this fix into it and updated "pci/host-iproc" and "next".
Quoted 58 lines
---
Found on ARM randconfig builds a couple of days agodrivers/pci/host/Kconfig +10
-9@@ -124,15 +124,6 @@ config PCIE_IPROC iProc family of SoCs. An appropriate bus interface driver needs to be enabled to select this. -config PCIE_IPROC_MSI - bool "Broadcom iProc PCIe MSI support" - depends on ARCH_BCM_IPROC && PCI_MSI - select PCI_MSI_IRQ_DOMAIN - default ARCH_BCM_IPROC - help - Say Y here if you want to enable MSI support for Broadcom's iProc - PCIe controller - config PCIE_IPROC_PLATFORM tristate "Broadcom iProc PCIe platform bus driver" depends on ARCH_BCM_IPROC || (ARM && COMPILE_TEST)@@ -154,6 +145,16 @@ config PCIE_IPROC_BCMA Say Y here if you want to use the Broadcom iProc PCIe controller through the BCMA bus interface +config PCIE_IPROC_MSI + bool "Broadcom iProc PCIe MSI support" + depends on PCIE_IPROC_PLATFORM || PCIE_IPROC_BCMA + depends on PCI_MSI + select PCI_MSI_IRQ_DOMAIN + default ARCH_BCM_IPROC + help + Say Y here if you want to enable MSI support for Broadcom's iProc + PCIe controller + config PCIE_ALTERA bool "Altera PCIe controller" depends on ARM || NIOS2drivers/pci/host/pcie-iproc.h +1
-2@@ -79,7 +79,7 @@ struct iproc_pcie {int iproc_pcie_setup (struct iproc_pcie *pcie,struct list_head *res);int iproc_pcie_remove (struct iproc_pcie *pcie); -#ifdef CONFIG_PCI_MSI +#ifdef CONFIG_PCIE_IPROC_MSI int iproc_msi_init (struct iproc_pcie *pcie,struct device_node *node);void iproc_msi_exit (struct iproc_pcie *pcie);#else --To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html