From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Grant Grundler <grundler@dsl2.external.hp.com>,
Linux kernel mailing list <linux-kernel@vger.kernel.org>,
Jeff Garzik <jgarzik@mandrakesoft.com>,
"David S. Miller" <davem@redhat.com>
Subject: Re: PCI<->PCI bridges, transparent resource fix
Date: Fri, 9 Aug 2002 21:01:28 +0400 [thread overview]
Message-ID: <20020809210128.A17979@jurassic.park.msu.ru> (raw)
In-Reply-To: <20020809062930.32120@smtp.wanadoo.fr>; from benh@kernel.crashing.org on Fri, Aug 09, 2002 at 08:29:30AM +0200
On Fri, Aug 09, 2002 at 08:29:30AM +0200, Benjamin Herrenschmidt wrote:
> I do have 3 root busses, that's not a problem. But their resources
> are all childs of the global iomem_resources which sorta represents
> the system memory bus.
Child<->parent resource relationship between system and PCI buses
not only isn't required, but might be simply impossible in some situations.
Consider non-linear (or linear, but just not 1:1) mapping between
system and PCI bus addressing. Or even no mapping at all. ;-)
Yes, most architectures use global resources as parents of PCI resources -
just because it happens to work and is convenient. But this doesn't mean
that everybody must do the same.
> Well... at one point, I had more than that :( I added some code to
> coalesce the ranges provided by the firmware and figured out it
> mostly turned into 1 big range of 256 or 512Mb, one small in the
> 0xfx000000 region, and one IO. So that should fit. But nothing prevents
> the firmware from setting things up differently.
Exactly. One day, after firmware update, you may end up asking for
a bit more resource slots. :-)
BTW, do you really need that additional small IOMEM range?
> They should probably then, but I haven't quite looked at the cardbus
> code yet. I still think the resource management should be generic
> enough not to rely on ordering & number of resources, as the actual
> informations we want out of the parent resources are already encoded
> in the flags (that is knowing if we deal with the parent IO window,
> MEM window, or MEM+prefetch window). We have generic routines
> working only on flags for finding parents when populating the
> tree already.
This would add a lot of unneeded complexity to the code in
drivers/pci/setup-bus.c. Also, this would make impossible
configurations like this:
root bus windows 0x80000000-0x8fffffff
0xf0000000-0xf0ffffff
pci-pci bridge window 0x80200000-0xf02fffff
which is perfectly valid in your setup unless you
place some device resources in the range 0x90000000-0xefffffff.
BTW, you can avoid that range with properly coded pcibios_align_resource() -
maybe this would be cleaner solution than allocating dummy resource.
> But that isn't an urgent issue nor difficult to work around if
> needed, so let's put that on hold until I can prove we really need
> all of those ;)
Ok. But IMO, you're trying to expose your host bridge internals to
the generic code instead of hiding it...
Ivan.
next prev parent reply other threads:[~2002-08-09 16:58 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20020807042402.A4840@jurassic.park.msu.ru>
2002-08-06 20:31 ` Benjamin Herrenschmidt
2002-08-07 16:03 ` Ivan Kokshaysky
2002-08-08 8:20 ` Benjamin Herrenschmidt
2002-08-08 13:21 ` Ivan Kokshaysky
2002-08-09 6:29 ` Benjamin Herrenschmidt
2002-08-09 17:01 ` Ivan Kokshaysky [this message]
2002-08-09 21:14 ` Benjamin Herrenschmidt
[not found] <20020806192951.7E6B44829@dsl2.external.hp.com>
2002-08-06 19:20 ` Benjamin Herrenschmidt
2002-08-07 5:54 ` Grant Grundler
2002-08-06 21:02 ` Benjamin Herrenschmidt
2002-08-07 18:30 ` Grant Grundler
2002-08-08 11:30 ` Ivan Kokshaysky
2002-08-09 7:07 ` Grant Grundler
2002-08-09 8:06 ` Benjamin Herrenschmidt
2002-08-09 17:16 ` Ivan Kokshaysky
2002-08-06 18:44 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=20020809210128.A17979@jurassic.park.msu.ru \
--to=ink@jurassic.park.msu.ru \
--cc=benh@kernel.crashing.org \
--cc=davem@redhat.com \
--cc=grundler@dsl2.external.hp.com \
--cc=jgarzik@mandrakesoft.com \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®