]> git.baikalelectronics.ru Git - kernel.git/commit
PCI/MSI: Only use the generic MSI layer when domain is hierarchical
authorMarc Zyngier <marc.zyngier@arm.com>
Fri, 4 Dec 2015 16:28:14 +0000 (10:28 -0600)
committerBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Dec 2015 16:28:14 +0000 (10:28 -0600)
commit5d2cbb9ba520d31cc39c895b4e17abaa25d49ed9
treee4a59cf0a6466c449ebbf58ba2da95474cd63237
parent75e6d7cbe09739d91db6555b95993bcfe417d1a3
PCI/MSI: Only use the generic MSI layer when domain is hierarchical

Since f105fcd856fa ("PCI/MSI: Let pci_msi_get_domain use struct
device::msi_domain"), we use the MSI domain associated with the PCI device.

But finding an MSI domain doesn't mean that the domain is implemented using
the generic MSI domain API, and a number of MSI controllers are still using
arch_setup_msi_irq() and arch_teardown_msi_irqs().

Check that the domain we just obtained is hierarchical.  If it is, we can
use the new generic MSI stuff.  Otherwise we have to fall back to the old
arch_setup_msi_irq() and arch_teardown_msi_irqs() interfaces.

This avoids an oops in msi_domain_alloc_irqs() on systems with R-Car,
Tegra, Armada 370, and probably other DesignWare-based host controllers.

Fixes: f105fcd856fa ("PCI/MSI: Let pci_msi_get_domain use struct device::msi_domain")
Reported-by: Phil Edworthy <phil.edworthy@renesas.com>
Tested-by: Phil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
CC: stable@vger.kernel.org # v4.3+
drivers/pci/msi.c