1
0
Fork 0

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>
hifive-unleashed-5.1
Weidong Han 2008-12-08 11:24:12 +08:00 committed by Joerg Roedel
parent d9630fe941
commit a2bb8459fe
1 changed files with 4 additions and 3 deletions

View File

@ -2101,10 +2101,11 @@ static void flush_unmaps(void)
/* just flush them all */
for (i = 0; i < g_num_of_iommus; i++) {
if (deferred_flush[i].next) {
struct intel_iommu *iommu =
deferred_flush[i].domain[0]->iommu;
struct intel_iommu *iommu = g_iommus[i];
if (!iommu)
continue;
if (deferred_flush[i].next) {
iommu->flush.flush_iotlb(iommu, 0, 0, 0,
DMA_TLB_GLOBAL_FLUSH, 0);
for (j = 0; j < deferred_flush[i].next; j++) {