summaryrefslogtreecommitdiffstats
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorBjorn Helgaas <bhelgaas@google.com>2016-03-15 14:56:16 +0100
committerBjorn Helgaas <bhelgaas@google.com>2016-03-15 14:56:16 +0100
commitcfeb8139a1fbbbae3f1e986133f4e9e7833eeac4 (patch)
tree0f3a162561d9a64cf4f509fb516f2d58f70530d9 /drivers/pci/probe.c
parentMerge branch 'pci/host-designware' into next (diff)
parentPCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs (diff)
downloadlinux-cfeb8139a1fbbbae3f1e986133f4e9e7833eeac4.tar.xz
linux-cfeb8139a1fbbbae3f1e986133f4e9e7833eeac4.zip
Merge branch 'pci/host-hv' into next
* pci/host-hv: PCI: hv: Add paravirtual PCI front-end for Microsoft Hyper-V VMs PCI: Look up IRQ domain by fwnode_handle PCI: Add fwnode_handle to x86 pci_sysdata
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index b23449902a17..c4e1eff8b07c 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -15,6 +15,7 @@
#include <linux/pci-aspm.h>
#include <linux/aer.h>
#include <linux/acpi.h>
+#include <linux/irqdomain.h>
#include "pci.h"
#define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */
@@ -674,6 +675,20 @@ static struct irq_domain *pci_host_bridge_msi_domain(struct pci_bus *bus)
if (!d)
d = pci_host_bridge_acpi_msi_domain(bus);
+#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
+ /*
+ * If no IRQ domain was found via the OF tree, try looking it up
+ * directly through the fwnode_handle.
+ */
+ if (!d) {
+ struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
+
+ if (fwnode)
+ d = irq_find_matching_fwnode(fwnode,
+ DOMAIN_BUS_PCI_MSI);
+ }
+#endif
+
return d;
}