mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Manfred Spraul <manfred@colorfullife.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 2.5.31] transparent PCI-to-PCI bridges
Date: Sat, 31 Aug 2002 01:57:16 +0400	[thread overview]
Message-ID: <20020831015716.B926@jurassic.park.msu.ru> (raw)
In-Reply-To: <20020830092825.16543@192.168.4.1>; from benh@kernel.crashing.org on Fri, Aug 30, 2002 at 11:28:25AM +0200

On Fri, Aug 30, 2002 at 11:28:25AM +0200, Benjamin Herrenschmidt wrote:
> THen why did the embedded folks at montavista redid their own
> pci_auto version (it Marcelo tree since latest merge) ? Not that
> I agree with them here, I haven't digged into that code yet and
> I'm pretty sure it could ultimately be replaced by setup-bus, but
> in it's current incarnation, setup-bus is definitely not suitable
> for PPC32. I must also make sure on ppc32's like pmac and CHRP that
> some critical devices do _NOT_ get moved around by the PCI code.

Indeed, 2.4 isn't usable for that. My fault - I have yet to back port
2.5 setup-bus stuff...

> I don't see why you insist on picking the P2P bridge as the basis
> of the definition of a pci_bus structure. It's a limiting definition,
> and again, the code wouldn't be much more complex, more bloated or
> whatever by beeing slightly more generic...

And less functional, unless I'm missing something fundamental.

Consider the following simplified cofiguration (not quite real life,
but very close).
Host bridge (similar to pmac, I think :-) with 2 memory regions:
256M at 0x80000000 and 16M at 0xf0000000. There is also PCI or, even better,
AGP bridge, non-transparent; two graphic cards, one PCI and other AGP, with
2 memory resources each: 128M framebuffer and 4K of MMIO registers.
The memory window of the AGP bridge must be at least 129M (128M + 4K rounded
up to 1M).
Obviously, this window + 128M range of the PCI card won't fit in the
256M region of the host bridge. So, the only way to get all this working
is to set AGP bridge window such that it overlaps both regions
of the host bridge. Like this:
0x80000000-0x87ffffff           - PCI card, fb
0x88000000-0xf00fffff           - AGP bridge, memory window
        0x88000000-0x8fffffff   - AGP card, fb
        0x90000000-0xefffffff   - empty
        0xf0000000-0xf0000fff   - AGP card, MMIO
0xf0100000-0xf0100fff           - PCI card, MMIO

I don't see how you can cope with it using 2 separate bus resources -
the memory resource of the AGP bridge wouldn't have a valid parent.
OTOH, if you expose a _single_ memory resource of the host bridge
(0x80000000-0xf0ffffff) and write your pcibios_align_resource()
such that it won't allow allocation of non-bridge resources in the
0x90000000-0xefffffff range, everything is fine.

Please prove me that I'm wrong. :-)

Ivan.

  reply	other threads:[~2002-08-31  7:36 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-25 16:55 Manfred Spraul
2002-08-26 13:57 ` Ivan Kokshaysky
2002-08-26 17:42   ` Linus Torvalds
2002-08-28  0:58     ` Ivan Kokshaysky
2002-08-28  1:29       ` Linus Torvalds
2002-08-30 21:38         ` [patch 2.5.32] " Ivan Kokshaysky
2002-08-26 20:12   ` [patch 2.5.31] " Benjamin Herrenschmidt
2002-08-28  1:40     ` Ivan Kokshaysky
2002-08-28 10:03       ` Benjamin Herrenschmidt
2002-08-28 17:35         ` Linus Torvalds
2002-08-28 18:35           ` Benjamin Herrenschmidt
2002-08-29 23:53           ` Ivan Kokshaysky
2002-08-30  9:28             ` Benjamin Herrenschmidt
2002-08-30 21:57               ` Ivan Kokshaysky [this message]
2002-08-30 20:19                 ` Benjamin Herrenschmidt
2002-08-31 10:42                   ` Ivan Kokshaysky
2002-08-31 15:06                     ` Alan Cox
2002-08-31 16:49                       ` Linus Torvalds
2002-08-31 22:40                         ` Ivan Kokshaysky
2002-08-31  8:09                 ` Benjamin Herrenschmidt
2002-08-30 17:12             ` Linus Torvalds
2002-08-30 22:23               ` Ivan Kokshaysky
2002-08-31  8:09                 ` Benjamin Herrenschmidt
2002-08-31 13:12                   ` Ivan Kokshaysky
2002-08-31 16:29                 ` Linus Torvalds
  -- strict thread matches above, loose matches on Subject: below --
2002-08-24 20:17 Ivan Kokshaysky

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=20020831015716.B926@jurassic.park.msu.ru \
    --to=ink@jurassic.park.msu.ru \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    --cc=torvalds@transmeta.com \
    /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®