linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	"oe5hpm@gmail.com" <oe5hpm@gmail.com>,
	Ralf Baechle <ralf@linux-mips.org>,
	"James E.J. Bottomley" <jejb@parisc-linux.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Richard Henderson <rth@twiddle.net>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	David Howells <dhowells@redhat.com>,
	Russell King <linux@arm.linux.org.uk>,
	Tony Luck <tony.luck@intel.com>,
	"David S. Miller" <davem@davemloft.net>,
	Ingo Molnar <mingo@redhat.com>,
	Guenter Roeck <linux@roeck-us.net>,
	Michal Simek <monstr@monstr.eu>, Chris Zankel <chris@zankel.net>,
	"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>
Subject: Re: trouble with PCI: Call pci_read_bridge_bases() from core instead of arch code
Date: Mon, 14 Sep 2015 11:09:29 +0100	[thread overview]
Message-ID: <20150914100929.GB18886@red-moon> (raw)
In-Reply-To: <20150907091230.GB29293@red-moon>

Yinghai,

On Mon, Sep 07, 2015 at 10:12:30AM +0100, Lorenzo Pieralisi wrote:
> On Sat, Sep 05, 2015 at 12:53:48AM +0100, Yinghai Lu wrote:
> > On Fri, Sep 4, 2015 at 9:44 AM, Lorenzo Pieralisi
> > <lorenzo.pieralisi@arm.com> wrote:
> > > On Fri, Sep 04, 2015 at 05:00:35PM +0100, Yinghai Lu wrote:
> > >
> > > The problem here is not the last retry, it is the first bridge scan.
> > >
> > > By moving pci_read_bridge_bases() to core PCI code, if we do not
> > > vet the bridge apertures (ie claim them and reset them if the claiming
> > > fails) we end up calling (on ARM) __pci_bus_size_bridges() with apertures
> > > that can have sizes != 0, which does not make any sense since we are calling
> > > __pci_bus_size_bridges() to *discover* what the aperture size should
> > > be on first bridge scan, correct ?
> > 
> > for x86, in pcibios_allocate_bridge_resources(), we do validate
> > the bridge resources, and reset size to 1 (strange ?!).
> 
> Yes, strange, but there is even a special case in calculate_memsize()
> to handle that :) it seems !

Any thoughts on that ? I would like to understand if there is any
reason why on first scan the bridge aperture size is relevant, whereas
in my opinion it should not be, I need your input on that.

Put it differently, I do not see any reason why arch code should
reset the bridge resource on platforms that reassign the whole
PCI config space, if you see any please mention it here.

As I said, ARM is not the only platform affected, MIPS and possibly
Alpha suffer from the same issue and I think it should be fixed
in core code (I think __pci_bus_size_bridges() should ignore the
old aperture size on first scan).

Thanks !
Lorenzo

  reply	other threads:[~2015-09-14 10:09 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-02  9:51 trouble with PCI: Call pci_read_bridge_bases() from core instead of arch code oe5hpm
2015-09-02 17:47 ` Lorenzo Pieralisi
2015-09-02 20:32   ` Bjorn Helgaas
2015-09-03 10:01     ` Lorenzo Pieralisi
2015-09-03 16:21       ` Bjorn Helgaas
2015-09-03 17:57         ` Lorenzo Pieralisi
2015-09-04 14:19         ` Lorenzo Pieralisi
2015-09-04 16:00           ` Yinghai Lu
2015-09-04 16:44             ` Lorenzo Pieralisi
2015-09-04 23:53               ` Yinghai Lu
2015-09-07  9:12                 ` Lorenzo Pieralisi
2015-09-14 10:09                   ` Lorenzo Pieralisi [this message]
2015-09-14 16:05                     ` Yinghai Lu
2015-09-14 16:28                       ` Lorenzo Pieralisi
2015-09-14 17:36                         ` Yinghai Lu
2015-09-14 23:58                           ` Yinghai Lu
2015-09-15  9:46                             ` Lorenzo Pieralisi
2015-09-15 15:57                               ` Bjorn Helgaas
2015-09-15 16:30                                 ` Lorenzo Pieralisi
2015-09-15 16:51                                   ` Guenter Roeck
2015-09-15 19:25                                     ` Bjorn Helgaas
2015-09-15 20:26                                       ` Yinghai Lu
2015-09-16  8:58                                       ` Lorenzo Pieralisi
2015-09-15 20:17                                     ` Yinghai Lu
2015-09-15 21:07                                       ` Guenter Roeck
2015-09-15 21:12                                         ` Yinghai Lu
2015-09-09 11:32                 ` Lorenzo Pieralisi
2015-09-09 16:59                   ` Yinghai Lu
2015-09-09 17:22                     ` Yinghai Lu
2015-09-09 17:38                       ` Lorenzo Pieralisi
2015-09-03 10:03     ` oe5hpm
2015-09-03 10:30       ` oe5hpm
2015-09-03 10:51         ` Lorenzo Pieralisi

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=20150914100929.GB18886@red-moon \
    --to=lorenzo.pieralisi@arm.com \
    --cc=benh@kernel.crashing.org \
    --cc=bhelgaas@google.com \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=jejb@parisc-linux.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=linux@roeck-us.net \
    --cc=mingo@redhat.com \
    --cc=monstr@monstr.eu \
    --cc=mpe@ellerman.id.au \
    --cc=oe5hpm@gmail.com \
    --cc=ralf@linux-mips.org \
    --cc=rth@twiddle.net \
    --cc=tony.luck@intel.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;
as well as URLs for NNTP newsgroup(s).