Commit f1796366 authored by Shuah Khan's avatar Shuah Khan Committed by Ben Hutchings

iommu/amd: Fix missing iommu_shutdown initialization in passthrough mode

commit f2f12b6f upstream.

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: default avatarShuah Khan <shuah.khan@hp.com>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
[bwh: Backported to 3.2: adjust context]
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 11a5b0b5
......@@ -1468,6 +1468,8 @@ static int __init amd_iommu_init(void)
register_syscore_ops(&amd_iommu_syscore_ops);
x86_platform.iommu_shutdown = disable_iommus;
if (iommu_pass_through)
goto out;
......@@ -1476,7 +1478,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment