Received: from eggs.gnu.org ([140.186.70.92]:38250) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJY6W-0003E2-M6 for qemu-devel@nongnu.org; Mon, 09 May 2011 17:35:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QJY6V-0006B2-Q2 for qemu-devel@nongnu.org; Mon, 09 May 2011 17:35:00 -0400 Received: from mail-iw0-f173.google.com ([209.85.214.173]:38418) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QJY6V-0006Af-N0 for qemu-devel@nongnu.org; Mon, 09 May 2011 17:34:59 -0400 Received: by mail-iw0-f173.google.com with SMTP id 42so5560360iwl.4 for ; Mon, 09 May 2011 14:34:59 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Mon, 9 May 2011 14:34:17 -0700 Message-Id: <1304976889-29675-4-git-send-email-rth@twiddle.net> In-Reply-To: <1304976889-29675-1-git-send-email-rth@twiddle.net> References: <1304976889-29675-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 03/35] 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 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); -- 1.7.4.4