diff mbox

[V4,23/29] tile: pci: Defer IRQ assignment to device enable time

Message ID 1445576642-29624-24-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 pcibios_init is running pci_fixup_irqs in order to assign
IRQs to PCI devices, this is only done once at boot-time and causes
devices hot-plugged after boot time to not be allocated an IRQ.
This is fixed in this patch-set by delaying the allocation untill
device enable time by registering the function to be called later.

Signed-off-by: Matthew Minter <matt@masarand.com>
---
 arch/tile/kernel/pci.c    | 10 +++++++---
 arch/tile/kernel/pci_gx.c | 10 +++++++---
 2 files changed, 14 insertions(+), 6 deletions(-)

Comments

kernel test robot Oct. 23, 2015, 5:34 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: tile-allyesconfig (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=tile 

All warnings (new ones prefixed by >>):

   arch/tile/kernel/pci_gx.c: In function 'pcibios_root_bridge_prepare':
>> arch/tile/kernel/pci_gx.c:1041:18: warning: assignment from incompatible pointer type [enabled by default]

vim +1041 arch/tile/kernel/pci_gx.c

  1025				continue;
  1026	
  1027	alloc_mem_map_failed:
  1028				break;
  1029			}
  1030	
  1031			pci_bus_add_devices(root_bus);
  1032		}
  1033	
  1034		return 0;
  1035	}
  1036	subsys_initcall(pcibios_init);
  1037	
  1038	int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
  1039	{
  1040		bridge->swizzle_irq = pci_common_swizzle;
> 1041		bridge->map_irq = tile_map_irq;
  1042		return 0;
  1043	}
  1044	
  1045	/* No bus fixups needed. */
  1046	void pcibios_fixup_bus(struct pci_bus *bus)
  1047	{
  1048	}
  1049	

---
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/tile/kernel/pci.c b/arch/tile/kernel/pci.c
index 9475a74..e151d80 100644
--- a/arch/tile/kernel/pci.c
+++ b/arch/tile/kernel/pci.c
@@ -313,9 +313,6 @@  int __init pcibios_init(void)
 		}
 	}
 
-	/* Do machine dependent PCI interrupt routing */
-	pci_fixup_irqs(pci_common_swizzle, tile_map_irq);
-
 	/*
 	 * This comes from the generic Linux PCI driver.
 	 *
@@ -369,6 +366,13 @@  int __init pcibios_init(void)
 }
 subsys_initcall(pcibios_init);
 
+int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
+{
+	bridge->swizzle_irq = pci_common_swizzle;
+	bridge->map_irq = tile_map_irq;
+	return 0;
+}
+
 /*
  * No bus fixups needed.
  */
diff --git a/arch/tile/kernel/pci_gx.c b/arch/tile/kernel/pci_gx.c
index 4c017d0..7eb3e2b 100644
--- a/arch/tile/kernel/pci_gx.c
+++ b/arch/tile/kernel/pci_gx.c
@@ -887,9 +887,6 @@  int __init pcibios_init(void)
 		next_busno = bus->busn_res.end + 1;
 	}
 
-	/* Do machine dependent PCI interrupt routing */
-	pci_fixup_irqs(pci_common_swizzle, tile_map_irq);
-
 	/*
 	 * This comes from the generic Linux PCI driver.
 	 *
@@ -1038,6 +1035,13 @@  alloc_mem_map_failed:
 }
 subsys_initcall(pcibios_init);
 
+int pcibios_root_bridge_prepare(struct pci_host_bridge *bridge)
+{
+	bridge->swizzle_irq = pci_common_swizzle;
+	bridge->map_irq = tile_map_irq;
+	return 0;
+}
+
 /* No bus fixups needed. */
 void pcibios_fixup_bus(struct pci_bus *bus)
 {