diff --git a/arch/arm/mach-msm/iommu.c b/arch/arm/mach-msm/iommu.c index c9d8a86a155..e5fb44157c1 100644 --- a/arch/arm/mach-msm/iommu.c +++ b/arch/arm/mach-msm/iommu.c @@ -264,7 +264,7 @@ static void __program_context(void __iomem *base, int ctx, int ncb, mb(); } -static int msm_iommu_domain_init(struct iommu_domain *domain) +static int msm_iommu_domain_init(struct iommu_domain *domain, int flags) { struct msm_priv *priv = kzalloc(sizeof(*priv), GFP_KERNEL); diff --git a/arch/arm/mach-msm/iommu_domains.c b/arch/arm/mach-msm/iommu_domains.c index 7ef22046a31..290ba332b86 100644 --- a/arch/arm/mach-msm/iommu_domains.c +++ b/arch/arm/mach-msm/iommu_domains.c @@ -199,7 +199,7 @@ static int __init msm_subsystem_iommu_init(void) int i; for (i = 0; i < (ARRAY_SIZE(msm_iommu_domains) - 1); i++) - msm_iommu_domains[i] = iommu_domain_alloc(); + msm_iommu_domains[i] = iommu_domain_alloc(0); for (i = 0; i < ARRAY_SIZE(msm_iommu_iova_pools); i++) { mutex_init(&msm_iommu_iova_pools[i].pool_mutex); diff --git a/drivers/base/iommu.c b/drivers/base/iommu.c index 6490bfe90d8..1377e854e05 100644 --- a/drivers/base/iommu.c +++ b/drivers/base/iommu.c @@ -40,7 +40,7 @@ bool iommu_found(void) } EXPORT_SYMBOL_GPL(iommu_found); -struct iommu_domain *iommu_domain_alloc(void) +struct iommu_domain *iommu_domain_alloc(int flags) { struct iommu_domain *domain; int ret; @@ -49,7 +49,7 @@ struct iommu_domain *iommu_domain_alloc(void) if (!domain) return NULL; - ret = iommu_ops->domain_init(domain); + ret = iommu_ops->domain_init(domain, flags); if (ret) goto out_free; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index f4f32a65384..d042e2a400f 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -37,7 +37,7 @@ struct iommu_domain { #define IOMMU_CAP_INTR_REMAP 0x2 /* isolates device intrs */ struct iommu_ops { - int (*domain_init)(struct iommu_domain *domain); + int (*domain_init)(struct iommu_domain *domain, int flags); void (*domain_destroy)(struct iommu_domain *domain); int (*attach_dev)(struct iommu_domain *domain, struct device *dev); void (*detach_dev)(struct iommu_domain *domain, struct device *dev); @@ -59,7 +59,7 @@ struct iommu_ops { extern void register_iommu(struct iommu_ops *ops); extern bool iommu_found(void); -extern struct iommu_domain *iommu_domain_alloc(void); +extern struct iommu_domain *iommu_domain_alloc(int flags); extern void iommu_domain_free(struct iommu_domain *domain); extern int iommu_attach_device(struct iommu_domain *domain, struct device *dev); @@ -89,7 +89,7 @@ static inline bool iommu_found(void) return false; } -static inline struct iommu_domain *iommu_domain_alloc(void) +static inline struct iommu_domain *iommu_domain_alloc(int flags) { return NULL; } diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c index 62a9caf0563..58a5e2b5b7e 100644 --- a/virt/kvm/iommu.c +++ b/virt/kvm/iommu.c @@ -227,7 +227,7 @@ int kvm_iommu_map_guest(struct kvm *kvm) return -ENODEV; } - kvm->arch.iommu_domain = iommu_domain_alloc(); + kvm->arch.iommu_domain = iommu_domain_alloc(0); if (!kvm->arch.iommu_domain) return -ENOMEM;