Received: from eggs.gnu.org ([140.186.70.92]:52399) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaBzB-0007ow-5d for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QaBz9-0000qP-Sz for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:12 -0400 Received: from mail-wy0-f173.google.com ([74.125.82.173]:61113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaBz9-0000pt-Ch for qemu-devel@nongnu.org; Fri, 24 Jun 2011 15:24:11 -0400 Received: by mail-wy0-f173.google.com with SMTP id 28so2380750wyf.4 for ; Fri, 24 Jun 2011 12:24:11 -0700 (PDT) Sender: Richard Henderson From: Richard Henderson Date: Fri, 24 Jun 2011 12:23:49 -0700 Message-Id: <1308943435-24993-3-git-send-email-rth@twiddle.net> In-Reply-To: <1308943435-24993-1-git-send-email-rth@twiddle.net> References: <1308943435-24993-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 2/8] 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 b904a4e..68e18d3 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -820,8 +820,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 c220745..458be00 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