[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210503144635.2297386-3-boqun.feng@gmail.com>
Date: Mon, 3 May 2021 22:46:30 +0800
From: Boqun Feng <boqun.feng@...il.com>
To: Bjorn Helgaas <bhelgaas@...gle.com>, Arnd Bergmann <arnd@...db.de>,
Marc Zyngier <maz@...nel.org>
Cc: Russell King <linux@...linux.org.uk>, Andrew Lunn <andrew@...n.ch>,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>,
Gregory Clement <gregory.clement@...tlin.com>,
Catalin Marinas <catalin.marinas@....com>,
Will Deacon <will@...nel.org>,
Thomas Bogendoerfer <tsbogend@...ha.franken.de>,
Lorenzo Pieralisi <lorenzo.pieralisi@....com>,
Rob Herring <robh@...nel.org>,
"K. Y. Srinivasan" <kys@...rosoft.com>,
Haiyang Zhang <haiyangz@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Boqun Feng <boqun.feng@...il.com>,
Mike Rapoport <rppt@...nel.org>,
Robin Murphy <robin.murphy@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Jon Derrick <jonathan.derrick@...el.com>,
Sunil Muthuswamy <sunilmut@...rosoft.com>,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
linux-mips@...r.kernel.org, linux-pci@...r.kernel.org,
linux-hyperv@...r.kernel.org
Subject: [RFC v2 2/7] PCI: Allow msi domain set-up at host probing time
For GENERIC_MSI_IRQ_DOMAIN drivers, we can set up the msi domain via
dev_set_msi_domain() at probing time, and drivers can use this more
generic way to set up the msi domain for the host bridge.
This is the preparation for ARM64 Hyper-V PCI support.
Originally-by: Arnd Bergmann <arnd@...db.de>
Signed-off-by: Boqun Feng <boqun.feng@...il.com>
---
drivers/pci/probe.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 5e71cc5e1b6c..90afa05ab2f1 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -828,11 +828,14 @@ static struct irq_domain *pci_host_bridge_msi_domain(struct pci_bus *bus)
{
struct irq_domain *d;
+ /* Default set by host bridge driver */
+ d = dev_get_msi_domain(bus->bridge);
/*
* Any firmware interface that can resolve the msi_domain
* should be called from here.
*/
- d = pci_host_bridge_of_msi_domain(bus);
+ if (!d)
+ d = pci_host_bridge_of_msi_domain(bus);
if (!d)
d = pci_host_bridge_acpi_msi_domain(bus);
--
2.30.2
Powered by blists - more mailing lists