From: Ram Pai <linuxram@us.ibm.com>
To: Jiang Liu <liuj97@gmail.com>
Cc: Ram Pai <linuxram@us.ibm.com>, Yinghai Lu <yinghai@kernel.org>,
Bjorn Helgaas <bhelgaas@google.com>,
Richard Yang <weiyang@linux.vnet.ibm.com>,
linux-pci@vger.kernel.org, Gavin Shan <shangw@linux.vnet.ibm.com>
Subject: Re: One chart on pci bridge and its bus and their children
Date: Wed, 6 Jun 2012 00:40:19 +0800 [thread overview]
Message-ID: <20120605164019.GF6637@ram-ThinkPad-T61> (raw)
In-Reply-To: <4FCE1AA3.5070601@gmail.com>
On Tue, Jun 05, 2012 at 10:41:39PM +0800, Jiang Liu wrote:
> On 06/05/2012 02:35 PM, Ram Pai wrote:
> > On Mon, Jun 04, 2012 at 10:20:51PM -0700, Yinghai Lu wrote:
> >> On Mon, Jun 4, 2012 at 10:18 PM, Yinghai Lu <yinghai@kernel.org> wrote:
> >>> On Mon, Jun 4, 2012 at 9:37 PM, Bjorn Helgaas <bhelgaas@google.com> wrote:
> >>>> That's true, but I don't think it answers the question. If we have:
> >>>>
> >>>> pci_bus->bridge == pci_bus->self->dev
> >>>>
> >>>> why would we need both "self" and "bridge"? It would be interesting
> >>>> to try to remove "bridge" and replace uses of it with "self->dev".
> >>>
> >>> then how about root bus?
> >>>
> >>> root bus ->self should be NULL.
> >>>
> >>> root bus ->bridge is to the hostbridge->dev.
> >
> > Yinghai,
> >
> > is there a reason why this can't be fixed in
> > pci_create_root_bus() by having
> > bus->self = bridge; /* 'bridge' is the pci_device of the corresponding host bridge */
> Hi Ram,
> A host bridge has no associated pci_device because it's out of the
> PCI domain. PCI domain only covers the hierarchy starting from the host bridge,
> but doesn't include the host bridge itself.
That makes it even easier to kill pci_bus->bridge.
for non-root buses, we can access the bridge's device using
bus->self->dev and for root bridges we can silently ignore
the bridge's dev since we know that it does not exist; because
pci_bus->self is null.
No?
RP
next prev parent reply other threads:[~2012-06-05 16:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-05 3:26 One chart on pci bridge and its bus and their children Richard Yang
2012-06-05 4:11 ` Ram Pai
2012-06-05 4:37 ` Bjorn Helgaas
2012-06-05 5:18 ` Yinghai Lu
2012-06-05 5:20 ` Yinghai Lu
2012-06-05 5:41 ` Richard Yang
2012-06-05 6:35 ` Ram Pai
2012-06-05 14:41 ` Jiang Liu
2012-06-05 16:40 ` Ram Pai [this message]
2012-06-06 1:58 ` Ram Pai
2012-06-05 19:38 ` Yinghai Lu
2012-06-06 5:28 ` Richard Yang
2012-06-06 7:58 ` Richard Yang
2012-06-05 21:52 ` Gavin Shan
2012-06-05 6:02 ` Richard Yang
2012-06-05 14:32 ` Jiang Liu
2012-06-05 14:37 ` Jiang Liu
2012-06-05 19:41 ` Yinghai Lu
2012-06-05 5:33 ` Richard Yang
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=20120605164019.GF6637@ram-ThinkPad-T61 \
--to=linuxram@us.ibm.com \
--cc=bhelgaas@google.com \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=shangw@linux.vnet.ibm.com \
--cc=weiyang@linux.vnet.ibm.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 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.