Patchwork [03/35] pci: Export pci_to_cpu_addr.

login
register
mail settings
Submitter Richard Henderson
Date May 9, 2011, 9:34 p.m.
Message ID <1304976889-29675-4-git-send-email-rth@twiddle.net>
Download mbox | patch
Permalink /patch/94860/
State New
Headers show

Comments

Richard Henderson - May 9, 2011, 9:34 p.m.
This is, more or less, the read accessor to pci_bus_set_mem_base
as a write accessor.  It will be needed for implementing sparse
memory spaces for Alpha.

Signed-off-by: Richard Henderson <rth@twiddle.net>
---
 hw/pci.c |    3 +--
 hw/pci.h |    1 +
 2 files changed, 2 insertions(+), 2 deletions(-)

Patch

diff --git a/hw/pci.c b/hw/pci.c
index 0875654..0b2b943 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -800,8 +800,7 @@  PCIDevice *pci_register_device(PCIBus *bus, const char *name,
     return pci_dev;
 }
 
-static target_phys_addr_t pci_to_cpu_addr(PCIBus *bus,
-                                          target_phys_addr_t addr)
+target_phys_addr_t pci_to_cpu_addr(PCIBus *bus, target_phys_addr_t addr)
 {
     return addr + bus->mem_base;
 }
diff --git a/hw/pci.h b/hw/pci.h
index c6a6eb6..8615cc2 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -246,6 +246,7 @@  void pci_device_reset(PCIDevice *dev);
 void pci_bus_reset(PCIBus *bus);
 
 void pci_bus_set_mem_base(PCIBus *bus, target_phys_addr_t base);
+target_phys_addr_t pci_to_cpu_addr(PCIBus *bus, target_phys_addr_t addr);
 
 PCIDevice *pci_nic_init(NICInfo *nd, const char *default_model,
                         const char *default_devaddr);