From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751977AbdHCVfH (ORCPT ); Thu, 3 Aug 2017 17:35:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:44904 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751736AbdHCVfG (ORCPT ); Thu, 3 Aug 2017 17:35:06 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EE1022B5D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=helgaas@kernel.org Date: Thu, 3 Aug 2017 16:35:03 -0500 From: Bjorn Helgaas To: Lorenzo Pieralisi Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, Ralf Baechle , Arnd Bergmann , Paul Burton , Rich Felker , Bjorn Helgaas , Richard Henderson , Tanmay Inamdar , Ivan Kokshaysky , Chris Metcalf , "David S. Miller" , Matthew Minter , Yoshinori Sato , Geert Uytterhoeven , Guan Xuetao Subject: Re: [RFT PATCH 0/9] PCI: Remove pci_fixup_irqs() Message-ID: <20170803213503.GA20308@bhelgaas-glaptop.roam.corp.google.com> References: <20170731163757.22629-1-lorenzo.pieralisi@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170731163757.22629-1-lorenzo.pieralisi@arm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 31, 2017 at 05:37:48PM +0100, Lorenzo Pieralisi wrote: > The pci_fixup_irqs() function allocates IRQs for all PCI devices present > in a system; those PCI devices possibly belong to different PCI bus trees > (and possibly rooted at different host bridges) and may well be enabled > (ie probed and bound to a driver) by the time pci_fixup_irqs() is called > when probing a given host bridge driver. > > Furthermore, current kernel code relying on pci_fixup_irqs() to > assign legacy PCI IRQs to devices does not work at all for > hotplugged devices in that the code carrying out the IRQ fixup > is called at host bridge driver probe time, which just cannot take > into account devices hotplugged after system has booted. > > The introduction of map/swizzle functions hook in struct pci_host_bridge > allows to define per-bridge map/swizzle functions, that can be used at > device probe time in PCI core code to allocate IRQs for a given device > (through pci_assign_irq()). > > This series converts all arches still relying on pci_fixup_irqs() to > the new pci_scan_root_bus_bridge() API and consequently remove > pci_fixup_irqs() from the kernel in that it is not used anymore. > > Compile tested only, I do not have the necessary hardware. Yay! I applied this to pci/irq-fixups for v4.14. Huge thanks to both Matthew and Lorenzo for all the hard work it took to make this happen! > [1] git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/linux.git pci/pci-fixup-irqs-removal > > Cc: Ralf Baechle > Cc: Arnd Bergmann > Cc: Paul Burton > Cc: Rich Felker > Cc: Bjorn Helgaas > Cc: Richard Henderson > Cc: Tanmay Inamdar > Cc: Ivan Kokshaysky > Cc: Chris Metcalf > Cc: "David S. Miller" > Cc: Matthew Minter > Cc: Yoshinori Sato > Cc: Geert Uytterhoeven > Cc: Guan Xuetao > > Lorenzo Pieralisi (7): > sh/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ mapping > hooks > alpha/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > m68k/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > MIPS/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > tile/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > unicore32/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > sparc/PCI: Replace pci_fixup_irqs() call with PCI host bridge IRQ > mapping hooks > > Matthew Minter (2): > sh/PCI: Remove __init optimisations from IRQ mapping functions/data > PCI: Remove pci_fixup_irqs() function > > arch/alpha/kernel/pci.c | 27 ++++++++++++++++------ > arch/alpha/kernel/sys_nautilus.c | 31 +++++++++++++++++++++---- > arch/m68k/coldfire/pci.c | 36 +++++++++++++++++++++++++---- > arch/mips/pci/pci-legacy.c | 24 +++++++++++++------ > arch/sh/drivers/pci/fixups-cayman.c | 2 +- > arch/sh/drivers/pci/fixups-dreamcast.c | 2 +- > arch/sh/drivers/pci/fixups-r7780rp.c | 2 +- > arch/sh/drivers/pci/fixups-rts7751r2d.c | 6 ++--- > arch/sh/drivers/pci/fixups-sdk7780.c | 4 ++-- > arch/sh/drivers/pci/fixups-se7751.c | 2 +- > arch/sh/drivers/pci/fixups-sh03.c | 2 +- > arch/sh/drivers/pci/fixups-snapgear.c | 2 +- > arch/sh/drivers/pci/fixups-titan.c | 4 ++-- > arch/sh/drivers/pci/pci.c | 41 ++++++++++++++++++++------------- > arch/sh/drivers/pci/pcie-sh7786.c | 2 +- > arch/sparc/kernel/leon_pci.c | 24 ++++++++++++++----- > arch/tile/kernel/pci.c | 21 +++++++++++++---- > arch/tile/kernel/pci_gx.c | 21 +++++++++++++---- > arch/unicore32/kernel/pci.c | 35 ++++++++++++++++++++++++---- > drivers/pci/setup-irq.c | 24 ------------------- > include/linux/pci.h | 2 -- > 21 files changed, 216 insertions(+), 98 deletions(-) > > -- > 2.10.0 >