From patchwork Tue Apr 19 15:04:40 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 92008 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [140.186.70.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 9BE84B6FF0 for ; Wed, 20 Apr 2011 01:46:04 +1000 (EST) Received: from localhost ([::1]:56809 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QCD7q-0001Uz-2f for incoming@patchwork.ozlabs.org; Tue, 19 Apr 2011 11:46:02 -0400 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 To: qemu-devel@nongnu.org Date: Tue, 19 Apr 2011 08:04:40 -0700 Message-Id: <1303225501-12778-4-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.3.4 In-Reply-To: <1303225501-12778-1-git-send-email-rth@twiddle.net> References: <1303225501-12778-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-Received-From: 64.142.16.245 Subject: [Qemu-devel] [PATCH 03/24] pci: Export pci_to_cpu_addr. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@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);