mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Bjorn Helgaas <bhelgaas@google.com>
Cc: Myron Stowe <myron.stowe@redhat.com>,
	linux-pci@vger.kernel.org, yinghai@kernel.org,
	linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 01/15] PCI, acpiphp: Separate out hot-add support of pci host bridge
Date: Fri, 07 Dec 2012 22:04:35 +0100	[thread overview]
Message-ID: <1601199.4gTPfZEF7o@vostro.rjw.lan> (raw)
In-Reply-To: <CAErSpo6MEtx6hsYhY=h0+eXqQcnZuG2vq=z_8Oz8tnksKZd7DA@mail.gmail.com>

On Friday, December 07, 2012 12:32:46 PM Bjorn Helgaas wrote:
> On Thu, Dec 6, 2012 at 11:25 PM, Myron Stowe <myron.stowe@redhat.com> wrote:
> > From: Yinghai Lu <yinghai@kernel.org>
> >
> > It causes confusion.
> 
> I completely agree that acpiphp causes confusion  :)
> 
> > We may only need acpi hp for pci host bridge.
> >
> > Split host bridge hot-add support to pci_root_hp, and keep acpiphp simple.
> >
> > -v2: put back pci_root_hp change in one patch
> > -v3: add pcibios_resource_survey_bus() calling
> > -v4: remove not needed code with remove_bridge
> > -v5: put back support for acpiphp support for slots just on root bus.
> > -v6: change some functions to *_p2p_* to make it more clean.
> > -v7: split hot_added change out.
> >
> > Signed-off-by: Yinghai Lu <yinghai@kernel.org>
> > Signed-off-by: Myron Stowe <myron.stowe@redhat.com>
> > ---
> >
> >  drivers/acpi/Makefile              |    1
> >  drivers/acpi/pci_root_hp.c         |  228 ++++++++++++++++++++++++++++++++++++
> >  drivers/pci/hotplug/acpiphp_glue.c |   59 ++-------
> >  3 files changed, 244 insertions(+), 44 deletions(-)
> >  create mode 100644 drivers/acpi/pci_root_hp.c
> >
> > diff --git a/drivers/acpi/Makefile b/drivers/acpi/Makefile
> > index 82422fe..4edfe41 100644
> > --- a/drivers/acpi/Makefile
> > +++ b/drivers/acpi/Makefile
> > @@ -36,6 +36,7 @@ acpi-y                                += processor_core.o
> >  acpi-y                         += ec.o
> >  acpi-$(CONFIG_ACPI_DOCK)       += dock.o
> >  acpi-y                         += pci_root.o pci_link.o pci_irq.o pci_bind.o
> > +acpi-$(CONFIG_HOTPLUG)         += pci_root_hp.o
> 
> I absolutely, 110% agree with splitting out the host bridge hotplug
> code from the PCI device hotplug code.
> 
> But I don't want to put this in a separate file; I think it should go
> directly in pci_root.c.  Putting it in a separate file gives the
> illusion that hotplug is something we only do in unusual
> circumstances.  But that's wrong -- even at boot-time we should be
> using the same hot-plug flow as we do later.
> 
> Plus, I want people to be forced to look at the ugliness of this code
> every time they look at pci_root.c.  Maybe that will help get it
> cleaned up eventually.
> 
> For example, as soon as you put this code in pci_root.c instead of
> pci_root_hp.c, it becomes obvious that we're keeping a list of host
> bridges in both places, and we probably don't need two lists.  And it
> seems dubious that acpi_pci_root_hp_init() is an initcall that walks
> the namespace looking for host bridges, when acpi_pci_root_add()
> already exists and is called for every host bridge.

Agreed.

Thanks,
Rafael


-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2012-12-07 20:59 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-07  6:24 [PATCH 00/15] PCI/ACPI: Remove "pci_root" sub-driver support Myron Stowe
2012-12-07  6:25 ` [PATCH 01/15] PCI, acpiphp: Separate out hot-add support of pci host bridge Myron Stowe
2012-12-07 19:32   ` Bjorn Helgaas
2012-12-07 21:04     ` Rafael J. Wysocki [this message]
2012-12-07 21:30     ` Yinghai Lu
2012-12-07 21:36       ` Bjorn Helgaas
2012-12-07 21:42         ` Yinghai Lu
2012-12-07  6:25 ` [PATCH 02/15] PCI/acpiphp: Fix coding style of external declarations in acpiphp.h Myron Stowe
2012-12-07  6:25 ` [PATCH 03/15] PCI/acpiphp: Leave the "acpiphp" sub-driver registered and in place Myron Stowe
2012-12-07  6:25 ` [PATCH 04/15] PCI/acpiphp: Change acpiphp_glue_init() to return void instead of 0 Myron Stowe
2012-12-07  6:25 ` [PATCH 05/15] PCI/acpiphp: Collapse initialization call chain of "acpiphp" sub-driver Myron Stowe
2012-12-07  6:25 ` [PATCH 06/15] PCI/acpiphp: Convert "acpiphp" sub-driver's functionality to built-in only Myron Stowe
2012-12-07  6:48   ` Yinghai Lu
2012-12-07 19:11     ` Myron Stowe
2012-12-07  6:25 ` [PATCH 07/15] PCI/acpiphp: Declare acpi_{add, remove}_bridge() as external functions Myron Stowe
2012-12-07  6:25 ` [PATCH 08/15] PCI/acpiphp: Collapse the initialization call chain of "acpiphp" further Myron Stowe
2012-12-07  6:25 ` [PATCH 09/15] PCI/acpiphp: Add "acpiphp" functionality statically within "pci_root" Myron Stowe
2012-12-07  6:25 ` [PATCH 10/15] PCI/acpiphp: Change acpiphp_add_bridge() to return void instead of 0 Myron Stowe
2012-12-07  6:25 ` [PATCH 11/15] PCI/ACPI: Fix latent refcount issue in acpi_pci_root_start() Myron Stowe
2012-12-07  6:26 ` [PATCH 12/15] PCI/ACPI: Move where dmi_check_system() is called from Myron Stowe
2012-12-07  6:26 ` [PATCH 13/15] PCI/ACPI: Convert "pci_slot" sub-driver's functionality to built-in only Myron Stowe
2012-12-07  6:26 ` [PATCH 14/15] PCI/ACPI: Add "pci_slot" functionality statically within "pci_root" Myron Stowe
2012-12-07  6:26 ` [PATCH 15/15] PCI/ACPI: Remove the "pci_root" driver's sub-driver infrastructure Myron Stowe

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=1601199.4gTPfZEF7o@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=bhelgaas@google.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=myron.stowe@redhat.com \
    --cc=yinghai@kernel.org \
    /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

all inboxes | Powered by JetHome®