iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
authorShuah Khan <shuah.khan@hp.com>
Wed, 6 Jun 2012 16:50:06 +0000 (10:50 -0600)
committerJoerg Roedel <joerg.roedel@amd.com>
Thu, 7 Jun 2012 10:11:21 +0000 (12:11 +0200)
The iommu_shutdown callback is not initialized when the AMD
IOMMU driver runs in passthrough mode. Fix that by moving
the callback initialization before the check for
passthrough mode.

Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Cc: stable@vger.kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
drivers/iommu/amd_iommu_init.c

index 542024ba6dba2eaccd640dbece64a44222285769..c04ddca7f12f1fb62e6126deed7437946f782b75 100644 (file)
@@ -1641,6 +1641,8 @@ static int __init amd_iommu_init(void)
 
        amd_iommu_init_api();
 
+       x86_platform.iommu_shutdown = disable_iommus;
+
        if (iommu_pass_through)
                goto out;
 
@@ -1649,8 +1651,6 @@ static int __init amd_iommu_init(void)
        else
                printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n");
 
-       x86_platform.iommu_shutdown = disable_iommus;
-
 out:
        return ret;
 
This page took 0.044674 seconds and 5 git commands to generate.