[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAErSpo7MFajXaQe52gXdVjaMLRU2Cpcu88QjM+Mw_22bArwF7w@mail.gmail.com>
Date: Mon, 27 Feb 2012 16:00:15 -0700
From: Bjorn Helgaas <bhelgaas@...gle.com>
To: Yinghai Lu <yinghai@...nel.org>
Cc: Jesse Barnes <jbarnes@...tuousgeek.org>, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 5/8] PCI: add generic device into pci_host_bridge struct
On Mon, Feb 27, 2012 at 3:55 PM, Yinghai Lu <yinghai@...nel.org> wrote:
> On Mon, Feb 27, 2012 at 2:24 PM, Bjorn Helgaas <bhelgaas@...gle.com> wrote:
>>>
>>> for every bus will have ->bridge, and that is device pointer. to pci
>>> bridge dev.
>>>
>>> for root bus, there is not pci bridge for that. So create_root_bus
>>> allocate local dummy one.
>>>
>>> that dummy device will be bus->dev's parent.
>>>
>>> Now pci_host_bridge is added, and it is allocated, so just put the
>>> struct device into that pci_host_bridge.
>>>
>>> and use pci_host_bridge->dev as parent of root bus->dev's parent.
>>
>> What's the device passed in to pci_create_root_bus()? Why is that
>> different than the root bus dev's parent?
>
> ia64 and x86 doesn't pass that.
>
> arch/ia64/pci/pci.c: pbus = pci_create_root_bus(NULL, bus,
> &pci_root_ops, controller,
> arch/powerpc/kernel/pci-common.c: bus =
> pci_create_root_bus(hose->parent, hose->first_busno,
> arch/sparc/kernel/pci.c: bus = pci_create_root_bus(parent,
> pbm->pci_first_busno, pbm->pci_ops,
> arch/x86/pci/acpi.c: bus = pci_create_root_bus(NULL,
> busnum, &pci_root_ops, sd,
> drivers/parisc/dino.c: dino_dev->hba.hba_bus = bus =
> pci_create_root_bus(&dev->dev,
> drivers/parisc/lba_pci.c: pci_create_root_bus(&dev->dev,
> lba_dev->hba.bus_num.start,
>
> sparc, powerpc, parisc have their local ...
>
> so local hose etc's dev ---> allocated dev ---> root bus's dev
>
> this patch change to
>
> local hose etc's dev ---> allocated host bridge's dev ---> root bus's dev
Why do we have a separate dev for the hose and the root bus's dev?
The hose *is* a PCI host bridge.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists