Merge tag 'dm-3.18-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/device...
[firefly-linux-kernel-4.4.55.git] / drivers / vfio / vfio_iommu_type1.c
index 583ccdb2c58f110fc45e7a7abdc56f81af8d3b4a..4a9d666f1e9186ed07071c0d909ba167e814998a 100644 (file)
@@ -723,14 +723,14 @@ static int vfio_iommu_type1_attach_group(void *iommu_data,
        list_add(&group->next, &domain->group_list);
 
        if (!allow_unsafe_interrupts &&
-           !iommu_domain_has_cap(domain->domain, IOMMU_CAP_INTR_REMAP)) {
+           !iommu_capable(bus, IOMMU_CAP_INTR_REMAP)) {
                pr_warn("%s: No interrupt remapping support.  Use the module param \"allow_unsafe_interrupts\" to enable VFIO IOMMU support on this platform\n",
                       __func__);
                ret = -EPERM;
                goto out_detach;
        }
 
-       if (iommu_domain_has_cap(domain->domain, IOMMU_CAP_CACHE_COHERENCY))
+       if (iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY))
                domain->prot |= IOMMU_CACHE;
 
        /*