Skip to contentSkip to conversation

pci: tegra: add MSI dependency

PATCH Applied Arnd Bergmann 3 participants 6 messages Mar 13, 2018 – Mar 14, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: tegra: add MSI dependency

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)
drivers/pci/host/Kconfig +1 -0
index 1fcdc890acc7..65b4afb8d11d 100644
@@ -38,6 +38,7 @@ config PCI_FTPCI100
 config PCI_TEGRA
 	bool "NVIDIA Tegra PCIe controller"
 	depends on ARCH_TEGRA && MMU
+	depends on PCI_MSI_IRQ_DOMAIN
 	help
 	  Say Y here if you want support for the PCIe host controller found
 	  on NVIDIA Tegra SoCs.
Signature · 1 line
2.9.0
#1 lore raw
Quoted 6 lines · Arnd Bergmann

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

Quoted 6 lines

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Applied to pci/host/misc for v4.17, thanks.

Lorenzo

Quoted 15 lines
drivers/pci/host/Kconfig +1 -0
index 1fcdc890acc7..65b4afb8d11d 100644
@@ -38,6 +38,7 @@ config PCI_FTPCI100
 config PCI_TEGRA
 	bool "NVIDIA Tegra PCIe controller"
 	depends on ARCH_TEGRA && MMU
+	depends on PCI_MSI_IRQ_DOMAIN
 	help
 	  Say Y here if you want support for the PCIe host controller found
 	  on NVIDIA Tegra SoCs.
Signature · 1 line
2.9.0
#2 lore raw
In reply to Arnd Bergmann
Quoted 6 lines · Arnd Bergmann

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

Quoted 6 lines

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

I'm slightly concerned about the dependency. Not that I doubt its correctness, but because it could mean that PCI_TEGRA is not visible in the default configuration. The only reason why it is currently visible is because PCI_MSI is selected by some symbols that also happen to be enabled. However, what if at some point those symbols are disabled or removed?

Some architectures make sure that PCI_MSI is enabled by selecting it, but that's risky, isn't it, because PCI_MSI is user-visible and could therefore easily lead to conflicts.

Enabling PCI_MSI in the arm64 defconfig would solve the issue and is good enough for me. I've got a couple of changes to that defconfig in the Tegra tree for v4.17-rc1, I can add a patch to enable PCI_MSI.

Unless there are any objections.

Thierry

#3 lore raw
Quoted 25 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

Quoted 6 lines

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

I'm slightly concerned about the dependency. Not that I doubt its correctness, but because it could mean that PCI_TEGRA is not visible in the default configuration. The only reason why it is currently visible is because PCI_MSI is selected by some symbols that also happen to be enabled. However, what if at some point those symbols are disabled or removed?

Some architectures make sure that PCI_MSI is enabled by selecting it, but that's risky, isn't it, because PCI_MSI is user-visible and could therefore easily lead to conflicts.

Quoted 5 lines

Enabling PCI_MSI in the arm64 defconfig would solve the issue and is good enough for me. I've got a couple of changes to that defconfig in the Tegra tree for v4.17-rc1, I can add a patch to enable PCI_MSI.

Unless there are any objections.

I looked at it again and found that this on ARM64, PCI_MSI is always selected indirectly by ARM_GIC&&PCI, so there is no problem.

The build failure must have been on 32-bit ARM.

Arnd

#4 lore raw
Quoted 31 lines · Arnd Bergmann
Quoted 29 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

Quoted 6 lines

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

I'm slightly concerned about the dependency. Not that I doubt its correctness, but because it could mean that PCI_TEGRA is not visible in the default configuration. The only reason why it is currently visible is because PCI_MSI is selected by some symbols that also happen to be enabled. However, what if at some point those symbols are disabled or removed?

Some architectures make sure that PCI_MSI is enabled by selecting it, but that's risky, isn't it, because PCI_MSI is user-visible and could therefore easily lead to conflicts.

Enabling PCI_MSI in the arm64 defconfig would solve the issue and is good enough for me. I've got a couple of changes to that defconfig in the Tegra tree for v4.17-rc1, I can add a patch to enable PCI_MSI.

Quoted 6 lines
Quoted 1 line

Unless there are any objections.

I looked at it again and found that this on ARM64, PCI_MSI is always selected indirectly by ARM_GIC&&PCI, so there is no problem.

The build failure must have been on 32-bit ARM.

Okay, I had assumed that ARM_GIC_V2M (which selects PCI_MSI) was user- visible and hence could be disabled. But it's not, and always enabled on ARM64. On 32-bit we already explicitly enable PCI_MSI via the default configurations.

I withdraw my concerns. I see that Lorenzo already applied the patch, so just for the record:

#5 lore raw
Quoted 39 lines · Thierry Reding
Quoted 31 lines · Arnd Bergmann
Quoted 29 lines · Thierry Reding
Quoted 6 lines · Arnd Bergmann

Building the tegra PCIe host driver without MSI results in a link failure:

drivers/pci/host/pci-tegra.o:(.data+0x70): undefined reference to pci_msi_unmask_irq' drivers/pci/host/pci-tegra.o:(.data+0x74): undefined reference to pci_msi_mask_irq'

Quoted 6 lines

This adds the same dependency that everyone else uses.

---
 drivers/pci/host/Kconfig | 1 +
 1 file changed, 1 insertion(+)

I'm slightly concerned about the dependency. Not that I doubt its correctness, but because it could mean that PCI_TEGRA is not visible in the default configuration. The only reason why it is currently visible is because PCI_MSI is selected by some symbols that also happen to be enabled. However, what if at some point those symbols are disabled or removed?

Some architectures make sure that PCI_MSI is enabled by selecting it, but that's risky, isn't it, because PCI_MSI is user-visible and could therefore easily lead to conflicts.

Enabling PCI_MSI in the arm64 defconfig would solve the issue and is good enough for me. I've got a couple of changes to that defconfig in the Tegra tree for v4.17-rc1, I can add a patch to enable PCI_MSI.

Quoted 6 lines
Quoted 1 line

Unless there are any objections.

I looked at it again and found that this on ARM64, PCI_MSI is always selected indirectly by ARM_GIC&&PCI, so there is no problem.

The build failure must have been on 32-bit ARM.

Quoted 7 lines

Okay, I had assumed that ARM_GIC_V2M (which selects PCI_MSI) was user- visible and hence could be disabled. But it's not, and always enabled on ARM64. On 32-bit we already explicitly enable PCI_MSI via the default configurations.

I withdraw my concerns. I see that Lorenzo already applied the patch, so just for the record:

Apologies - it fixed an issue and it seemed harmless hence I applied it straight away, I should have waited for an ACK.

Quoted 1 line

Updated - it is important to keep records, that's what tags are for.

Thanks,
Lorenzo