Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1288759

[PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle

Path csiph.com!news.mixmin.net!weretis.net!feeder4.news.weretis.net!storethat.news.telefonica.de!telefonica.de!news.panservice.it!bofh.it!news.nic.it!robomod
From jakeo@microsoft.com
Newsgroups linux.kernel
Subject [PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle
Date Thu, 10 Dec 2015 19:00:04 +0100
Message-ID <qEdFy-VS-45@gated-at.bofh.it> (permalink)
References <qEdFw-VS-3@gated-at.bofh.it>
X-Original-To gregkh@linuxfoundation.org, kys@microsoft.com, linux-kernel@vger.kernel.org, devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com, vkuznets@redhat.com, tglx@linutronix.de, haiyangz@microsoft.com, marc.zyngier@arm.com, bhelgaas@google.com, linux-pci@vger.kernel.org
Dkim-Signature v=1; a=rsa-sha1; c=relaxed; d=sendgrid.me; h=from:to:cc:subject:in-reply-to:references; s=smtpapi; bh=6ffZ1vvaQSm8Alb2gvlbX+ULPGQ=; b=MHs82XGzbMbon0bkxIT4NsvlZwmUS 5iZNu/WFkx98xdp13zTNUmZkIdYj3J3pMRnRFwLzVMAkjI+Ex2piVw0/L4U0RYUZ 5US+Z6UQazoxHfbaHOYCSY3vUvjDqPHGq7We24XdScHy0PXxi6c0ILnY51sB/3xj q2ORD6j7K5JN/k=
X-Mailer git-send-email 1.9.1
X-Sg-Eid UsLXQ589HNP4HLBydmD9pgHURQozLYm9XliudupI8YtVaQd8NQ8/+UQTiXu8ZoPGHKgFi/DLvN2Rav y0Tb//wq1OtPAcXx2LoIHmOuuXQws/JKEnnR1Yle5p7lfSabKMX+tWSEWutZMmnRQ0MYVXU2rK8kR2 KnSx5JPvql8Tf1uMM6LN3WeBfbW0e0JESEQ54ZIRZ//42lNHMFJVmgCpDg==
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 45
Organization linux.* mail to news gateway
X-Original-Cc Jake Oshins <jakeo@microsoft.com>
X-Original-Date Thu, 10 Dec 2015 17:53:01 +0000
X-Original-Message-ID <1449769983-12948-6-git-send-email-jakeo@microsoft.com>
X-Original-References <1449769983-12948-1-git-send-email-jakeo@microsoft.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1288759

Show key headers only | View raw


From: Jake Oshins <jakeo@microsoft.com>

This patch adds a second way of finding an IRQ domain associated with
a root PCI bus.  After looking to see if one can be found through
the OF tree, it attempts to look up the IRQ domain through an
fwnode_handle stored in the pci_sysdata struct.

Signed-off-by: Jake Oshins <jakeo@microsoft.com>
---
 drivers/pci/probe.c | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 750f907..c6369dd 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -674,6 +674,20 @@ static struct irq_domain *pci_host_bridge_msi_domain(struct pci_bus *bus)
 	 */
 	d = pci_host_bridge_of_msi_domain(bus);
 
+#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
+	/*
+	 * If no IRQ domain was found via the OF tree, try looking it up
+	 * directly through the fwnode_handle.
+	 */
+	if (!d) {
+		struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
+
+		if (fwnode)
+			d = irq_find_matching_fwnode(fwnode,
+						     DOMAIN_BUS_PCI_MSI);
+	}
+#endif
+
 	return d;
 }
 
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v10 0/7] PCI: hv: New paravirtual PCI front-end for Hyper-V VMs jakeo@microsoft.com - 2015-12-10 19:00 +0100
  [PATCH v10 3/7] PCI: Make it possible to implement a PCI MSI IRQ Domain in a module. jakeo@microsoft.com - 2015-12-10 19:00 +0100
    Re: [PATCH v10 3/7] PCI: Make it possible to implement a PCI MSI  IRQ Domain in a module. Marc Zyngier <marc.zyngier@arm.com> - 2015-12-10 19:20 +0100
  [PATCH v10 4/7] PCI: Add fwnode_handle to pci_sysdata jakeo@microsoft.com - 2015-12-10 19:00 +0100
    Re: [PATCH v10 4/7] PCI: Add fwnode_handle to pci_sysdata Marc Zyngier <marc.zyngier@arm.com> - 2015-12-10 19:20 +0100
  [PATCH v10 1/7] drivers:hv: Export a function that maps Linux CPU num onto Hyper-V proc num jakeo@microsoft.com - 2015-12-10 19:00 +0100
  [PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle jakeo@microsoft.com - 2015-12-10 19:00 +0100
    Re: [PATCH v10 5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle Marc Zyngier <marc.zyngier@arm.com> - 2015-12-10 19:20 +0100

csiph-web