public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel•crashing.org>
To: Bjorn Helgaas <bhelgaas@google•com>
Cc: linux-arch@vger•kernel.org, Tony Luck <tony.luck@intel•com>,
	Yinghai Lu <yinghai@kernel•org>,
	linuxppc-dev@lists•ozlabs.org, linux-pci@vger•kernel.org,
	linux-kernel@vger•kernel.org,
	Dominik Brodowski <linux@dominikbrodowski•net>,
	Paul Mackerras <paulus@samba•org>,
	Jesse Barnes <jbarnes@virtuousgeek•org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation•org>,
	Andrew Morton <akpm@linux-foundation•org>,
	Linus Torvalds <torvalds@linux-foundation•org>
Subject: Re: [PATCH 08/18] PCI, powerpc: Register busn_res for root buses
Date: Tue, 28 Feb 2012 19:54:32 +1100	[thread overview]
Message-ID: <1330419272.11728.27.camel@pasglop> (raw)
In-Reply-To: <CAErSpo4bw-V=SM+h5iP4nfv3HaAnHjwvNwu+4Oz8iyQcY_3gOQ@mail.gmail.com>

On Mon, 2012-02-27 at 22:36 -0700, Bjorn Helgaas wrote:
> 
> There's a lot of powerpc code that does this:
> 
>     bus_range = of_get_property(pcictrl, "bus-range", &len);
>     hose->first_busno = bus_range[0];
>     hose->last_busno = bus_range[1];
> 
> That *looks* like it is discovering the bus number aperture.  Is it?
> If it is, why are we using the largest bus number found by
> pci_scan_child_bus() rather than "last_busno"?

We do that but we somewhat -also- rely on the core bumping it if it
needs to make room :-)

As I said, we are swimming in dirty waters between reverse engineered
stuff we don't know 100% and "designed" stuff.

I think we should have ways to more explicitely define what we want tho,
ie whether hose->last_busno is just what happens to be the "current" bus
number assigned by the firmware or the hard max. Maybe a pci flag ?

On the other hand some platforms (all the ppc4xx ones for example) set
the flag to reassign all busses ... but have limit on bus numbers simply
because they have a memory mapped only config space and we don't have
enough address space to ioremap it all on 32-bit.

We need to fix them to use a fixmap entry to do atomic on-demand mapping
of the config space and lift that restriction, but that isn't done yet.

So I think those patches will need really careful handling on our side.

Cheers,
Ben.

  reply	other threads:[~2012-02-28  8:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1330395009-29260-1-git-send-email-yinghai@kernel.org>
2012-02-28  2:09 ` [PATCH 08/18] PCI, powerpc: Register busn_res for root buses Yinghai Lu
2012-02-28  5:36   ` Bjorn Helgaas
2012-02-28  8:54     ` Benjamin Herrenschmidt [this message]
2012-02-28 23:31     ` Bjorn Helgaas
2012-02-28 23:41       ` Benjamin Herrenschmidt
2012-04-02  9:58         ` Milton Miller
2012-04-02 10:19         ` Milton Miller
2012-04-02 21:22           ` Benjamin Herrenschmidt

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=1330419272.11728.27.camel@pasglop \
    --to=benh@kernel$(echo .)crashing.org \
    --cc=akpm@linux-foundation$(echo .)org \
    --cc=bhelgaas@google$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=jbarnes@virtuousgeek$(echo .)org \
    --cc=linux-arch@vger$(echo .)kernel.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pci@vger$(echo .)kernel.org \
    --cc=linux@dominikbrodowski$(echo .)net \
    --cc=linuxppc-dev@lists$(echo .)ozlabs.org \
    --cc=paulus@samba$(echo .)org \
    --cc=tony.luck@intel$(echo .)com \
    --cc=torvalds@linux-foundation$(echo .)org \
    --cc=yinghai@kernel$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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