Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1420166

Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot

From Rui Wang <rui.y.wang@intel.com>
Newsgroups linux.kernel
Subject Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot
Date 2016-06-12 08:30 +0200
Message-ID <rJ74e-5a2-11@gated-at.bofh.it> (permalink)
References <rIxN8-71n-27@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Saturday, June 11, 2016 12:43 AM, Bjorn Helgaas wrote:
> On Wed, Jun 08, 2016 at 05:32:44PM +0800, Rui Wang wrote:
> > @@ -1779,8 +1780,12 @@ void __init
> > pci_assign_unassigned_resources(void)
> >  {
> >  	struct pci_bus *root_bus;
> >
> > -	list_for_each_entry(root_bus, &pci_root_buses, node)
> > +	list_for_each_entry(root_bus, &pci_root_buses, node) {
> >  		pci_assign_unassigned_root_bus_resources(root_bus);
> > +#ifdef CONFIG_X86
> > +		acpi_ioapic_add(ACPI_HANDLE(root_bus->bridge));
> > +#endif
> 
> This seems like a strange place to call acpi_ioapic_add().  Your object is to call
> acpi_ioapic_add() during root bus enumeration.
> 
> I assume we *can't* call acpi_ioapic_add() from acpi_pci_root_add() at boot
> time, for some reason you'll explain.  But is there a reason we have to call it
> from pci_assign_unassigned_resources() (where it requires an ifdef) instead
> of from pcibios_assign_resources(), which is already x86-specific?
> 
> In acpi_pci_root_add(), we have this:
> 
>   acpi_pci_root_add(...)
>   {
>     ...
>     if (hotadd)
>       acpi_ioapic_add(root);
> 
> So the obvious question is why don't we just remove the "if (hotadd)"
> and call acpi_ioapic_add() always.
> 
> I'm sure the reason is some ordering problem, but we need a comment in
> acpi_pci_root_add() about why the obvious solution doesn't work.
> 

Hi Bjorn,

Yes it's an ording issue. acpi_ioapic_add() and also ioapic_insert_resources()
have to be later than pci initialization in order to deal with IOAPICs mapped
on a PCI BAR. There's a comment about this inside pcibios_resource_survey()
above ioapic_insert_resources(). We can also add a comment inside
acpi_pci_root_add(), though.

And yes calling acpi_ioapic_add() in pcibios_assign_resources() doesn't require
ifdef CONFIG_X86. But it'll require a loop to iterate through the root buses,
and call acpi_ioapic_add() within the loop. pci_assign_unassigned_resources()
already has that loop. Do you still prefer adding it to
pcibios_assign_resources() ?

Regards,
Rui

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH V2 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-06-08 09:20 +0200
  Re: [PATCH V2 1/3] x86/ioapic: Support hot-removal of IOAPICs  present during boot kbuild test robot <lkp@intel.com> - 2016-06-08 10:10 +0200
  [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-06-08 11:50 +0200
    Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present  during boot Thomas Gleixner <tglx@linutronix.de> - 2016-06-10 15:10 +0200
      Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2016-06-10 16:00 +0200
    Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs  present during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-06-10 18:50 +0200
      Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-06-12 08:30 +0200
        Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs  present during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-06-16 19:20 +0200
          RE: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-06-22 09:30 +0200
            Re: [PATCH V3 1/3] x86/ioapic: Support hot-removal of IOAPICs  present during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-06-22 17:20 +0200
          [PATCH V4 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot Rui Wang <rui.y.wang@intel.com> - 2016-06-22 10:00 +0200
            Re: [PATCH V4 1/3] x86/ioapic: Support hot-removal of IOAPICs  present during boot Bjorn Helgaas <helgaas@kernel.org> - 2016-06-22 17:20 +0200
              Re: [PATCH V4 1/3] x86/ioapic: Support hot-removal of IOAPICs present during boot <> - 2016-06-23 07:30 +0200

csiph-web