public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: linux-pci@vger.kernel.org, Bjorn Helgaas <helgaas@kernel.org>,
	Ard Biesheuvel <ard.biesheuvel@linaro.org>,
	Sinan Kaya <okaya@kernel.org>, Ali Saidi <alisaidi@amazon.com>,
	Zeev Zilberman <zeev@amazon.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources()
Date: Fri, 21 Jun 2019 08:55:43 +1000	[thread overview]
Message-ID: <a2ab2f2e6588fa12642dc16fbe908de55ba7b684.camel@kernel.crashing.org> (raw)
In-Reply-To: <20190620171357.GD18771@e121166-lin.cambridge.arm.com>

On Thu, 2019-06-20 at 18:13 +0100, Lorenzo Pieralisi wrote:
> On Sat, Jun 15, 2019 at 10:23:56AM +1000, Benjamin Herrenschmidt wrote:
> > Instead of the simpler
> > 
> > 	pci_bus_size_bridges(bus);
> > 	pci_bus_assign_resources(bus);
> > 
> > Use pci_assign_unassigned_root_bus_resources(). This should have no effect
> > as long as we are reassigning everything. Once we start honoring FW
> > resource allocations, this will bring up the "reallocation" feature
> > which can help making room for SR-IOV when necessary.
> 
> I would like to add more details on why we want to make this change,
> I will update the log when we merge it, it is a bit too late for v5.3,
> even if in theory no functional change is intended.

Ok. The why is that a subsequent patch will turn the code into

	if (claim)
		claim()
	pci_assign_unassigned*

And I wanted the patch replacing the existing 2 calls with the above
separate and bisectable in case we missed some odd effect of the
change.

Cheers,
Ben.

> 
> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> > ---
> >  arch/arm64/kernel/pci.c | 3 +--
> >  1 file changed, 1 insertion(+), 2 deletions(-)
> > 
> > diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
> > index bb85e2f4603f..1419b1b4e9b9 100644
> > --- a/arch/arm64/kernel/pci.c
> > +++ b/arch/arm64/kernel/pci.c
> > @@ -193,8 +193,7 @@ struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
> >  	if (!bus)
> >  		return NULL;
> >  
> > -	pci_bus_size_bridges(bus);
> > -	pci_bus_assign_resources(bus);
> > +	pci_assign_unassigned_root_bus_resources(bus);
> 
> These hunks should be identical, minus the additional resource size
> handling and realloc policy (which are *missing* features in current
> code). We must document this change in the log.
> 
> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
> 
> >  	list_for_each_entry(child, &bus->children, node)
> >  		pcie_bus_configure_settings(child);
> > -- 
> > 2.17.1
> > 


  reply	other threads:[~2019-06-20 22:56 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-15  0:23 [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources() Benjamin Herrenschmidt
2019-06-15  0:23 ` [PATCH 2/4] pci: acpi: Read _DSM #5 from ACPI on root bridges Benjamin Herrenschmidt
2019-06-21 20:07   ` Bjorn Helgaas
2019-06-15  0:23 ` [PATCH 3/4] pci: Do not auto-enable PCI reallocation when _DSM #5 returns 0 Benjamin Herrenschmidt
2019-06-21 20:07   ` Bjorn Helgaas
2019-06-15  0:23 ` [PATCH 4/4] arm64: pci: acpi: Preserve PCI resources configuration when asked by ACPI Benjamin Herrenschmidt
2019-06-21 14:57   ` Lorenzo Pieralisi
2019-06-21 23:07     ` Benjamin Herrenschmidt
2019-06-21 15:44   ` Ard Biesheuvel
2019-06-21 20:08   ` Bjorn Helgaas
2019-06-20 17:13 ` [PATCH 1/4] arm64: pci: acpi: Use pci_assign_unassigned_root_bus_resources() Lorenzo Pieralisi
2019-06-20 22:55   ` Benjamin Herrenschmidt [this message]
2019-06-21 20:06 ` Bjorn Helgaas
2019-06-21 20:48 ` Bjorn Helgaas
2019-06-21 22:58   ` Benjamin Herrenschmidt
2019-06-21 23:00   ` Benjamin Herrenschmidt
2019-06-21 23:15     ` Bjorn Helgaas

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=a2ab2f2e6588fa12642dc16fbe908de55ba7b684.camel@kernel.crashing.org \
    --to=benh@kernel.crashing.org \
    --cc=alisaidi@amazon.com \
    --cc=ard.biesheuvel@linaro.org \
    --cc=helgaas@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=okaya@kernel.org \
    --cc=zeev@amazon.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