aboutsummaryrefslogtreecommitdiff
path: root/arch/x86_64/kernel/pci-dma.c
diff options
context:
space:
mode:
authorJon Mason <jdmason@us.ibm.com>2006-06-26 13:58:14 +0200
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 10:48:19 -0700
commite465058d55a88feb4c7ecabe63eea7ea7147e206 (patch)
treed431ed689e072415915694eecdfbcb9304287f01 /arch/x86_64/kernel/pci-dma.c
parent0dc243ae10c8309c170a3af9f1adad1924a9f217 (diff)
[PATCH] x86_64: Calgary IOMMU - Calgary specific bits
This patch hooks Calgary into the build, the x86-64 IOMMU initialization paths, and introduces the Calgary specific bits. The implementation draws inspiration from both PPC (which has support for the same chip but requires firmware support which we don't have on x86-64) and gart. Calgary is different from gart in that it support a translation table per PHB, as opposed to the single gart aperture. Changes from previous version: * Addition of boot-time disablement for bus-level translation/isolation (e.g, enable userspace DMA for things like X) * Usage of newer IOMMU abstraction functions Signed-off-by: Muli Ben-Yehuda <muli@il.ibm.com> Signed-off-by: Jon Mason <jdmason@us.ibm.com> Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/x86_64/kernel/pci-dma.c')
-rw-r--r--arch/x86_64/kernel/pci-dma.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index a45844c7e3a..9c44f4f2433 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -9,6 +9,7 @@
#include <linux/module.h>
#include <asm/io.h>
#include <asm/proto.h>
+#include <asm/calgary.h>
int iommu_merge __read_mostly = 0;
EXPORT_SYMBOL(iommu_merge);
@@ -291,6 +292,10 @@ void __init pci_iommu_alloc(void)
iommu_hole_init();
#endif
+#ifdef CONFIG_CALGARY_IOMMU
+ detect_calgary();
+#endif
+
#ifdef CONFIG_SWIOTLB
pci_swiotlb_init();
#endif
@@ -298,6 +303,10 @@ void __init pci_iommu_alloc(void)
static int __init pci_iommu_init(void)
{
+#ifdef CONFIG_CALGARY_IOMMU
+ calgary_iommu_init();
+#endif
+
#ifdef CONFIG_IOMMU
gart_iommu_init();
#endif