blob: e46e6573a5eaab6e36da7bbcf61be8db97a894ef (
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
46
|
# 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: linux-2.6.20.i386/arch/i386/kernel/pci-dma-xen.c
===================================================================
--- linux-2.6.20.i386.orig/arch/i386/kernel/pci-dma-xen.c
+++ linux-2.6.20.i386/arch/i386/kernel/pci-dma-xen.c
@@ -21,6 +21,9 @@
#include <asm/bug.h>
#ifdef __x86_64__
+#include <asm/proto.h>
+#include <asm/calgary.h>
+
int iommu_merge __read_mostly = 0;
EXPORT_SYMBOL(iommu_merge);
@@ -69,6 +72,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 {
|