diff mbox

[kernel,v4,2/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if MSI controller enables IRQ remapping

Message ID 20170630052436.15212-3-aik@ozlabs.ru (mailing list archive)
State New, archived
Headers show

Commit Message

Alexey Kardashevskiy June 30, 2017, 5:24 a.m. UTC
This sets PCI_BUS_FLAGS_MSI_REMAP to a bus if MSI remapping is an IRQ
domain is capable of MSI remapping.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v4:
* dropped pci_bus_msi_isolated() which looked for (never pushed out)
MSI_FLAG_IRQ_REMAPPING; used irq_domain_hierarchical_is_msi_remap() instead
---
 drivers/pci/probe.c | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox

Patch

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 19c8950c6c38..3529ae17b70e 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -716,6 +716,10 @@  static void pci_set_bus_msi_domain(struct pci_bus *bus)
 	if (!d)
 		d = pci_host_bridge_msi_domain(b);
 
+	if (d && irq_domain_is_msi(d) &&
+			irq_domain_hierarchical_is_msi_remap(d))
+		bus->bus_flags |= PCI_BUS_FLAGS_MSI_REMAP;
+
 	dev_set_msi_domain(&bus->dev, d);
 }