From patchwork Fri Jun 24 19:23:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 101894 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 046B5B6F7E for ; Sat, 25 Jun 2011 06:35:03 +1000 (EST) Received: from localhost ([::1]:40109 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QaD5e-0001A4-Ua for incoming@patchwork.ozlabs.org; Fri, 24 Jun 2011 16:34:59 -0400 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) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=gNTFxNLIHejPcZrkRhoIOyf22oc34b0c0mfS5QZSpNc=; b=UV5XduaoVIGjMJntlm1rj+xFQI0Y/TSrIvpjOyABASKj16GbaQFIc3DpQ4T/GzAeIk x9u6f6v/xGor3m9175Wak1yBnFaSmfZSB9fYA3YYflCPh2Som+U5TQYX3XBvSFuh653R PgXKo6GuGZb0U7rxnHXvKNTF1eS0xQ2WgogbI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:date:message-id:x-mailer:in-reply-to :references; b=bHcDHoE5fmnU1ZKFR3HqFkGf9365LUiCKrJro1g3vZU1zXoaC0iYC0l+3SlEGxBcGX WIiNGNNxNgMC11vk3zM8pCAnguIfcLV09ku5BUhjklpJ3M6Wd+ibv8X17/9Ru366+IzO BoUzmJ4OzmUacROoywXdx+jv7SlNKlzHpCTzo= Received: by 10.227.162.133 with SMTP id v5mr3317371wbx.14.1308943451068; Fri, 24 Jun 2011 12:24:11 -0700 (PDT) Received: from localhost.localdomain (c-71-227-161-214.hsd1.wa.comcast.net [71.227.161.214]) by mx.google.com with ESMTPS id ex2sm2224860wbb.14.2011.06.24.12.24.09 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 24 Jun 2011 12:24:10 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Fri, 24 Jun 2011 12:23:49 -0700 Message-Id: <1308943435-24993-3-git-send-email-rth@twiddle.net> X-Mailer: git-send-email 1.7.4.4 In-Reply-To: <1308943435-24993-1-git-send-email-rth@twiddle.net> References: <1308943435-24993-1-git-send-email-rth@twiddle.net> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 74.125.82.173 Subject: [Qemu-devel] [PATCH 2/8] 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 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);