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

Yinghai Lu
2012-04-03T02:21:08Z

We will need separate two calling later for iommu_remove.

Signed-off-by: Yinghai Lu <yinghai@kernel.org>
---
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