]> git.ipfire.org Git - ipfire-2.x.git/blame - src/patches/suse-2.6.27.39/patches.arch/x2APIC_PATCH_18_of_41_1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2
Fix oinkmaster patch.
[ipfire-2.x.git] / src / patches / suse-2.6.27.39 / patches.arch / x2APIC_PATCH_18_of_41_1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2
CommitLineData
2cb7cef9
BS
1From: Suresh Siddha <suresh.b.siddha@intel.com>
2Subject: x64, x2apic/intr-remap: disable DMA-remapping if Interrupt-remapping is detected (temporary quirk)
3References: fate #303948 and fate #303984
4Patch-Mainline: queued for .28
5Commit-ID: 1cb11583a6c4ceda7426eb36f7bf0419da8dfbc2
6
7Signed-off-by: Thomas Renninger <trenn@suse.de>
8
9Interrupt-remapping enables queued invalidation. And once queued invalidation
10is enabled, IOTLB invalidation also needs to use the queued invalidation
11mechanism and the register based IOTLB invalidation doesn't work.
12
13For now, Support for IOTLB invalidation using queued invalidation is
14missing. Meanwhile, disable DMA-remapping, if Interrupt-remapping
15support is detected.
16
17For the meanwhile, if someone wants to really enable DMA-remapping, they
18can use nox2apic, which will disable interrupt-remapping and as such
19doesn't enable queued invalidation.
20
21And given that none of the release platforms support intr-remapping yet,
22we should be ok for this temporary hack.
23
24Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
25Cc: akpm@linux-foundation.org
26Cc: arjan@linux.intel.com
27Cc: andi@firstfloor.org
28Cc: ebiederm@xmission.com
29Cc: jbarnes@virtuousgeek.org
30Cc: steiner@sgi.com
31Signed-off-by: Ingo Molnar <mingo@elte.hu>
32
33---
34 drivers/pci/dmar.c | 25 +++++++++++++++++++++++++
35 1 file changed, 25 insertions(+)
36
37Index: linux-2.6.26/drivers/pci/dmar.c
38===================================================================
39--- linux-2.6.26.orig/drivers/pci/dmar.c
40+++ linux-2.6.26/drivers/pci/dmar.c
41@@ -459,6 +459,31 @@ void __init detect_intel_iommu(void)
42
43 #ifdef CONFIG_DMAR
44 {
45+ struct acpi_table_dmar *dmar;
46+ /*
47+ * for now we will disable dma-remapping when interrupt
48+ * remapping is enabled.
49+ * When support for queued invalidation for IOTLB invalidation
50+ * is added, we will not need this any more.
51+ */
52+ dmar = (struct acpi_table_dmar *) dmar_tbl;
53+ if (ret && cpu_has_x2apic && dmar->flags & 0x1) {
54+ printk(KERN_INFO
55+ "Queued invalidation will be enabled to support "
56+ "x2apic and Intr-remapping.\n");
57+ printk(KERN_INFO
58+ "Disabling IOMMU detection, because of missing "
59+ "queued invalidation support for IOTLB "
60+ "invalidation\n");
61+ printk(KERN_INFO
62+ "Use \"nox2apic\", if you want to use Intel "
63+ " IOMMU for DMA-remapping and don't care about "
64+ " x2apic support\n");
65+
66+ dmar_disabled = 1;
67+ return;
68+ }
69+
70 if (ret && !no_iommu && !iommu_detected && !swiotlb &&
71 !dmar_disabled)
72 iommu_detected = 1;