Re: [PATCH 3/3] PCI: tegra: Stop setting pcibios_min_mem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> > 
> > In practice this value will never be used and it hinders portability of
> > the driver, so remove it.
> > 
> > Signed-off-by: Thierry Reding <treding@xxxxxxxxxx>
> > ---
> >  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: signature.asc
Description: PGP signature


[Index of Archives]     [ARM Kernel]     [Linux ARM]     [Linux ARM MSM]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux