Re: [PATCH 2/2] PCI: make PCI host bridge/bus creating and destroying logic symmetric

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 7, 2013 at 6:51 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
>>
>> should split pci_release_host_bridge_dev renaming and moving to another patch.
>
> I split the rename/move to another patch and added both to my
> pci/jiang-bus-lock-v3 branch.

good.

>
>> > @@ -1726,30 +1722,21 @@ struct pci_bus *pci_create_root_bus(struct ..
...
>
> I think this function would be better if we created the host bridge
> first, then the bus.  But your patch is an improvement, so we can look
> at doing that later.

Yes, that will more straightforward, create hostbidge before root bus,
like we have pci bridge before subordinate bus under it.

current logic is

        b = pci_alloc_bus();
        if (!b)
                return NULL;

        b->sysdata = sysdata;
        b->ops = ops;
        b->number = b->busn_res.start = bus;
        b2 = pci_find_bus(pci_domain_nr(b), bus);
        if (b2) {
                /* If we already got to this bus through a different
bridge, ignore it */
                dev_dbg(&b2->dev, "bus already known\n");
                goto err_out;
        }

        bridge = pci_alloc_host_bridge(b);

We need to find the duplicated hostbridge or racing.

If we need call pci_alloc_host_bridge at first, we will need my
for_each_host_bridge patchset, and use it to check if there is
existing hostbridge.

>
>> looks like we don't need to split device_register to device_del and put_device.
>>
>> we can make root bus removal to use device_unregister too, in the patches,
>
> If we can use device_register()/device_unregister() directly instead of
> splitting them into initialize/add/del/put, that would be awesome.
>
> Anyway, http://git.kernel.org/cgit/linux/kernel/git/helgaas/pci.git/log/?h=pci/jiang-bus-lock-v3
> is the current state of what I've got.  If you want to iterate on this some
> more and improve things, that's great.  But please start with what's on my
> branch and post your updates as a complete v4 because I did tweak some
> changelogs and code formatting, and I don't want to lose that work.

ok, please consider drop
commit d751727a1792262cb464d8d9608500facb763301
    PCI: Make host bridge/bus creating and destroying logic symmetric
from pci/jiang-bus-lock-v3, and apply my three patches at

  https://patchwork.kernel.org/patch/2562431/
    [1/7] PCI: move back pci_proc_attach_devices calling
  https://patchwork.kernel.org/patch/2562461/
    [2/7] PCI: move resources and bus_list releasing to pci_release_dev
  https://patchwork.kernel.org/patch/2562451/
    [3/7] PCI: Detach driver in pci_stop_device

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux