Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1411871 > unrolled thread
| Started by | Yongji Xie <xyjxie@linux.vnet.ibm.com> |
|---|---|
| First post | 2016-06-02 08:20 +0200 |
| Last post | 2016-06-02 08:20 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[RESEND PATCH v2 3/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping Yongji Xie <xyjxie@linux.vnet.ibm.com> - 2016-06-02 08:20 +0200
| From | Yongji Xie <xyjxie@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-06-02 08:20 +0200 |
| Subject | [RESEND PATCH v2 3/6] PCI: Set PCI_BUS_FLAGS_MSI_REMAP if IOMMU have capability of IRQ remapping |
| Message-ID | <rFu94-2i2-23@gated-at.bofh.it> |
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@linux.vnet.ibm.com> --- drivers/pci/probe.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index 2b9e3ba..15a33e2 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c @@ -16,6 +16,7 @@ #include <linux/aer.h> #include <linux/acpi.h> #include <linux/irqdomain.h> +#include <linux/iommu.h> #include "pci.h" #define CARDBUS_LATENCY_TIMER 176 /* secondary latency timer */ @@ -2160,6 +2161,9 @@ struct pci_bus *pci_create_root_bus(struct device *parent, int bus, pci_set_bus_of_node(b); pci_set_bus_msi_domain(b); + if (iommu_capable(&pci_bus_type, IOMMU_CAP_INTR_REMAP)) + b->bus_flags |= PCI_BUS_FLAGS_MSI_REMAP; + if (!parent) set_dev_node(b->bridge, pcibus_to_node(b)); -- 1.7.9.5
Back to top | Article view | linux.kernel
csiph-web