qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: Paolo Bonzini <pbonzini@redhat.com>
Subject: [Qemu-devel] [PULL 13/19] pci: do not export pci_bus_reset
Date: Mon, 23 Dec 2013 18:12:07 +0200	[thread overview]
Message-ID: <1387815007-1272-14-git-send-email-mst@redhat.com> (raw)
In-Reply-To: <1387815007-1272-1-git-send-email-mst@redhat.com>

From: Paolo Bonzini <pbonzini@redhat.com>

qbus_reset_all can be used instead.  There is no semantic change
because pcibus_reset returns 1 and takes care of the device
tree traversal.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
 include/hw/pci/pci.h | 1 -
 hw/pci/pci.c         | 8 ++------
 hw/pci/pci_bridge.c  | 2 +-
 3 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h
index b783e68..754b82d 100644
--- a/include/hw/pci/pci.h
+++ b/include/hw/pci/pci.h
@@ -373,7 +373,6 @@ void pci_bus_fire_intx_routing_notifier(PCIBus *bus);
 void pci_device_set_intx_routing_notifier(PCIDevice *dev,
                                           PCIINTxRoutingNotifier notifier);
 void pci_device_reset(PCIDevice *dev);
-void pci_bus_reset(PCIBus *bus);
 
 PCIDevice *pci_nic_init(NICInfo *nd, PCIBus *rootbus,
                         const char *default_model,
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index 82c11ec..83ea0a0 100644
--- a/hw/pci/pci.c
+++ b/hw/pci/pci.c
@@ -212,8 +212,9 @@ void pci_device_reset(PCIDevice *dev)
  * Trigger pci bus reset under a given bus.
  * To be called on RST# assert.
  */
-void pci_bus_reset(PCIBus *bus)
+static int pcibus_reset(BusState *qbus)
 {
+    PCIBus *bus = DO_UPCAST(PCIBus, qbus, qbus);
     int i;
 
     for (i = 0; i < bus->nirq; i++) {
@@ -224,11 +225,6 @@ void pci_bus_reset(PCIBus *bus)
             pci_device_reset(bus->devices[i]);
         }
     }
-}
-
-static int pcibus_reset(BusState *qbus)
-{
-    pci_bus_reset(DO_UPCAST(PCIBus, qbus, qbus));
 
     /* topology traverse is done by pci_bus_reset().
        Tell qbus/qdev walker not to traverse the tree */
diff --git a/hw/pci/pci_bridge.c b/hw/pci/pci_bridge.c
index f72872e..098c50a 100644
--- a/hw/pci/pci_bridge.c
+++ b/hw/pci/pci_bridge.c
@@ -268,7 +268,7 @@ void pci_bridge_write_config(PCIDevice *d,
     newctl = pci_get_word(d->config + PCI_BRIDGE_CONTROL);
     if (~oldctl & newctl & PCI_BRIDGE_CTL_BUS_RESET) {
         /* Trigger hot reset on 0->1 transition. */
-        pci_bus_reset(&s->sec_bus);
+        qbus_reset_all(&s->sec_bus.qbus);
     }
 }
 
-- 
MST

  parent reply	other threads:[~2013-12-23 16:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-23 16:11 [Qemu-devel] [PULL 00/19] acpi, pci, pc, fedora, virtio fixes and enhancements Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 01/19] piix: gigabyte alignment for ram Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 02/19] pc_piix: document gigabyte_align Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 03/19] hw/i386/pc_sysfw: support two flash drives Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 04/19] i440fx-test: qtest_start() should be paired with qtest_end() Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 05/19] i440fx-test: give each GTest case its own qtest Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 06/19] i440fx-test: generate temporary firmware blob Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 07/19] i440fx-test: verify firmware under 4G and 1M, both -bios and -pflash Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 08/19] acpi: piix4: remove not needed GPE0 mask Michael S. Tsirkin
2013-12-23 16:11 ` [Qemu-devel] [PULL 09/19] acpi: factor out common pm_update_sci() into acpi core Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 10/19] acpi: ich9: allow guest to clear SCI rised by GPE Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 11/19] ACPI: Q35 DSDT: fix CPU hotplug GPE0.2 handler Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 12/19] ACPI/DSDT-CPU: cleanup bogus comment Michael S. Tsirkin
2013-12-23 16:12 ` Michael S. Tsirkin [this message]
2013-12-23 16:12 ` [Qemu-devel] [PULL 14/19] pci: clean up resetting of IRQs Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 15/19] qdev: allow both pre- and post-order vists in qdev walking functions Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 16/19] qdev: switch reset to post-order Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 17/19] piix: fix 32bit pci hole Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 18/19] virtio: add back call to virtio_bus_device_unplugged Michael S. Tsirkin
2013-12-23 16:12 ` [Qemu-devel] [PULL 19/19] target-arm: fix build with gcc 4.8.2 Michael S. Tsirkin

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=1387815007-1272-14-git-send-email-mst@redhat.com \
    --to=mst@redhat.com \
    --cc=pbonzini@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).