From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Ivan Kokshaysky <ink@jurassic.park.msu.ru>
Cc: Manfred Spraul <manfred@colorfullife.com>,
<linux-kernel@vger.kernel.org>, <torvalds@transmeta.com>
Subject: Re: [patch 2.5.31] transparent PCI-to-PCI bridges
Date: Wed, 28 Aug 2002 12:03:51 +0200 [thread overview]
Message-ID: <20020828100351.8648@192.168.4.1> (raw)
In-Reply-To: <20020828054001.B31036@jurassic.park.msu.ru>
>On Mon, Aug 26, 2002 at 10:12:24PM +0200, Benjamin Herrenschmidt wrote:
>> While we are at it, I still think the loop copying parent resource
>> pointers in the case of a transparent bridge should copy the 4
>> resource pointers of the parent and not only 3.
>
>I agree that hardcoding the resource numbers is bad.
>Instead, I suggest the following:
>s/bus->resource[0]/bus->io/
>s/bus->resource[1]/bus->mem/
>s/bus->resource[2]/bus->pref_mem/
>s/bus->resource[3]//
>
>There are only 3 _bus_ resources - the PCI works this way.
>
>Please don't propose your arch specific hacks to generic code.
I still don't agree, nothing in the _PCI_ force you to have
only 3 resources. a PCI 2 PCI bridge has 3 resources, here we
agree, but absolutely _nothing_ prevents a host bridge for
exposing more than one memory range, and that DOES happen
in a few real world cases like on pmac.
So we have this situation:
- Most of the common PCI code can deal with an arbitrary
number & ordering of resources in the pci_bus structure
- The pci_bus structure already holds 4 resource pointers
- Copying the all 4 instead of just 3 will not have any
side effect on machines that expose only 2 or 3 host bridge
resources.
I really don't understand your point here. Nothing defines
that a host bridge has to comply with the resource layout of
a PCI<->PCI bridge, why limit ourselves arbitrarily here ?
Especially since we _already_ have 4, not 3 resource slots
in the pci_bus structure...
Ben.
next prev parent reply other threads:[~2002-08-28 10:04 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-25 16:55 [patch 2.5.31] transparent PCI-to-PCI bridges 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 [this message]
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
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=20020828100351.8648@192.168.4.1 \
--to=benh@kernel.crashing.org \
--cc=ink@jurassic.park.msu.ru \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.