From: Ian Campbell Subject: Re: [RFC for-4.5 08/12] xen/passthrough: iommu: Split generic IOMMU code Date: Wed, 19 Feb 2014 12:39:10 +0000 Message-ID: <1392813550.29739.46.camel@kazak.uk.xensource.com> References: <1391794991-5919-1-git-send-email-julien.grall@linaro.org> <1391794991-5919-9-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WG6Qk-0000qF-TQ for xen-devel@lists.xenproject.org; Wed, 19 Feb 2014 12:39:15 +0000 In-Reply-To: <1391794991-5919-9-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: patches@linaro.org, tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org, Xiantao Zhang List-Id: xen-devel@lists.xenproject.org On Fri, 2014-02-07 at 17:43 +0000, Julien Grall wrote: > The generic IOMMU framework code (xen/drivers/passthrough/iommu.c) contains > functions specific to x86 and PCI. > > Split the framework in 3 distincts files: > - iommu.c: contains generic functions shared between x86 and ARM > (when it will be supported) > - iommu_pci.c: contains specific functions for PCI passthrough > - iommu_x86.c: contains specific functions for x86 > > iommu_pci.c will be only compiled when PCI is supported by the architecture > (eg. HAS_PCI is defined). > > This patch is mostly code movement in new files. > > Signed-off-by: Julien Grall > Cc: Xiantao Zhang > Cc: Jan Beulich > --- > xen/drivers/passthrough/Makefile | 6 +- > xen/drivers/passthrough/iommu.c | 473 +---------------------------------- > xen/drivers/passthrough/iommu_pci.c | 468 ++++++++++++++++++++++++++++++++++ > xen/drivers/passthrough/iommu_x86.c | 65 +++++ > xen/drivers/passthrough/vtd/iommu.c | 42 ++-- > xen/include/asm-x86/iommu.h | 46 ++++ > xen/include/xen/hvm/iommu.h | 1 + > xen/include/xen/iommu.h | 42 ++-- > 8 files changed, 625 insertions(+), 518 deletions(-) > create mode 100644 xen/drivers/passthrough/iommu_pci.c > create mode 100644 xen/drivers/passthrough/iommu_x86.c > create mode 100644 xen/include/asm-x86/iommu.h > > diff --git a/xen/drivers/passthrough/Makefile b/xen/drivers/passthrough/Makefile > index 7c40fa5..51e0a0d 100644 > --- a/xen/drivers/passthrough/Makefile > +++ b/xen/drivers/passthrough/Makefile > @@ -3,5 +3,7 @@ subdir-$(x86) += amd > subdir-$(x86_64) += x86 > > obj-y += iommu.o > -obj-y += io.o > -obj-y += pci.o > +obj-$(x86) += iommu_x86.o > +obj-$(HAS_PCI) += iommu_pci.o > +obj-$(x86) += io.o io.[co] not mentioned in the description?