amd-iommu: drop pointless iommu-loop in msi setup code
authorJoerg Roedel <joerg.roedel@amd.com>
Mon, 4 May 2009 16:46:34 +0000 (18:46 +0200)
committerJoerg Roedel <joerg.roedel@amd.com>
Thu, 28 May 2009 16:09:08 +0000 (18:09 +0200)
It is not necessary to loop again over all IOMMUs in this code. So drop
the loop.

Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
arch/x86/kernel/amd_iommu_init.c

index 74f4f1fea93066d8baa318a743a6e8c4a932958f..cc99f6092230d2e13334542e860e16bbedb14305 100644 (file)
@@ -826,13 +826,6 @@ out_free:
 static int __init iommu_setup_msi(struct amd_iommu *iommu)
 {
        int r;
-       struct amd_iommu *curr;
-
-       for_each_iommu(curr) {
-               if (curr->dev == iommu->dev)
-                       curr->int_enabled = true;
-       }
-
 
        if (pci_enable_msi(iommu->dev))
                return 1;
@@ -847,6 +840,7 @@ static int __init iommu_setup_msi(struct amd_iommu *iommu)
                return 1;
        }
 
+       iommu->int_enabled = true;
        iommu_feature_enable(iommu, CONTROL_EVT_INT_EN);
 
        return 0;