From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:53936) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCD6P-0007lp-2f for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:44:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QCD6N-0005ug-I3 for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:44:32 -0400 Received: from a.mail.sonic.net ([64.142.16.245]:56639) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCD6N-0005uR-Au for qemu-devel@nongnu.org; Tue, 19 Apr 2011 11:44:31 -0400 Received: from are.twiddle.net (are.twiddle.net [75.101.38.216]) by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id p3JF53xb030775 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 19 Apr 2011 08:05:03 -0700 Received: from are.twiddle.net (localhost [127.0.0.1]) by are.twiddle.net (8.14.4/8.14.4) with ESMTP id p3JF53Qw012824 for ; Tue, 19 Apr 2011 08:05:03 -0700 Received: (from rth@localhost) by are.twiddle.net (8.14.4/8.14.4/Submit) id p3JF53CS012823 for qemu-devel@nongnu.org; Tue, 19 Apr 2011 08:05:03 -0700 From: Richard Henderson Date: Tue, 19 Apr 2011 08:04:40 -0700 Message-Id: <1303225501-12778-4-git-send-email-rth@twiddle.net> In-Reply-To: <1303225501-12778-1-git-send-email-rth@twiddle.net> References: <1303225501-12778-1-git-send-email-rth@twiddle.net> Subject: [Qemu-devel] [PATCH 03/24] 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.3.4