diff mbox

[V4,27/29] PCI: Update pci-host-generic to use IRQ deffered assignment

Message ID 1445576642-29624-28-git-send-email-matt@masarand.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

matt@masarand.com Oct. 23, 2015, 5:04 a.m. UTC
The pci-host-generic platform device is using the fixup irqs code which
will be removed later in the code to migrate to deffered irq
assignment. This patch migrates it to use the new code path and
adds support for deffered irq assignment

Signed-off-by: Matthew Minter <matt@masarand.com>
---
 drivers/pci/host/pci-host-generic.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

kernel test robot Oct. 23, 2015, 9:40 a.m. UTC | #1
Hi Matthew,

[auto build test ERROR on v4.3-rc6 -- if it's inappropriate base, please suggest rules for selecting the more suitable base]

url:    https://github.com/0day-ci/linux/commits/Matthew-Minter/PCI-Build-setup-irq-o-on-all-arches/20151023-131018
config: arm64-columbia_pt_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/host/pci-host-generic.c: In function 'gen_pci_probe':
>> drivers/pci/host/pci-host-generic.c:266:2: error: implicit declaration of function 'pci_find_host_bridge' [-Werror=implicit-function-declaration]
     bridge = pci_find_host_bridge(bus);
     ^
>> drivers/pci/host/pci-host-generic.c:266:9: warning: assignment makes pointer from integer without a cast
     bridge = pci_find_host_bridge(bus);
            ^
>> drivers/pci/host/pci-host-generic.c:268:18: warning: assignment from incompatible pointer type
     bridge->map_irq = of_irq_parse_and_map_pci;
                     ^
   cc1: some warnings being treated as errors

vim +/pci_find_host_bridge +266 drivers/pci/host/pci-host-generic.c

   260		bus = pci_scan_root_bus(dev, 0, &gen_pci_ops, pci, &pci->resources);
   261		if (!bus) {
   262			dev_err(dev, "Scanning rootbus failed");
   263			return -ENODEV;
   264		}
   265	
 > 266		bridge = pci_find_host_bridge(bus);
   267		bridge->swizzle_irq = pci_common_swizzle;
 > 268		bridge->map_irq = of_irq_parse_and_map_pci;
   269	
   270		if (!pci_has_flag(PCI_PROBE_ONLY)) {
   271			pci_bus_size_bridges(bus);

---
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/host/pci-host-generic.c b/drivers/pci/host/pci-host-generic.c
index 265dd25..0c12597 100644
--- a/drivers/pci/host/pci-host-generic.c
+++ b/drivers/pci/host/pci-host-generic.c
@@ -215,6 +215,7 @@  static int gen_pci_probe(struct platform_device *pdev)
 	struct device_node *np = dev->of_node;
 	struct gen_pci *pci = devm_kzalloc(dev, sizeof(*pci), GFP_KERNEL);
 	struct pci_bus *bus, *child;
+	struct pci_host_bridge *bridge;
 
 	if (!pci)
 		return -ENOMEM;
@@ -262,7 +263,9 @@  static int gen_pci_probe(struct platform_device *pdev)
 		return -ENODEV;
 	}
 
-	pci_fixup_irqs(pci_common_swizzle, of_irq_parse_and_map_pci);
+	bridge = pci_find_host_bridge(bus);
+	bridge->swizzle_irq = pci_common_swizzle;
+	bridge->map_irq = of_irq_parse_and_map_pci;
 
 	if (!pci_has_flag(PCI_PROBE_ONLY)) {
 		pci_bus_size_bridges(bus);