summaryrefslogtreecommitdiff
blob: 925b47bc21a9fe02e015d7c518192ab87b4cf20c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# HG changeset patch
# User chrisw@sous-sol.org
# Date Tue Oct 03 13:44:38 2006 -0400
# Node ID e5a7f30e1db3f1084f6789d21ea2a6fdaafdb96d
# parent: 6cd0fae5d84c4a4b15546ceaade74b7d7f044404
Make sure no_iommu_init is called when needed on x86_64.  Thanks
to Mark McLoughlin <markmc@redhat.com> for spotting the issue and
proposing a fix.

Index: patching/arch/i386/kernel/pci-dma-xen.c
===================================================================
--- patching.orig/arch/i386/kernel/pci-dma-xen.c
+++ patching/arch/i386/kernel/pci-dma-xen.c
@@ -22,6 +22,8 @@
 
 #ifdef __x86_64__
 #include <asm/proto.h>
+#include <asm/calgary.h>
+
 
 int iommu_merge __read_mostly = 0;
 EXPORT_SYMBOL(iommu_merge);
@@ -71,6 +73,22 @@ void __init pci_iommu_alloc(void)
 #endif
 }
 
+static int __init pci_iommu_init(void)
+{
+#ifdef CONFIG_CALGARY_IOMMU
+	calgary_iommu_init();
+#endif
+
+#ifdef CONFIG_IOMMU
+	gart_iommu_init();
+#endif
+
+	no_iommu_init();
+	return 0;
+}
+
+/* Must execute after PCI subsystem */
+fs_initcall(pci_iommu_init);
 #endif
 
 struct dma_coherent_mem {