aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorShuah Khan <shuah.khan@hp.com>2012-06-06 10:50:06 -0600
committerJoerg Roedel <joerg.roedel@amd.com>2012-06-07 12:11:21 +0200
commitf2f12b6fc032c7b1419fd6db84e2868b5f05a878 (patch)
tree930c98722adb84eabf64830a2192efe7a31155bc /drivers/iommu
parenteee53537c476c947bf7faa1c916d2f5a0ae8ec93 (diff)
downloadkernel_goldelico_gta04-f2f12b6fc032c7b1419fd6db84e2868b5f05a878.zip
kernel_goldelico_gta04-f2f12b6fc032c7b1419fd6db84e2868b5f05a878.tar.gz
kernel_goldelico_gta04-f2f12b6fc032c7b1419fd6db84e2868b5f05a878.tar.bz2
iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
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>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/amd_iommu_init.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 542024b..c04ddca 100644
--- a/drivers/iommu/amd_iommu_init.c
+++ b/drivers/iommu/amd_iommu_init.c
@@ -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;