From: David Gibson <david@gibson.dropbear.id.au>
To: Eduardo Habkost <ehabkost@redhat.com>
Cc: qemu-devel@nongnu.org, aik@ozlabs.ru,
David Gibson <dgibson@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Laszlo Ersek <lersek@redhat.com>,
Marcel Apfelbaum <marcel@redhat.com>
Subject: Re: [Qemu-devel] [RFC v2 1/6] pci: Inline pci_host_bus_register() inside pci_bus_init()
Date: Wed, 19 Apr 2017 10:22:11 +1000 [thread overview]
Message-ID: <20170419002211.GA23273@umbus.fritz.box> (raw)
In-Reply-To: <20170418221724.5707-2-ehabkost@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1844 bytes --]
On Tue, Apr 18, 2017 at 07:17:19PM -0300, Eduardo Habkost wrote:
1;4601;0c> There's no need for a separate function just to append an item to
> pci_host_bridges.
>
> Cc: "Michael S. Tsirkin" <mst@redhat.com>
> Cc: Marcel Apfelbaum <marcel@redhat.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
> ---
> hw/pci/pci.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
>
> diff --git a/hw/pci/pci.c b/hw/pci/pci.c
> index 259483b1c0..328f36cd21 100644
> --- a/hw/pci/pci.c
> +++ b/hw/pci/pci.c
> @@ -312,13 +312,6 @@ static void pcibus_reset(BusState *qbus)
> }
> }
>
> -static void pci_host_bus_register(DeviceState *host)
> -{
> - PCIHostState *host_bridge = PCI_HOST_BRIDGE(host);
> -
> - QLIST_INSERT_HEAD(&pci_host_bridges, host_bridge, next);
> -}
> -
> PCIBus *pci_find_primary_bus(void)
> {
> PCIBus *primary_bus = NULL;
> @@ -369,6 +362,8 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent,
> MemoryRegion *address_space_io,
> uint8_t devfn_min)
> {
> + PCIHostState *phb = PCI_HOST_BRIDGE(parent);
> +
> assert(PCI_FUNC(devfn_min) == 0);
> bus->devfn_min = devfn_min;
> bus->address_space_mem = address_space_mem;
> @@ -377,7 +372,7 @@ static void pci_bus_init(PCIBus *bus, DeviceState *parent,
> /* host bridge */
> QLIST_INIT(&bus->child);
>
> - pci_host_bus_register(parent);
> + QLIST_INSERT_HEAD(&pci_host_bridges, phb, next);
> }
>
> bool pci_bus_is_express(PCIBus *bus)
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2017-04-19 0:32 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 22:17 [Qemu-devel] [RFC v2 0/6] pci: Refactor PCI root bus creation code Eduardo Habkost
2017-04-18 22:17 ` [Qemu-devel] [RFC v2 1/6] pci: Inline pci_host_bus_register() inside pci_bus_init() Eduardo Habkost
2017-04-19 0:22 ` David Gibson [this message]
2017-04-19 18:09 ` Marcel Apfelbaum
2017-04-18 22:17 ` [Qemu-devel] [RFC v2 2/6] pci: Move pci_bus_init() logic to pci_bus_new_inplace() Eduardo Habkost
2017-04-19 0:23 ` David Gibson
2017-04-19 18:31 ` Marcel Apfelbaum
2017-04-25 19:24 ` Eduardo Habkost
2017-04-18 22:17 ` [Qemu-arm] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions Eduardo Habkost
2017-04-18 22:17 ` [Qemu-devel] " Eduardo Habkost
2017-04-19 0:29 ` David Gibson
2017-04-19 0:29 ` David Gibson
2017-04-19 1:42 ` [Qemu-arm] " Eduardo Habkost
2017-04-19 1:42 ` [Qemu-devel] " Eduardo Habkost
2017-04-19 12:05 ` [Qemu-arm] " Cornelia Huck
2017-04-19 12:05 ` [Qemu-devel] " Cornelia Huck
2017-04-19 18:41 ` [Qemu-arm] " Marcel Apfelbaum
2017-04-19 18:41 ` [Qemu-devel] " Marcel Apfelbaum
2017-04-19 21:19 ` Eduardo Habkost
2017-04-19 21:19 ` Eduardo Habkost
2017-04-19 8:41 ` [Qemu-arm] " Peter Maydell
2017-04-19 8:41 ` [Qemu-devel] " Peter Maydell
2017-04-19 12:50 ` [Qemu-arm] " Eduardo Habkost
2017-04-19 12:50 ` [Qemu-devel] " Eduardo Habkost
2017-04-20 5:04 ` [Qemu-arm] " David Gibson
2017-04-20 5:04 ` [Qemu-devel] " David Gibson
2017-04-18 22:17 ` [Qemu-devel] [RFC v2 4/6] pci: Manually simplify QOM casts at pci_host_bus_init*() calls Eduardo Habkost
2017-04-19 0:30 ` David Gibson
2017-04-18 22:17 ` [Qemu-devel] [RFC v2 5/6] pci: Set phb->bus inside pci_host_bus_init_inplace() Eduardo Habkost
2017-04-18 22:17 ` Eduardo Habkost
2017-04-18 22:17 ` [Qemu-devel] [RFC v2 6/6] pci: Remove unnecessary PCIBus variables Eduardo Habkost
2017-04-19 12:20 ` Cornelia Huck
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=20170419002211.GA23273@umbus.fritz.box \
--to=david@gibson.dropbear.id.au \
--cc=aik@ozlabs.ru \
--cc=dgibson@redhat.com \
--cc=ehabkost@redhat.com \
--cc=lersek@redhat.com \
--cc=marcel@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.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.