From: Yinghai Lu <yinghai@kernel.org>
To: Jiang Liu <liuj97@gmail.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
Jiang Liu <jiang.liu@huawei.com>,
"Rafael J . Wysocki" <rjw@sisk.pl>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Gu Zheng <guz.fnst@cn.fujitsu.com>,
Toshi Kani <toshi.kani@hp.com>,
Myron Stowe <myron.stowe@redhat.com>,
Yijing Wang <wangyijing@huawei.com>,
"linux-pci@vger.kernel.org" <linux-pci@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [RFC PATCH v2, part 2 01/18] PCI: introduce hotplug-safe PCI bus iterators
Date: Tue, 14 May 2013 11:56:23 -0700 [thread overview]
Message-ID: <CAE9FiQU89jOx_-EFZnKsETEDDbmEmDctmYraNENAwt14FkCvXQ@mail.gmail.com> (raw)
In-Reply-To: <1368550322-1045-1-git-send-email-jiang.liu@huawei.com>
On Tue, May 14, 2013 at 9:51 AM, Jiang Liu <liuj97@gmail.com> wrote:
> Introduce hotplug-safe PCI bus iterators as below, which hold a
> reference on the returned PCI bus object.
> bool pci_bus_exists(int domain, int busnr);
> struct pci_bus *pci_get_bus(int domain, int busnr);
> struct pci_bus *pci_get_next_bus(struct pci_bus *from);
> struct pci_bus *pci_get_next_root_bus(struct pci_bus *from);
> #define for_each_pci_bus(b) for (b = NULL; (b = pci_get_next_bus(b)); )
> #define for_each_pci_root_bus(b) \
> for (b = NULL; (b = pci_get_next_root_bus(b)); )
>
> The long-term goal is to remove hotplug-unsafe pci_find_bus(),
> pci_find_next_bus() and the global pci_root_buses list.
>
> These new interfaces may be a littler slower than existing interfaces,
> but it should be acceptable because they are not used on hot paths.
>
> Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
> Cc: linux-pci@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
Acked-by: Yinghai Lu <yinghai@kernel.org>
prev parent reply other threads:[~2013-05-14 18:56 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-14 16:51 [RFC PATCH v2, part 2 01/18] PCI: introduce hotplug-safe PCI bus iterators Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 02/18] PCI, core: use hotplug-safe iterators to walk PCI buses Jiang Liu
2013-05-14 18:55 ` Yinghai Lu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 03/18] PCI, hotplug: " Jiang Liu
2013-05-14 18:57 ` Yinghai Lu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 04/18] PCI, Alpha: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 05/18] PCI, FRV: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 06/18] PCI, IA64: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 07/18] PCI, Microblaze: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 08/18] PCI, mn10300: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 09/18] PCI, PPC: " Jiang Liu
2013-05-14 23:30 ` Benjamin Herrenschmidt
2013-05-15 15:07 ` Liu Jiang
2013-05-15 15:17 ` Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 10/18] PCI, SPARC: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 11/18] PCI, x86: " Jiang Liu
2013-05-14 18:59 ` Yinghai Lu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 12/18] PCI, ACPI: " Jiang Liu
2013-05-14 20:28 ` Rafael J. Wysocki
2013-05-14 16:51 ` [RFC PATCH v2, part 2 13/18] PCI, DRM: " Jiang Liu
2013-05-14 16:51 ` [RFC PATCH v2, part 2 14/18] PCI, EDAC: use hotplug-safe PCI bus " Jiang Liu
2013-05-22 4:12 ` Gu Zheng
2013-05-25 15:18 ` Liu Jiang
2013-05-14 16:51 ` [RFC PATCH v2, part 2 15/18] PCI, via-camera: use hotplug-safe " Jiang Liu
2013-05-14 16:52 ` [RFC PATCH v2, part 2 16/18] PCI, iommu: " Jiang Liu
2013-05-14 22:13 ` Don Dutile
2013-05-15 15:36 ` Liu Jiang
2013-05-14 16:52 ` [RFC PATCH v2, part 2 17/18] PCI, eeepc-laptop: " Jiang Liu
2013-05-14 16:52 ` [RFC PATCH v2, part 2 18/18] PCI, asus-wmi: " Jiang Liu
2013-05-14 17:05 ` [RFC PATCH v2, part 2 01/18] PCI: introduce hotplug-safe PCI bus iterators Greg Kroah-Hartman
2013-05-15 14:42 ` Liu Jiang
2013-05-15 14:51 ` Liu Jiang
2013-05-14 18:56 ` Yinghai Lu [this message]
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=CAE9FiQU89jOx_-EFZnKsETEDDbmEmDctmYraNENAwt14FkCvXQ@mail.gmail.com \
--to=yinghai@kernel.org \
--cc=bhelgaas@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=guz.fnst@cn.fujitsu.com \
--cc=jiang.liu@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=liuj97@gmail.com \
--cc=myron.stowe@redhat.com \
--cc=rjw@sisk.pl \
--cc=toshi.kani@hp.com \
--cc=wangyijing@huawei.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;
as well as URLs for NNTP newsgroup(s).