diff mbox

[v7,5/7] PCI: irqdomain: Look up IRQ domain by fwnode_handle

Message ID 1449275767-1510-6-git-send-email-jakeo@microsoft.com
State Superseded
Headers show

Commit Message

Jake Oshins Dec. 5, 2015, 12:36 a.m. UTC
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(+)

Comments

kernel test robot Dec. 5, 2015, 2 a.m. UTC | #1
Hi Jake,

[auto build test ERROR on pci/next]
[also build test ERROR on v4.4-rc3 next-20151203]

url:    https://github.com/0day-ci/linux/commits/jakeo-microsoft-com/PCI-hv-New-paravirtual-PCI-front-end-for-Hyper-V-VMs/20151205-083943
base:   https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next
config: arm64-defconfig (attached as .config)
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=arm64 

All error/warnings (new ones prefixed by >>):

   drivers/pci/probe.c: In function 'pci_host_bridge_msi_domain':
>> drivers/pci/probe.c:682:10: error: implicit declaration of function 'pci_root_bus_fwnode' [-Werror=implicit-function-declaration]
      struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
             ^
>> drivers/pci/probe.c:682:34: warning: initialization makes pointer from integer without a cast
      struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
                                     ^
>> drivers/pci/probe.c:685:4: error: implicit declaration of function 'irq_find_matching_fwnode' [-Werror=implicit-function-declaration]
       d = irq_find_matching_fwnode(fwnode,
       ^
>> drivers/pci/probe.c:686:12: error: 'DOMAIN_BUS_PCI_MSI' undeclared (first use in this function)
               DOMAIN_BUS_PCI_MSI);
               ^
   drivers/pci/probe.c:686:12: note: each undeclared identifier is reported only once for each function it appears in
   cc1: some warnings being treated as errors

vim +/pci_root_bus_fwnode +682 drivers/pci/probe.c

   676	#ifdef CONFIG_PCI_MSI_IRQ_DOMAIN
   677		/*
   678		 * If no IRQ domain was found via the OF tree, try looking it up
   679		 * directly through the fwnode_handle.
   680		 */
   681		if (!d) {
 > 682			struct fwnode_handle *fwnode = pci_root_bus_fwnode(bus);
   683	
   684			if (fwnode)
 > 685				d = irq_find_matching_fwnode(fwnode,
 > 686							     DOMAIN_BUS_PCI_MSI);
   687		}
   688	#endif
   689	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
diff mbox

Patch

diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index edb1984..8f3d056 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -673,6 +673,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;
 }