From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:47724) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFYBR-000519-It for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFYBN-0005Z7-G4 for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:33 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:41062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFYBN-0005Yq-Aq for qemu-devel@nongnu.org; Thu, 28 Apr 2011 16:51:29 -0400 Received: by pwi6 with SMTP id 6so1870069pwi.4 for ; Thu, 28 Apr 2011 13:51:28 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Thu, 28 Apr 2011 13:50:46 -0700 Message-Id: <1304023875-25040-5-git-send-email-rth@twiddle.net> In-Reply-To: <1304023875-25040-1-git-send-email-rth@twiddle.net> References: <1304023875-25040-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 04/33] pci: Export pci_to_cpu_addr. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- hw/pci.c | 3 +-- hw/pci.h | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index 6b577e1..8c7f52a 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -793,8 +793,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 52ee8c9..cb0f738 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -242,6 +242,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); -- 1.7.4.4