From: Thierry Reding <thierry.reding@gmail.com>
To: Bjorn Helgaas <helgaas@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
linux-tegra@vger.kernel.org, linux-pci@vger.kernel.org
Subject: Re: [PATCH 3/3] PCI: tegra: Stop setting pcibios_min_mem
Date: Tue, 26 Jul 2016 11:54:15 +0200 [thread overview]
Message-ID: <20160726095415.GD2433@ulmo.ba.sec> (raw)
In-Reply-To: <20160725212850.GA24485@localhost>
[-- Attachment #1: Type: text/plain, Size: 1690 bytes --]
On Mon, Jul 25, 2016 at 04:28:50PM -0500, Bjorn Helgaas wrote:
> On Thu, Jun 30, 2016 at 03:14:30PM +0200, Thierry Reding wrote:
> > From: Thierry Reding <treding@nvidia.com>
> >
> > In practice this value will never be used and it hinders portability of
> > the driver, so remove it.
> >
> > Signed-off-by: Thierry Reding <treding@nvidia.com>
> > ---
> > drivers/pci/host/pci-tegra.c | 2 --
> > 1 file changed, 2 deletions(-)
> >
> > diff --git a/drivers/pci/host/pci-tegra.c b/drivers/pci/host/pci-tegra.c
> > index f04b062e8c67..bbf77a49517d 100644
> > --- a/drivers/pci/host/pci-tegra.c
> > +++ b/drivers/pci/host/pci-tegra.c
> > @@ -2249,8 +2249,6 @@ static int tegra_pcie_probe(struct platform_device *pdev)
> > if (err < 0)
> > return err;
> >
> > - pcibios_min_mem = 0;
>
> unsigned long pcibios_min_mem = 0x01000000; # arch/arm/mm/iomap.c
> #define PCIBIOS_MIN_MEM pcibios_min_mem # arch/arm/include/asm/pci.h
>
> PCIBIOS_MIN_MEM is used in __pci_assign_resource().
>
> It looks to me like we still use pcibios_min_mem; am I missing something?
The problem is that pcibios_min_mem is only defined on 32-bit ARM, so
we'd need to conditionalize (with a preprocessor macro) the usage.
However it turns out that it's not necessary because PCIBIOS_MIN_MEM
only serves as a lower bound during resource assignment.
pci_bus_alloc_resource() will eventually end up assigning from one of
the regions defined in device tree and the lowest we'll ever start any
of the memory regions is 0x12000000 (Tegra124).
So instead of conditionalizing I've simply dropped the assignment
because the default works fine for Tegra.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-07-26 9:54 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-30 13:14 [PATCH 1/3] PCI: tegra: Make register definitions consistent Thierry Reding
2016-06-30 13:14 ` [PATCH 2/3] PCI: tegra: Use pci_remap_iospace() Thierry Reding
2016-06-30 13:14 ` [PATCH 3/3] PCI: tegra: Stop setting pcibios_min_mem Thierry Reding
2016-07-25 21:28 ` Bjorn Helgaas
2016-07-26 9:54 ` Thierry Reding [this message]
2016-07-26 19:59 ` 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=20160726095415.GD2433@ulmo.ba.sec \
--to=thierry.reding@gmail.com \
--cc=bhelgaas@google.com \
--cc=helgaas@kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-tegra@vger.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;
as well as URLs for NNTP newsgroup(s).