Skip to content

Commit

Permalink
iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shuah Khan authored and Joerg Roedel committed Jun 7, 2012
1 parent eee5353 commit f2f12b6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

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

Expand Down

0 comments on commit f2f12b6

Please sign in to comment.