]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
iommu/vt-d, trivial: check suitable flag in function detect_intel_iommu()
authorJiang Liu <jiang.liu@linux.intel.com>
Mon, 6 Jan 2014 06:18:14 +0000 (14:18 +0800)
committerJoerg Roedel <joro@8bytes.org>
Tue, 7 Jan 2014 16:16:54 +0000 (17:16 +0100)
Flag irq_remapping_enabled is only set by intel_enable_irq_remapping(),
which is called after detect_intel_iommu(). So moving pr_info() from
detect_intel_iommu() to intel_enable_irq_remapping(), which also
slightly simplifies implementation.

Reviewed-by: Yijing Wang <wangyijing@huawei.com>
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
drivers/iommu/dmar.c
drivers/iommu/intel_irq_remapping.c

index 28d93b68ff0264b8a1c2ec6dc626f8c94784d057..e4c3ea0224281f5177075a51969ccd01acadded1 100644 (file)
@@ -556,14 +556,6 @@ int __init detect_intel_iommu(void)
        if (ret)
                ret = check_zero_address();
        {
-               struct acpi_table_dmar *dmar;
-
-               dmar = (struct acpi_table_dmar *) dmar_tbl;
-
-               if (ret && irq_remapping_enabled && cpu_has_x2apic &&
-                   dmar->flags & 0x1)
-                       pr_info("Queued invalidation will be enabled to support x2apic and Intr-remapping.\n");
-
                if (ret && !no_iommu && !iommu_detected && !dmar_disabled) {
                        iommu_detected = 1;
                        /* Make sure ACS will be enabled */
index 3aa9b5c347e4e457d33abfafa5e6a63fda156e82..b9256a4f946dc3f9aa7483fcf7f270ba7292e522 100644 (file)
@@ -561,6 +561,8 @@ static int __init intel_enable_irq_remapping(void)
        }
 
        if (x2apic_present) {
+               pr_info("Queued invalidation will be enabled to support x2apic and Intr-remapping.\n");
+
                eim = !dmar_x2apic_optout();
                if (!eim)
                        printk(KERN_WARNING