Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdbe2495 authored by Marc Zyngier's avatar Marc Zyngier Committed by Tony Truong
Browse files

PCI/MSI: Only use the generic MSI layer when domain is hierarchical



Since d8a1cb757550 ("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: d8a1cb757550 ("PCI/MSI: Let pci_msi_get_domain use struct device::msi_domain")
Reported-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Tested-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
Acked-by: default avatarThomas Gleixner <tglx@linutronix.de>
CC: stable@vger.kernel.org	# v4.3+
Git-commit: 3845d2953aacf00ad069806ba8d1495675069f23
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: I494946292e11a244d26f49962be79c5f4ac70aa6
Signed-off-by: default avatarTony Truong <truong@codeaurora.org>
parent 0c3a23a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment