[RFC PATCH 10/14] IOMMU: Separate free_dmar_iommu from free_iommu

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We will need separate two calling later for iommu_remove.

Signed-off-by: Yinghai Lu <yinghai@xxxxxxxxxx>
---
 drivers/iommu/dmar.c        |    2 --
 drivers/iommu/intel-iommu.c |    1 +
 2 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index 043192e..ea9d210 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -810,8 +810,6 @@ void free_iommu(struct intel_iommu *iommu)
 	if (!iommu)
 		return;
 
-	free_dmar_iommu(iommu);
-
 	if (iommu->reg)
 		iounmap(iommu->reg);
 	__clear_bit(iommu->seq_id, iommu_allocated);
diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index 4116944..662932f 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -2613,6 +2613,7 @@ error:
 		if (drhd->ignored)
 			continue;
 		iommu = drhd->iommu;
+		free_dmar_iommu(iommu);
 		free_iommu(iommu);
 	}
 	kfree(g_iommus);
-- 
1.7.7

--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux