intel-iommu: Speed up processing of the identity_mapping function
[pandora-kernel.git] / drivers / pci / intel-iommu.c
index dcf051d..98be0b5 100644 (file)
@@ -2235,10 +2235,10 @@ static int identity_mapping(struct pci_dev *pdev)
        if (likely(!iommu_identity_mapping))
                return 0;
 
+       info = pdev->dev.archdata.iommu;
+       if (info && info != DUMMY_DEVICE_DOMAIN_INFO)
+               return (info->domain == si_domain);
 
-       list_for_each_entry(info, &si_domain->devices, link)
-               if (info->dev == pdev)
-                       return 1;
        return 0;
 }