|
@@ -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;
|