Patchwork [v4,34/39] pci: remove pci_register_bar_simple()

login
register
mail settings
Submitter Avi Kivity
Date Aug. 8, 2011, 1:09 p.m.
Message ID <1312808972-1718-35-git-send-email-avi@redhat.com>
Download mbox | patch
Permalink /patch/108950/
State New
Headers show

Comments

Avi Kivity - Aug. 8, 2011, 1:09 p.m.
Superceded by pci_register_bar_region().

Reviewed-by: Richard Henderson <rth@twiddle.net>
Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
---
 hw/pci.c |   17 -----------------
 hw/pci.h |    3 ---
 2 files changed, 0 insertions(+), 20 deletions(-)

Patch

diff --git a/hw/pci.c b/hw/pci.c
index c00cbf8..7a70037 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -903,7 +903,6 @@  void pci_register_bar(PCIDevice *pci_dev, int region_num,
     r->filtered_size = size;
     r->type = type;
     r->map_func = map_func;
-    r->ram_addr = IO_MEM_UNASSIGNED;
     r->memory = NULL;
 
     wmask = ~(size - 1);
@@ -923,13 +922,6 @@  void pci_register_bar(PCIDevice *pci_dev, int region_num,
     }
 }
 
-static void pci_simple_bar_mapfunc(PCIDevice *pci_dev, int region_num,
-                                   pcibus_t addr, pcibus_t size, int type)
-{
-    cpu_register_physical_memory(addr, size,
-                                 pci_dev->io_regions[region_num].ram_addr);
-}
-
 static void pci_simple_bar_mapfunc_region(PCIDevice *pci_dev, int region_num,
                                           pcibus_t addr, pcibus_t size,
                                           int type)
@@ -942,15 +934,6 @@  static void pci_simple_bar_mapfunc_region(PCIDevice *pci_dev, int region_num,
                                         1);
 }
 
-void pci_register_bar_simple(PCIDevice *pci_dev, int region_num,
-                             pcibus_t size,  uint8_t attr, ram_addr_t ram_addr)
-{
-    pci_register_bar(pci_dev, region_num, size,
-                     PCI_BASE_ADDRESS_SPACE_MEMORY | attr,
-                     pci_simple_bar_mapfunc);
-    pci_dev->io_regions[region_num].ram_addr = ram_addr;
-}
-
 void pci_register_bar_region(PCIDevice *pci_dev, int region_num,
                              uint8_t attr, MemoryRegion *memory)
 {
diff --git a/hw/pci.h b/hw/pci.h
index a95e2ad..25e28b1 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -93,7 +93,6 @@  typedef struct PCIIORegion {
     pcibus_t filtered_size;
     uint8_t type;
     PCIMapIORegionFunc *map_func;
-    ram_addr_t ram_addr;
     MemoryRegion *memory;
     MemoryRegion *address_space;
 } PCIIORegion;
@@ -204,8 +203,6 @@  PCIDevice *pci_register_device(PCIBus *bus, const char *name,
 void pci_register_bar(PCIDevice *pci_dev, int region_num,
                             pcibus_t size, uint8_t type,
                             PCIMapIORegionFunc *map_func);
-void pci_register_bar_simple(PCIDevice *pci_dev, int region_num,
-                             pcibus_t size, uint8_t attr, ram_addr_t ram_addr);
 void pci_register_bar_region(PCIDevice *pci_dev, int region_num,
                              uint8_t attr, MemoryRegion *memory);
 pcibus_t pci_get_bar_addr(PCIDevice *pci_dev, int region_num);