diff mbox

[Part1,V2,07/20] iommu/vt-d, trivial: check suitable flag in function detect_intel_iommu()

Message ID 1386300083-6882-8-git-send-email-jiang.liu@linux.intel.com (mailing list archive)
State New, archived
Delegated to: Bjorn Helgaas
Headers show

Commit Message

Jiang Liu Dec. 6, 2013, 3:21 a.m. UTC
Flag irq_remapping_enabled is only set by intel_enable_irq_remapping(),
which is called after detect_intel_iommu(). So we should check flag
disable_irq_remap instead of irq_remapping_enabled in function
detect_intel_iommu().

Reviewed-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
---
 drivers/iommu/dmar.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/drivers/iommu/dmar.c b/drivers/iommu/dmar.c
index c17dbf7..70612a9 100644
--- a/drivers/iommu/dmar.c
+++ b/drivers/iommu/dmar.c
@@ -560,7 +560,7 @@  int __init detect_intel_iommu(void)
 
 		dmar = (struct acpi_table_dmar *) dmar_tbl;
 
-		if (ret && irq_remapping_enabled && cpu_has_x2apic &&
+		if (ret && !disable_irq_remap && cpu_has_x2apic &&
 		    dmar->flags & 0x1)
 			pr_info("Queued invalidation will be enabled to support x2apic and Intr-remapping.\n");