aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/intel-iommu.c
diff options
context:
space:
mode:
authorWeidong Han <weidong.han@intel.com>2008-12-07 22:24:12 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 08:02:17 -0500
commita2bb8459fe46e5aaad6637b31b5593d740097cba (patch)
tree0d380bb2cc70f6a26aade2c8b44ee6e4f183b76d /drivers/pci/intel-iommu.c
parentd9630fe941769dd050fbc38fbbac20a708ab9461 (diff)
Get iommu from g_iommus for deferred flush
deferred_flush[] uses the iommu seq_id to index, so its iommu is fixed and can get it from g_iommus. Signed-off-by: Weidong Han <weidong.han@intel.com> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'drivers/pci/intel-iommu.c')
-rw-r--r--drivers/pci/intel-iommu.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/pci/intel-iommu.c b/drivers/pci/intel-iommu.c
index d2ffa7a6d723..86b9f58a645e 100644
--- a/drivers/pci/intel-iommu.c
+++ b/drivers/pci/intel-iommu.c
@@ -2101,10 +2101,11 @@ static void flush_unmaps(void)
2101 2101
2102 /* just flush them all */ 2102 /* just flush them all */
2103 for (i = 0; i < g_num_of_iommus; i++) { 2103 for (i = 0; i < g_num_of_iommus; i++) {
2104 if (deferred_flush[i].next) { 2104 struct intel_iommu *iommu = g_iommus[i];
2105 struct intel_iommu *iommu = 2105 if (!iommu)
2106 deferred_flush[i].domain[0]->iommu; 2106 continue;
2107 2107
2108 if (deferred_flush[i].next) {
2108 iommu->flush.flush_iotlb(iommu, 0, 0, 0, 2109 iommu->flush.flush_iotlb(iommu, 0, 0, 0,
2109 DMA_TLB_GLOBAL_FLUSH, 0); 2110 DMA_TLB_GLOBAL_FLUSH, 0);
2110 for (j = 0; j < deferred_flush[i].next; j++) { 2111 for (j = 0; j < deferred_flush[i].next; j++) {