diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-01-22 17:44:35 +0100 |
---|---|---|
committer | Joerg Roedel <joerg.roedel@amd.com> | 2010-01-22 17:44:35 +0100 |
commit | f5325094379158e6b876ea0010c807bf7890ec8f (patch) | |
tree | 54a40356a9076bddaac4186c1b97e2dbb98a5863 /arch/x86/kernel/amd_iommu.c | |
parent | 2ca762790caf822f7b61430fbaffa3ae4219977f (diff) | |
download | op-kernel-dev-f5325094379158e6b876ea0010c807bf7890ec8f.zip op-kernel-dev-f5325094379158e6b876ea0010c807bf7890ec8f.tar.gz |
x86/amd-iommu: Fix IOMMU-API initialization for iommu=pt
This patch moves the initialization of the iommu-api out of
the dma-ops initialization code. This ensures that the
iommu-api is initialized even with iommu=pt.
Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 4478a48..751ce73 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c @@ -2221,6 +2221,12 @@ static struct dma_map_ops amd_iommu_dma_ops = { /* * The function which clues the AMD IOMMU driver into dma_ops. */ + +void __init amd_iommu_init_api(void) +{ + register_iommu(&amd_iommu_ops); +} + int __init amd_iommu_init_dma_ops(void) { struct amd_iommu *iommu; @@ -2256,8 +2262,6 @@ int __init amd_iommu_init_dma_ops(void) /* Make the driver finally visible to the drivers */ dma_ops = &amd_iommu_dma_ops; - register_iommu(&amd_iommu_ops); - amd_iommu_stats_init(); return 0; |