Commit 6a047d8b authored by Chris Wright's avatar Chris Wright Committed by Joerg Roedel

amd-iommu: resume cleanup

Now that enable_iommus() will call iommu_disable() for each iommu,
the call to disable_iommus() during resume is redundant.  Also, the order
for an invalidation is to invalidate device table entries first, then
domain translations.
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarJoerg Roedel <joerg.roedel@amd.com>
parent 09067207
...@@ -1079,12 +1079,6 @@ static void disable_iommus(void) ...@@ -1079,12 +1079,6 @@ static void disable_iommus(void)
static int amd_iommu_resume(struct sys_device *dev) static int amd_iommu_resume(struct sys_device *dev)
{ {
/*
* Disable IOMMUs before reprogramming the hardware registers.
* IOMMU is still enabled from the resume kernel.
*/
disable_iommus();
/* re-load the hardware */ /* re-load the hardware */
enable_iommus(); enable_iommus();
...@@ -1092,8 +1086,8 @@ static int amd_iommu_resume(struct sys_device *dev) ...@@ -1092,8 +1086,8 @@ static int amd_iommu_resume(struct sys_device *dev)
* we have to flush after the IOMMUs are enabled because a * we have to flush after the IOMMUs are enabled because a
* disabled IOMMU will never execute the commands we send * disabled IOMMU will never execute the commands we send
*/ */
amd_iommu_flush_all_domains();
amd_iommu_flush_all_devices(); amd_iommu_flush_all_devices();
amd_iommu_flush_all_domains();
return 0; return 0;
} }
......
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