summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoerg Roedel2008-06-26 21:28:08 +0200
committerIngo Molnar2008-06-27 10:12:22 +0200
commita69ca3401821b7312cb7ec939a8814240fd7b9b3 (patch)
treebdafe3cc24cbd898b2d613d194d93b7d026bb0dd
parentx86, AMD IOMMU: initialize dma_ops from IOMMU initialization and enable IOMMUs (diff)
downloadkernel-qcow2-linux-a69ca3401821b7312cb7ec939a8814240fd7b9b3.tar.gz
kernel-qcow2-linux-a69ca3401821b7312cb7ec939a8814240fd7b9b3.tar.xz
kernel-qcow2-linux-a69ca3401821b7312cb7ec939a8814240fd7b9b3.zip
AMD_IOMMU: call detect and initialization functions from dma code
This patch adds the function calls to initialize the AMD IOMMU hardware and dma_ops to the generic DMA code for the x86 architecture. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Cc: iommu@lists.linux-foundation.org Cc: bhavna.sarathy@amd.com Cc: Sebastian.Biemueller@amd.com Cc: robert.richter@amd.com Cc: joro@8bytes.org Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/pci-dma.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index dc00a1331ace..dea01672f1f4 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -7,6 +7,7 @@
#include <asm/dma.h>
#include <asm/gart.h>
#include <asm/calgary.h>
+#include <asm/amd_iommu.h>
int forbid_dac __read_mostly;
EXPORT_SYMBOL(forbid_dac);
@@ -122,6 +123,8 @@ void __init pci_iommu_alloc(void)
detect_intel_iommu();
+ amd_iommu_detect();
+
#ifdef CONFIG_SWIOTLB
pci_swiotlb_init();
#endif
@@ -502,6 +505,8 @@ static int __init pci_iommu_init(void)
intel_iommu_init();
+ amd_iommu_init();
+
#ifdef CONFIG_GART_IOMMU
gart_iommu_init();
#endif