lkml.org 
[lkml]   [2014]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/6] iommu/vt-d: move up no_iommu and dmar_disabled check
Date
Move up the no_iommu and dmar_disabled check, avoid the
useless initialization for dmar.

Signed-off-by: Yijing Wang <wangyijing@huawei.com>
---
drivers/iommu/intel-iommu.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
index e020dcf..6b71608 100644
--- a/drivers/iommu/intel-iommu.c
+++ b/drivers/iommu/intel-iommu.c
@@ -3948,6 +3948,9 @@ int __init intel_iommu_init(void)
/* VT-d is required for a TXT/tboot launch, so enforce that */
force_on = tboot_force_iommu();

+ if (no_iommu || dmar_disabled)
+ return ret;
+
if (iommu_init_mempool()) {
if (force_on)
panic("tboot: Failed to initialize iommu memory\n");
@@ -3974,9 +3977,6 @@ int __init intel_iommu_init(void)
goto out_free_dmar;
}

- if (no_iommu || dmar_disabled)
- goto out_free_dmar;
-
if (list_empty(&dmar_rmrr_units))
printk(KERN_INFO "DMAR: No RMRR found\n");

--
1.7.1



\
 
 \ /
  Last update: 2014-05-20 15:01    [W:0.110 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site