linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: Matthew Minter <matt@masarand.com>
Cc: linux-pci@vger.kernel.org, bhelgaas@google.com,
	Liviu.Dudau@arm.com, ddaney@caviumnetworks.com,
	lorenzo.pieralisi@arm.com
Subject: Re: [PATCH V4] Delay allocation of PCI device IRQs from boot time until bus scan time to fix PCI hotplugging
Date: Mon, 7 Dec 2015 11:32:51 -0600	[thread overview]
Message-ID: <20151207173251.GK7994@localhost> (raw)
In-Reply-To: <1445576642-29624-1-git-send-email-matt@masarand.com>

On Fri, Oct 23, 2015 at 06:03:33AM +0100, Matthew Minter wrote:
> Hi again everyone, this is the extremely long awaited version 4 of this patchset.
> 
> It has been rebased to the head of the lastest mainline kernel as of a few days
> ago as well as a huge number of small restructures have been included.

Hi Matthew,

Thanks a lot for updating this.  I noticed a few kbuild warnings; did you
get those, too?  I can forward them to you if you didn't.

Bjorn

> I have tried to include every suggested change from last round's reviewing
> but appologise in advance if I missed one, there were dozens of comments which
> I have tried to implement or fix. If I have indeed missed anything please let
> me know, it was likely not my rejecting the feedback but just missing it while
> reading through all the feedback I got.
> 
> The most notable change is this version should be bisectable as I have kept
> all the old mechanisms working untill all arches have been converted to the
> new code paths though I have not tested actually booting all the intermediate
> versions.
> 
> I have only been able to test this on an ACPI enabled amd64 computer (my own
> desktop) as I am now working on it only in free time without any resources
> from a lab so testing on other arches is very much appreciated.
> 
> I shall also note that my time to work on this in the future is very limited
> so any help anyone can provide in making any further changes which may be
> needed if another version is required would be appreciated as to avoid more
> potentially very long delays due to my limited availability.
> 
> Unlike the previous version, it should in theory be safe to apply patches
> 1 to 6 separately to the rest of the set, then the architecture specific
> patch sets could be applied in any order over time and the last patch to tidy
> up the old code can be applied last of all.
> 
> I am sorry for all the silly whitespace fixes, found in the last version
> their inclusion was due to my misconfigured editor applying them automatically
> then me failing to see them while reading over the diffs.
> 
> As always, comments and testers are appreciated but I am not sure I will be
> able to produce another version in the near future so any help with changes
> is also very much appreciated if there are issues.
> 
> This time I have also uploaded the patch set to github to aid any testers who
> do not wish to attempt to merge the patches from this email chain:
> 
> https://github.com/Vality/linux/tree/pci-fixes
> 
> Note that the changes are all in my pci-fixes branch so make sure to check
> out that before building.
> 
> Many thanks,
> Matthew
> 
> Patch description (same as v3) follows:
> 
> pci_fixup_irqs is the current method used in most arches to assign IRQs to
> PCI devices. This has a number of flaws including it requiring an extra walk
> of the PCI bus and most importantly not running for devices which are added
> after boot time, this includes hot-added devices on boards that support this.
> 
> This patch set modifies the IRQ mapping and swizzling infrastructure
> such that functions are registered by the boot code (instead of being
> run directly by the boot code) and then run later in the enable_device
> path such that it will apply to all devices and not only those inserted
> at boot time.
> 
> This is cleaner as it unifies how each architecture allocates PCI IRQs as much
> as possible (some arches were particularly resistant to these changes so some
> work-arounds have been used or the change disabled completely).
> 
> The caveat here is that I have been forced to modify some architecture specific
> code for various architectures which I cannot test due to not having such boards
> available. The code seems correct and the changes in most cases are small and
> trivial however I have not tested all the patches for rare arches.
> 
> arch/alpha/kernel/pci.c                 |  7 ++++++-
> arch/alpha/kernel/sys_nautilus.c        |  1 -
> arch/arm/kernel/bios32.c                |  9 +++++++--
> arch/cris/arch-v32/drivers/pci/bios.c   | 12 ++++++++----
> arch/frv/mb93090-mb00/pci-frv.h         |  1 -
> arch/frv/mb93090-mb00/pci-irq.c         | 24 ++++++++++++------------
> arch/frv/mb93090-mb00/pci-vdk.c         |  1 -
> arch/m68k/coldfire/pci.c                |  8 +++++++-
> arch/microblaze/pci/pci-common.c        |  9 ++++++---
> arch/mips/pci/pci.c                     |  9 +++++++--
> arch/mn10300/unit-asb2305/pci-asb2305.h |  5 +----
> arch/mn10300/unit-asb2305/pci-irq.c     | 24 ++++--------------------
> arch/mn10300/unit-asb2305/pci.c         | 19 ++++++-------------
> arch/powerpc/kernel/pci-common.c        | 25 ++++++++++++-------------
> 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               | 10 +++++++---
> arch/sh/drivers/pci/pcie-sh7786.c       |  2 +-
> arch/sparc/kernel/leon_pci.c            | 12 ++++++++++--
> arch/sparc/kernel/pci.c                 | 23 +++++++++++++++++++----
> arch/tile/kernel/pci.c                  | 10 +++++++---
> arch/tile/kernel/pci_gx.c               | 10 +++++++---
> arch/unicore32/kernel/pci.c             | 11 ++++++++---
> arch/x86/include/asm/pci_x86.h          |  7 ++++---
> arch/x86/kernel/x86_init.c              |  1 -
> arch/x86/pci/acpi.c                     | 15 ---------------
> arch/x86/pci/irq.c                      | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------
> drivers/of/of_pci_irq.c                 |  2 +-
> drivers/pci/Makefile                    | 16 ++--------------
> drivers/pci/host/pci-host-generic.c     |  5 ++++-
> drivers/pci/host/pci-versatile.c        |  7 +++++--
> drivers/pci/host/pcie-iproc.c           | 12 ++++++++----
> drivers/pci/pci.c                       |  2 ++
> drivers/pci/pci.h                       |  1 +
> drivers/pci/setup-irq.c                 | 34 ++++++++++++++++------------------
> include/linux/pci.h                     |  5 +++--
> 43 files changed, 246 insertions(+), 210 deletions(-)
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-12-07 17:32 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23  5:03 [PATCH V4] Delay allocation of PCI device IRQs from boot time until bus scan time to fix PCI hotplugging Matthew Minter
2015-10-23  5:03 ` [PATCH V4 01/29] PCI: Build setup-irq.o on all arches Matthew Minter
2015-10-23  5:03 ` [PATCH V4 02/29] PCI: Add a prototype for pci_find_host_bridge to pci.h Matthew Minter
2015-10-23  5:03 ` [PATCH V4 03/29] PCI: Add IRQ mapping function pointers to pci_host_bridge struct Matthew Minter
2015-10-23  5:03 ` [PATCH V4 04/29] PCI: Remove const from the pci_dev struct passed to pci_fixup_irqs Matthew Minter
2015-10-23  5:03 ` [PATCH V4 05/29] PCI: Add pci_assign_irq function and have pci_fixup_irqs use it Matthew Minter
2015-10-23  5:03 ` [PATCH V4 06/29] PCI: Add a call to pci_assign_irq in do_pci_enable_device Matthew Minter
2015-10-23  5:03 ` [PATCH V4 07/29] x86/pci: Move pcibios_root_bridge_prepare from acpi.c to irq.c Matthew Minter
2015-10-23  5:03 ` [PATCH V4 08/29] x86/pci: Defer IRQ assignment to device enable time Matthew Minter
2015-12-23 23:04   ` Bjorn Helgaas
2016-01-12 11:25     ` Lorenzo Pieralisi
2015-10-23  5:03 ` [PATCH V4 09/29] x86/pci: Pass pin into pcibios_lookup_irq rather than look it up Matthew Minter
2015-10-23  5:03 ` [PATCH V4 10/29] ARM/PCI: Defer IRQ assignment to device enable time Matthew Minter
2015-10-23  5:03 ` [PATCH V4 11/29] powerpc/pci: " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 12/29] sh/PCI: Remove __init optimisations from IRQ mapping functions/data Matthew Minter
2015-10-23  5:03 ` [PATCH V4 13/29] sh/PCI: Defer IRQ assignment to device enable time Matthew Minter
2015-10-23  5:03 ` [PATCH V4 14/29] alpha/PCI: " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 15/29] cris/PCI: " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 16/29] frv/PCI: " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 17/29] m68k/pci: " Matthew Minter
2015-10-23  5:44   ` kbuild test robot
2015-10-23  5:03 ` [PATCH V4 18/29] microblaze/PCI: " Matthew Minter
2015-10-23  5:40   ` kbuild test robot
2015-10-23  5:03 ` [PATCH V4 19/29] MIPS/PCI: " Matthew Minter
2015-10-23  6:02   ` kbuild test robot
2015-10-23  5:03 ` [PATCH V4 20/29] mn10300: Defer PCI " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 21/29] mn10300: Remove pcibios_enable_device function Matthew Minter
2015-10-23  5:03 ` [PATCH V4 22/29] sparc/PCI: Defer IRQ assignment to device enable time Matthew Minter
2015-10-23  5:03 ` [PATCH V4 23/29] tile: pci: " Matthew Minter
2015-10-23  5:34   ` kbuild test robot
2015-10-23  5:03 ` [PATCH V4 24/29] unicore32/PCI: " Matthew Minter
2015-10-23  5:03 ` [PATCH V4 25/29] PCI: Update pci-versatile to use IRQ deferred assignment Matthew Minter
2015-10-23  5:03 ` [PATCH V4 26/29] PCI: Update pcie-iproc to use IRQ deffered assignment Matthew Minter
2015-10-23  5:04 ` [PATCH V4 27/29] PCI: Update pci-host-generic " Matthew Minter
2015-10-23  9:40   ` kbuild test robot
2015-10-23  5:04 ` [PATCH V4 28/29] of/pci: Fix comment for pci_fixup_irqs changing to pci_assign_irq Matthew Minter
2016-01-13 11:25   ` Lorenzo Pieralisi
2015-10-23  5:04 ` [PATCH V4 29/29] PCI: Remove pci_fixup_irqs function Matthew Minter
2015-12-07 17:32 ` Bjorn Helgaas [this message]
2015-12-18 21:54   ` [PATCH V4] Delay allocation of PCI device IRQs from boot time until bus scan time to fix PCI hotplugging Christopher Covington
2015-12-19 11:50     ` Matthew Minter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151207173251.GK7994@localhost \
    --to=helgaas@kernel.org \
    --cc=Liviu.Dudau@arm.com \
    --cc=bhelgaas@google.com \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=matt@masarand.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).