diff mbox

[V4,17/29] m68k/pci: Defer IRQ assignment to device enable time

Message ID 1445576642-29624-18-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:03 a.m. UTC
Currently PCI IRQs are assigned during mcf_pci_init which is only run
at boot time, this causes devices which are connected after boot time
to not receive an IRQ, this patch set fixes this by registering an IRQ
assignment function to be run later at device enable time.

Signed-off-by: Matthew Minter <matt@masarand.com>
---
 arch/m68k/coldfire/pci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

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

[auto build test WARNING 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: m68k-m5475evb_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=m68k 

All warnings (new ones prefixed by >>):

   arch/m68k/coldfire/pci.c: In function 'pcibios_root_bridge_prepare':
>> arch/m68k/coldfire/pci.c:331:18: warning: assignment from incompatible pointer type
     bridge->map_irq = mcf_pci_map_irq;
                     ^

vim +331 arch/m68k/coldfire/pci.c

   315		rootbus = pci_scan_bus(0, &mcf_pci_ops, NULL);
   316		if (!rootbus)
   317			return -ENODEV;
   318	
   319		rootbus->resource[0] = &mcf_pci_io;
   320		rootbus->resource[1] = &mcf_pci_mem;
   321	
   322		pci_bus_size_bridges(rootbus);
   323		pci_bus_assign_resources(rootbus);
   324		pci_bus_add_devices(rootbus);
   325		return 0;
   326	}
   327	
   328	int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
   329	{
   330		bridge->swizzle_irq = pci_common_swizzle;
 > 331		bridge->map_irq = mcf_pci_map_irq;
   332		return 0;
   333	}
   334	
   335	subsys_initcall(mcf_pci_init);

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

Patch

diff --git a/arch/m68k/coldfire/pci.c b/arch/m68k/coldfire/pci.c
index 821de92..86661cd 100644
--- a/arch/m68k/coldfire/pci.c
+++ b/arch/m68k/coldfire/pci.c
@@ -319,11 +319,17 @@  static int __init mcf_pci_init(void)
 	rootbus->resource[0] = &mcf_pci_io;
 	rootbus->resource[1] = &mcf_pci_mem;
 
-	pci_fixup_irqs(pci_common_swizzle, mcf_pci_map_irq);
 	pci_bus_size_bridges(rootbus);
 	pci_bus_assign_resources(rootbus);
 	pci_bus_add_devices(rootbus);
 	return 0;
 }
 
+int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
+{
+	bridge->swizzle_irq = pci_common_swizzle;
+	bridge->map_irq = mcf_pci_map_irq;
+	return 0;
+}
+
 subsys_initcall(mcf_pci_init);