From patchwork Tue Jun 12 15:05:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 164429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id EA3391007D2 for ; Wed, 13 Jun 2012 01:07:06 +1000 (EST) Received: from localhost ([::1]:44944 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeSgS-00013i-5a for incoming@patchwork.ozlabs.org; Tue, 12 Jun 2012 11:07:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:36586) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeSfm-0000ib-Sl for qemu-devel@nongnu.org; Tue, 12 Jun 2012 11:06:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SeSfC-00062L-M8 for qemu-devel@nongnu.org; Tue, 12 Jun 2012 11:06:22 -0400 Received: from smtp.citrix.com ([66.165.176.89]:47395) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SeSfC-0005zd-Cx for qemu-devel@nongnu.org; Tue, 12 Jun 2012 11:05:46 -0400 X-IronPort-AV: E=Sophos;i="4.75,758,1330923600"; d="scan'208";a="27772977" Received: from ftlpmailmx02.citrite.net ([10.13.107.66]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 12 Jun 2012 11:05:42 -0400 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.66) with Microsoft SMTP Server id 8.3.213.0; Tue, 12 Jun 2012 11:05:43 -0400 Received: from [10.80.3.61] (helo=perard.uk.xensource.com) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1SeSf8-0003OM-A5; Tue, 12 Jun 2012 16:05:42 +0100 From: Anthony PERARD To: QEMU-devel Date: Tue, 12 Jun 2012 16:05:19 +0100 Message-ID: <1339513523-1699-6-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1339513523-1699-1-git-send-email-anthony.perard@citrix.com> References: <1339513523-1699-1-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Cc: Anthony PERARD , Anthony Liguori , Stefano Stabellini , "Michael S. Tsirkin" , Xen Devel Subject: [Qemu-devel] [PATCH V12 5/9] Revert "pci: don't export an internal function" 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 reverts commit 94a09e2c846374a96719cda2b4e1312d8c4b08a7. This function is used by a later patch to parse the BDF of the device to passthrough. Signed-off-by: Anthony PERARD --- hw/pci.c | 2 +- hw/pci.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-) diff --git a/hw/pci.c b/hw/pci.c index eec106a..5bddf7a 100644 --- a/hw/pci.c +++ b/hw/pci.c @@ -479,7 +479,7 @@ static void pci_set_default_subsystem_id(PCIDevice *pci_dev) * Parse [[:]:], return -1 on error if funcp == NULL * [[:]:]., return -1 on error */ -static int pci_parse_devaddr(const char *addr, int *domp, int *busp, +int pci_parse_devaddr(const char *addr, int *domp, int *busp, unsigned int *slotp, unsigned int *funcp) { const char *p; diff --git a/hw/pci.h b/hw/pci.h index ecf37fd..b169c0b 100644 --- a/hw/pci.h +++ b/hw/pci.h @@ -321,6 +321,8 @@ PCIDevice *pci_find_device(PCIBus *bus, int bus_num, uint8_t devfn); int pci_qdev_find_device(const char *id, PCIDevice **pdev); PCIBus *pci_get_bus_devfn(int *devfnp, const char *devaddr); +int pci_parse_devaddr(const char *addr, int *domp, int *busp, + unsigned int *slotp, unsigned int *funcp); int pci_read_devaddr(Monitor *mon, const char *addr, int *domp, int *busp, unsigned *slotp);