Commit b977e73a authored by Jiang Liu's avatar Jiang Liu Committed by Joerg Roedel

iommu/vt-d, trivial: check suitable flag in function detect_intel_iommu()

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: default avatarYijing Wang <wangyijing@huawei.com>
Signed-off-by: default avatarJiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
parent 9544c003
...@@ -556,14 +556,6 @@ int __init detect_intel_iommu(void) ...@@ -556,14 +556,6 @@ int __init detect_intel_iommu(void)
if (ret) if (ret)
ret = check_zero_address(); 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) { if (ret && !no_iommu && !iommu_detected && !dmar_disabled) {
iommu_detected = 1; iommu_detected = 1;
/* Make sure ACS will be enabled */ /* Make sure ACS will be enabled */
......
...@@ -561,6 +561,8 @@ static int __init intel_enable_irq_remapping(void) ...@@ -561,6 +561,8 @@ static int __init intel_enable_irq_remapping(void)
} }
if (x2apic_present) { if (x2apic_present) {
pr_info("Queued invalidation will be enabled to support x2apic and Intr-remapping.\n");
eim = !dmar_x2apic_optout(); eim = !dmar_x2apic_optout();
if (!eim) if (!eim)
printk(KERN_WARNING printk(KERN_WARNING
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment