Kay, Allen M wrote:
> Intel-iommu driver changes for kvm vt-d support. Important changes are
> in intel-iommu.c. The rest of the changes are for moving intel-iommu.h
> and iova.h from drivers/pci directory to include/linux directory.
>
> Signed-off-by: Allen M Kay <[EMAIL PROTECTED]>
>
> ----
>
> b/drivers/pci/dmar.c | 4
> b/drivers/pci/intel-iommu.c | 26 ++-
> b/drivers/pci/iova.c | 2
> b/include/linux/intel-iommu.h | 344
> ++++++++++++++++++++++++++++++++++++++++++
> b/include/linux/iova.h | 52 ++++++
> drivers/pci/intel-iommu.h | 344
> ------------------------------------------
> drivers/pci/iova.h | 52 ------
> 7 files changed, 416 insertions(+), 408 deletions(-)
>
> ----
>
> diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c
> index f941f60..a58a5b0 100644
> --- a/drivers/pci/dmar.c
> +++ b/drivers/pci/dmar.c
> @@ -26,8 +26,8 @@
>
> #include <linux/pci.h>
> #include <linux/dmar.h>
> -#include "iova.h"
> -#include "intel-iommu.h"
> +#include <linux/iova.h>
> +#include <linux/intel-iommu.h>
>
> #undef PREFIX
> #define PREFIX "DMAR:"
> diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
> index 4cb949f..bfa888b 100644
> --- a/drivers/pci/intel-iommu.c
> +++ b/drivers/pci/intel-iommu.c
> @@ -31,8 +31,8 @@
> #include <linux/dmar.h>
> #include <linux/dma-mapping.h>
> #include <linux/mempool.h>
> -#include "iova.h"
> -#include "intel-iommu.h"
> +#include <linux/iova.h>
> +#include <linux/intel-iommu.h>
> #include <asm/proto.h> /* force_iommu in this header in x86-64*/
> #include <asm/cacheflush.h>
> #include <asm/gart.h>
> @@ -1056,7 +1056,7 @@ static void free_iommu(struct intel_iommu *iommu)
> kfree(iommu);
> }
>
> -static struct dmar_domain * iommu_alloc_domain(struct intel_iommu
> *iommu)
> +struct dmar_domain * iommu_alloc_domain(struct intel_iommu *iommu)
> {
> unsigned long num;
> unsigned long ndomains;
> @@ -1086,8 +1086,9 @@ static struct dmar_domain *
> iommu_alloc_domain(struct intel_iommu *iommu)
>
> return domain;
> }
> +EXPORT_SYMBOL_GPL(iommu_alloc_domain);
>
> -static void iommu_free_domain(struct dmar_domain *domain)
> +void iommu_free_domain(struct dmar_domain *domain)
> {
> unsigned long flags;
>
> @@ -1095,6 +1096,7 @@ static void iommu_free_domain(struct dmar_domain
> *domain)
> clear_bit(domain->id, domain->iommu->domain_ids);
> spin_unlock_irqrestore(&domain->iommu->lock, flags);
> }
> +EXPORT_SYMBOL_GPL(iommu_free_domain);
>
> static struct iova_domain reserved_iova_list;
> static struct lock_class_key reserved_alloc_key;
> @@ -1160,7 +1162,7 @@ static inline int guestwidth_to_adjustwidth(int
> gaw)
> return agaw;
> }
>
> -static int domain_init(struct dmar_domain *domain, int guest_width)
> +int domain_init(struct dmar_domain *domain, int guest_width)
> {
>
I think it's already been mentioned, but these are pretty terrible names
if you're exporting these symbols. Linux supports other IOMMUs so VT-d
should not be hogging the iommu_* namespace.
Regards,
Anthony Liguori
-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference
Don't miss this year's exciting event. There's still time to save $100.
Use priority code J8TL2D2.
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
kvm-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel