From patchwork Wed Feb 17 10:25:41 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Xu X-Patchwork-Id: 584000 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A9288140327 for ; Wed, 17 Feb 2016 21:26:43 +1100 (AEDT) Received: from localhost ([::1]:56068 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVzJh-0002vr-El for incoming@patchwork.ozlabs.org; Wed, 17 Feb 2016 05:26:41 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58260) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVzJA-00022G-Go for qemu-devel@nongnu.org; Wed, 17 Feb 2016 05:26:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVzJ9-0008V8-IA for qemu-devel@nongnu.org; Wed, 17 Feb 2016 05:26:08 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVzJ9-0008V0-Dw for qemu-devel@nongnu.org; Wed, 17 Feb 2016 05:26:07 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 1D6D91E32; Wed, 17 Feb 2016 10:26:07 +0000 (UTC) Received: from pxdev.xzpeter.org.com (dhcp-14-238.nay.redhat.com [10.66.14.238]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1HAPrp3000583; Wed, 17 Feb 2016 05:26:01 -0500 From: Peter Xu To: qemu-devel@nongnu.org Date: Wed, 17 Feb 2016 18:25:41 +0800 Message-Id: <1455704742-21171-2-git-send-email-peterx@redhat.com> In-Reply-To: <1455704742-21171-1-git-send-email-peterx@redhat.com> References: <1455704742-21171-1-git-send-email-peterx@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: peter.maydell@linaro.org, pbonzini@redhat.com, jasowang@redhat.com, peterx@redhat.com, mst@redhat.com Subject: [Qemu-devel] [RFC PATCH 1/2] pci: renaming PCIIOMMUFunc to PCIIOMMUASLookupFunc 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 There could be more than one ops for IOMMU in the future. Renaming PCIIOMMUFunc to a more specific name better describes what it does, which is to do address space lookup. Signed-off-by: Peter Xu --- hw/pci/pci.c | 2 +- include/hw/pci/pci.h | 4 ++-- include/hw/pci/pci_bus.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index b282120..3f58bd4 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -2413,7 +2413,7 @@ AddressSpace *pci_device_iommu_address_space(PCIDevice *dev) return &address_space_memory; } -void pci_setup_iommu(PCIBus *bus, PCIIOMMUFunc fn, void *opaque) +void pci_setup_iommu(PCIBus *bus, PCIIOMMUASLookupFunc fn, void *opaque) { bus->iommu_fn = fn; bus->iommu_opaque = opaque; diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index dedf277..846afee 100644 --- a/include/hw/pci/pci.h +++ b/include/hw/pci/pci.h @@ -418,10 +418,10 @@ void pci_bus_get_w64_range(PCIBus *bus, Range *range); void pci_device_deassert_intx(PCIDevice *dev); -typedef AddressSpace *(*PCIIOMMUFunc)(PCIBus *, void *, int); +typedef AddressSpace *(*PCIIOMMUASLookupFunc)(PCIBus *, void *, int); AddressSpace *pci_device_iommu_address_space(PCIDevice *dev); -void pci_setup_iommu(PCIBus *bus, PCIIOMMUFunc fn, void *opaque); +void pci_setup_iommu(PCIBus *bus, PCIIOMMUASLookupFunc fn, void *opaque); static inline void pci_set_byte(uint8_t *config, uint8_t val) diff --git a/include/hw/pci/pci_bus.h b/include/hw/pci/pci_bus.h index 403fec6..a8ab9c2 100644 --- a/include/hw/pci/pci_bus.h +++ b/include/hw/pci/pci_bus.h @@ -20,7 +20,7 @@ typedef struct PCIBusClass { struct PCIBus { BusState qbus; - PCIIOMMUFunc iommu_fn; + PCIIOMMUASLookupFunc iommu_fn; void *iommu_opaque; uint8_t devfn_min; pci_set_irq_fn set_irq;