qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@linux.vnet.ibm.com>
To: qemu-trivial@nongnu.org
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
	qemu-devel@nongnu.org, Anthony Liguori <aliguori@amazon.com>,
	Thomas Huth <thuth@linux.vnet.ibm.com>
Subject: [Qemu-devel] [PATCH 3/8] pci: Remove unused functions
Date: Mon,  9 Mar 2015 18:30:10 +0100	[thread overview]
Message-ID: <1425922215-20819-4-git-send-email-thuth@linux.vnet.ibm.com> (raw)
In-Reply-To: <1425922215-20819-1-git-send-email-thuth@linux.vnet.ibm.com>

The functions pcie_ari_init(), pcie_cap_is_arifwd_enabled()
and ich9_d2pbr_init() are completely unused and thus can
be deleted.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Cc: Michael S. Tsirkin <mst@redhat.com>
Cc: Anthony Liguori <aliguori@amazon.com>
---
 hw/pci-bridge/i82801b11.c |   21 ---------------------
 hw/pci/pcie.c             |   25 -------------------------
 include/hw/i386/ich9.h    |    1 -
 include/hw/pci/pcie.h     |    3 ---
 4 files changed, 0 insertions(+), 50 deletions(-)

diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c
index 14cd7fd..7e79bc0 100644
--- a/hw/pci-bridge/i82801b11.c
+++ b/hw/pci-bridge/i82801b11.c
@@ -101,27 +101,6 @@ static const TypeInfo i82801b11_bridge_info = {
     .class_init    = i82801b11_bridge_class_init,
 };
 
-PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus)
-{
-    PCIDevice *d;
-    PCIBridge *br;
-    char buf[16];
-    DeviceState *qdev;
-
-    d = pci_create_multifunction(bus, devfn, true, "i82801b11-bridge");
-    if (!d) {
-        return NULL;
-    }
-    br = PCI_BRIDGE(d);
-    qdev = DEVICE(d);
-
-    snprintf(buf, sizeof(buf), "pci.%d", sec_bus);
-    pci_bridge_map_irq(br, buf, pci_swizzle_map_irq_fn);
-    qdev_init_nofail(qdev);
-
-    return pci_bridge_get_sec_bus(br);
-}
-
 static void d2pbr_register(void)
 {
     type_register_static(&i82801b11_bridge_info);
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 1abbbb1..9b9f63d 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -515,19 +515,6 @@ void pcie_cap_arifwd_reset(PCIDevice *dev)
     pci_long_test_and_clear_mask(devctl2, PCI_EXP_DEVCTL2_ARI);
 }
 
-bool pcie_cap_is_arifwd_enabled(const PCIDevice *dev)
-{
-    if (!pci_is_express(dev)) {
-        return false;
-    }
-    if (!dev->exp.exp_cap) {
-        return false;
-    }
-
-    return pci_get_long(dev->config + dev->exp.exp_cap + PCI_EXP_DEVCTL2) &
-        PCI_EXP_DEVCTL2_ARI;
-}
-
 /**************************************************************************
  * pci express extended capability list management functions
  * uint16_t ext_cap_id (16 bit)
@@ -621,15 +608,3 @@ void pcie_add_capability(PCIDevice *dev,
     /* Check capability by default */
     memset(dev->cmask + offset, 0xFF, size);
 }
-
-/**************************************************************************
- * pci express extended capability helper functions
- */
-
-/* ARI */
-void pcie_ari_init(PCIDevice *dev, uint16_t offset, uint16_t nextfn)
-{
-    pcie_add_capability(dev, PCI_EXT_CAP_ID_ARI, PCI_ARI_VER,
-                        offset, PCI_ARI_SIZEOF);
-    pci_set_long(dev->config + offset + PCI_ARI_CAP, (nextfn & 0xff) << 8);
-}
diff --git a/include/hw/i386/ich9.h b/include/hw/i386/ich9.h
index 59ea25b..5cede9b 100644
--- a/include/hw/i386/ich9.h
+++ b/include/hw/i386/ich9.h
@@ -19,7 +19,6 @@ void ich9_lpc_set_irq(void *opaque, int irq_num, int level);
 int ich9_lpc_map_irq(PCIDevice *pci_dev, int intx);
 PCIINTxRoute ich9_route_intx_pin_to_irq(void *opaque, int pirq_pin);
 void ich9_lpc_pm_init(PCIDevice *pci_lpc);
-PCIBus *ich9_d2pbr_init(PCIBus *bus, int devfn, int sec_bus);
 I2CBus *ich9_smb_init(PCIBus *bus, int devfn, uint32_t smb_io_base);
 
 #define ICH9_CC_SIZE                            (16 * 1024)     /* 16KB */
diff --git a/include/hw/pci/pcie.h b/include/hw/pci/pcie.h
index b48a7a2..ae0969a 100644
--- a/include/hw/pci/pcie.h
+++ b/include/hw/pci/pcie.h
@@ -106,7 +106,6 @@ void pcie_cap_flr_write_config(PCIDevice *dev,
 /* ARI forwarding capability and control */
 void pcie_cap_arifwd_init(PCIDevice *dev);
 void pcie_cap_arifwd_reset(PCIDevice *dev);
-bool pcie_cap_is_arifwd_enabled(const PCIDevice *dev);
 
 /* PCI express extended capability helper functions */
 uint16_t pcie_find_capability(PCIDevice *dev, uint16_t cap_id);
@@ -114,8 +113,6 @@ void pcie_add_capability(PCIDevice *dev,
                          uint16_t cap_id, uint8_t cap_ver,
                          uint16_t offset, uint16_t size);
 
-void pcie_ari_init(PCIDevice *dev, uint16_t offset, uint16_t nextfn);
-
 extern const VMStateDescription vmstate_pcie_device;
 
 #define VMSTATE_PCIE_DEVICE(_field, _state) {                        \
-- 
1.7.1

  parent reply	other threads:[~2015-03-09 17:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-09 17:30 [Qemu-devel] [PATCH 0/8] Remove more unused functions Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 1/8] migration: Remove " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 2/8] vmxnet: Remove unused function vmxnet_rx_pkt_get_num_frags() Thomas Huth
2015-03-09 17:30 ` Thomas Huth [this message]
2015-03-10 15:05   ` [Qemu-devel] [PATCH 3/8] pci: Remove unused functions Michael S. Tsirkin
2015-03-18 13:19   ` Michael S. Tsirkin
2015-03-09 17:30 ` [Qemu-devel] [PATCH 4/8] monitor: " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 5/8] ioport: " Thomas Huth
2015-03-09 19:23   ` Paolo Bonzini
2015-03-10  6:09     ` Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 6/8] usb: " Thomas Huth
2015-03-10  8:38   ` Gerd Hoffmann
2015-03-09 17:30 ` [Qemu-devel] [PATCH 7/8] util: " Thomas Huth
2015-03-09 17:30 ` [Qemu-devel] [PATCH 8/8] Remove various " Thomas Huth

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=1425922215-20819-4-git-send-email-thuth@linux.vnet.ibm.com \
    --to=thuth@linux.vnet.ibm.com \
    --cc=aliguori@amazon.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@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).