From: Jiang Liu Date: Mon, 6 Jan 2014 06:18:13 +0000 (+0800) Subject: iommu/vt-d, trivial: print correct domain id of static identity domain X-Git-Tag: next-20140108~35^2^3~12 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=d243c9ef1329bd75dcea39fb0126e1409e67f624;p=karo-tx-linux.git iommu/vt-d, trivial: print correct domain id of static identity domain Field si_domain->id is set by iommu_attach_domain(), so we should only print domain id for static identity domain after calling iommu_attach_domain(si_domain, iommu), otherwise it's always zero. Signed-off-by: Jiang Liu Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c index 7bddb9b32da8..01922be564ca 100644 --- a/drivers/iommu/intel-iommu.c +++ b/drivers/iommu/intel-iommu.c @@ -2248,8 +2248,6 @@ static int __init si_domain_init(int hw) if (!si_domain) return -EFAULT; - pr_debug("Identity mapping domain is domain %d\n", si_domain->id); - for_each_active_iommu(iommu, drhd) { ret = iommu_attach_domain(si_domain, iommu); if (ret) { @@ -2264,6 +2262,8 @@ static int __init si_domain_init(int hw) } si_domain->flags = DOMAIN_FLAG_STATIC_IDENTITY; + pr_debug("IOMMU: identity mapping domain is domain %d\n", + si_domain->id); if (hw) return 0;