summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/amd_iommu_init.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-05-31 15:05:20 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-07-05 11:22:24 -0700
commitd3c0c33429f930d2934fa7597e874306c07521f2 (patch)
treeda5f8402de403674b56f839c261645f8a25626c2 /arch/x86/kernel/amd_iommu_init.c
parentfdb4f05da375cad6e74a6ba5d07dbb7a97d5c8c7 (diff)
x86/amd-iommu: Fall back to GART if initialization fails
commit d7f0776975334070a93370ae048fda0c31a91c38 upstream. This patch implements a fallback to the GART IOMMU if this is possible and the AMD IOMMU initialization failed. Otherwise the fallback would be nommu which is very problematic on machines with more than 4GB of memory or swiotlb which hurts io-performance. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 890af003488c..6f8ce7516b7a 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -1357,6 +1357,15 @@ free:
free_unity_maps();
+#ifdef CONFIG_GART_IOMMU
+ /*
+ * We failed to initialize the AMD IOMMU - try fallback to GART
+ * if possible.
+ */
+ gart_iommu_init();
+
+#endif
+
goto out;
}