Thread (23 messages) 23 messages, 4 authors, 2015-01-27

[PATCH 2/6] PCI/MSI: add hooks to populate the msi_domain field

From: Marc Zyngier <hidden>
Date: 2014-12-09 10:02:52
Also in: linux-pci, lkml

Hi Yijing,

On 09/12/14 02:03, Yijing Wang wrote:
On 2014/12/9 4:12, Marc Zyngier wrote:
quoted
In order to be able to populate the device msi_domain field,
add the necesary hooks to propagate the PHB msi_domain across
secondary busses to devices.

So far, nobody populates the initial msi_domain.

Signed-off-by: Marc Zyngier <redacted>
---
 drivers/pci/probe.c | 24 ++++++++++++++++++++++++
 include/linux/pci.h |  1 +
 2 files changed, 25 insertions(+)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index c8ca98c..d1009a2 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -670,6 +670,20 @@ static void pci_set_bus_speed(struct pci_bus *bus)
 	}
 }
 
+void __weak pcibios_set_phb_msi_domain(struct pci_bus *bus)
+{
+}
+
+static void pci_set_bus_msi_domain(struct pci_bus *bus)
+{
+	struct pci_dev *bridge = bus->self;
+
+	if (!bridge)
+		pcibios_set_phb_msi_domain(bus);
+	else
+		dev_set_msi_domain(&bus->dev, dev_get_msi_domain(&bridge->dev));
+}

Hi Marc, we can not assume pci devices under same phb share the same msi irq domain,
now in x86, pci devices under the same phb may associate different msi irq domain.
Well, this is not supposed to be a perfect solution yet, but instead a
basis for discussion. What I'd like to find out is:

- What is the minimum granularity for associating a device with its MSI
domain in existing platforms?
- What topology data structures do you use to find out what MSI
controller a device should be matched with?
- What in-tree platform already has this requirements?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help