From: Yongji Xie <elohimes@xxxxxxxxx> The capability of IRQ remapping is abstracted on IOMMU side on some archs. There is a existing flag IOMMU_CAP_INTR_REMAP for this. To have a universal flag to test this capability for different archs on PCI side, we set PCI_BUS_FLAGS_MSI_REMAP for PCI buses when IOMMU_CAP_INTR_REMAP is set. Signed-off-by: Yongji Xie <xyjxie@xxxxxxxxxxxxxxxxxx> Signed-off-by: Alexey Kardashevskiy <aik@xxxxxxxxx> --- drivers/pci/probe.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 3529ae17b70e..f2393b7d7ebf 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -775,6 +775,9 @@ int pci_register_host_bridge(struct pci_host_bridge *bridge) pci_set_bus_of_node(bus); pci_set_bus_msi_domain(bus); + if (iommu_capable(&pci_bus_type, IOMMU_CAP_INTR_REMAP)) + b->bus_flags |= PCI_BUS_FLAGS_MSI_REMAP; + if (!parent) set_dev_node(bus->bridge, pcibus_to_node(bus)); -- 2.11.0