From: Eduardo Habkost <ehabkost@redhat.com>
To: qemu-devel@nongnu.org
Cc: 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: [Qemu-devel] [RFC v2 0/6] pci: Refactor PCI root bus creation code
Date: Tue, 18 Apr 2017 19:17:18 -0300 [thread overview]
Message-ID: <20170418221724.5707-1-ehabkost@redhat.com> (raw)
Changes v1 -> v2:
* Original series subject:
"pci: Type-safety and phb->bus initialization cleanup"
* In addition to changing function signatures, also rename the
functions to pci_host_bus_init*()
* Inline pci_bus_init() and pci_host_bus_register() inside their
callers
* Remove unnecessary PCIBus* variables
The purpose of the pci_bus_new*() and pci_register_bus() is not
clear from their signatures: they look like generic functions to
create PCI buss, but the functions work only when creating a root
bus in a PCI host bridge.
This series implements the following changes:
1) Rename pci_bus_new*() and pci_register_bus() to
pci_host_bus_init*()
2) Replace DeviceState with PCIHostState on their argument type,
because they already require a PCI_HOST_BRIDGE object
3) Move PCIHostState::bus initialization inside pci_host_bus_init*(),
to avoid code duplication and make sure the field will be
always initialized consistently.
Eduardo Habkost (6):
pci: Inline pci_host_bus_register() inside pci_bus_init()
pci: Move pci_bus_init() logic to pci_bus_new_inplace()
pci: Rename and change signatures of pci_bus_new() & related functions
pci: Manually simplify QOM casts at pci_host_bus_init*() calls
pci: Set phb->bus inside pci_host_bus_init_inplace()
pci: Remove unnecessary PCIBus variables
include/hw/pci/pci.h | 31 +++++++-------
hw/alpha/typhoon.c | 17 ++++----
hw/mips/gt64xxx_pci.c | 9 ++---
hw/pci-bridge/pci_expander_bridge.c | 14 +++----
hw/pci-host/apb.c | 7 +---
hw/pci-host/bonito.c | 7 ++--
hw/pci-host/gpex.c | 6 +--
hw/pci-host/grackle.c | 10 ++---
hw/pci-host/piix.c | 30 +++++++-------
hw/pci-host/ppce500.c | 14 +++----
hw/pci-host/prep.c | 7 ++--
hw/pci-host/q35.c | 5 +--
hw/pci-host/uninorth.c | 18 +++------
hw/pci-host/versatile.c | 8 ++--
hw/pci-host/xilinx-pcie.c | 6 +--
hw/pci/pci.c | 81 +++++++++++++++++--------------------
hw/ppc/ppc4xx_pci.c | 10 ++---
hw/ppc/spapr_pci.c | 11 ++---
hw/s390x/s390-pci-bus.c | 13 +++---
hw/sh4/sh_pci.c | 9 ++---
20 files changed, 135 insertions(+), 178 deletions(-)
--
2.11.0.259.g40922b1
next reply other threads:[~2017-04-18 22:17 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-18 22:17 Eduardo Habkost [this message]
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
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-devel] [RFC v2 3/6] pci: Rename and change signatures of pci_bus_new() & related functions Eduardo Habkost
2017-04-19 0:29 ` David Gibson
2017-04-19 1:42 ` Eduardo Habkost
2017-04-19 12:05 ` Cornelia Huck
2017-04-19 18:41 ` Marcel Apfelbaum
2017-04-19 21:19 ` Eduardo Habkost
2017-04-19 8:41 ` Peter Maydell
2017-04-19 12:50 ` Eduardo Habkost
2017-04-20 5:04 ` 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 ` [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=20170418221724.5707-1-ehabkost@redhat.com \
--to=ehabkost@redhat.com \
--cc=aik@ozlabs.ru \
--cc=dgibson@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 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).