summaryrefslogtreecommitdiff
path: root/arch/x86/kernel/amd_iommu_init.c
diff options
context:
space:
mode:
authorChris Wright <chrisw@sous-sol.org>2009-06-16 03:01:37 -0400
committerJoerg Roedel <joerg.roedel@amd.com>2009-06-16 10:19:16 +0200
commit6a047d8b9efc4b7d0c57ca4835f7e519e5c90d3f (patch)
tree3d6d4b1f79a0d542b1c481dd1310a3bbf92b3bc9 /arch/x86/kernel/amd_iommu_init.c
parent09067207f6eacb7f00c8f7f0623c3696083ce042 (diff)
downloadlwn-6a047d8b9efc4b7d0c57ca4835f7e519e5c90d3f.tar.gz
lwn-6a047d8b9efc4b7d0c57ca4835f7e519e5c90d3f.zip
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: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu_init.c')
-rw-r--r--arch/x86/kernel/amd_iommu_init.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 068a3569f837..10b2accd12ea 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -1079,12 +1079,6 @@ static void disable_iommus(void)
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 */
enable_iommus();
@@ -1092,8 +1086,8 @@ static int amd_iommu_resume(struct sys_device *dev)
* we have to flush after the IOMMUs are enabled because a
* disabled IOMMU will never execute the commands we send
*/
- amd_iommu_flush_all_domains();
amd_iommu_flush_all_devices();
+ amd_iommu_flush_all_domains();
return 0;
}