From 49962ef977aa9c6e5c001d9f4fc38bd1aa047102 Mon Sep 17 00:00:00 2001 From: Suresh Siddha Date: Thu, 10 Jul 2008 11:16:51 -0700 Subject: [PATCH] --- yaml --- r: 112651 b: refs/heads/master c: 1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2 h: refs/heads/master i: 112649: 63b2091d3810eb268e49d6e83330d325d7f9e482 112647: e47a853aaa39d141edbb693d9e97e95aa2483454 v: v3 --- [refs] | 2 +- trunk/drivers/pci/dmar.c | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index ac42f560ce2e..9ab05ac1b9d0 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 32e1d0a0651004f5fe47f85a2a5c725ad579a90c +refs/heads/master: 1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2 diff --git a/trunk/drivers/pci/dmar.c b/trunk/drivers/pci/dmar.c index 23a119e6485e..bd2c01674f5e 100644 --- a/trunk/drivers/pci/dmar.c +++ b/trunk/drivers/pci/dmar.c @@ -457,6 +457,31 @@ void __init detect_intel_iommu(void) #ifdef CONFIG_DMAR { + struct acpi_table_dmar *dmar; + /* + * for now we will disable dma-remapping when interrupt + * remapping is enabled. + * When support for queued invalidation for IOTLB invalidation + * is added, we will not need this any more. + */ + dmar = (struct acpi_table_dmar *) dmar_tbl; + if (ret && cpu_has_x2apic && dmar->flags & 0x1) { + printk(KERN_INFO + "Queued invalidation will be enabled to support " + "x2apic and Intr-remapping.\n"); + printk(KERN_INFO + "Disabling IOMMU detection, because of missing " + "queued invalidation support for IOTLB " + "invalidation\n"); + printk(KERN_INFO + "Use \"nox2apic\", if you want to use Intel " + " IOMMU for DMA-remapping and don't care about " + " x2apic support\n"); + + dmar_disabled = 1; + return; + } + if (ret && !no_iommu && !iommu_detected && !swiotlb && !dmar_disabled) iommu_detected = 1;