Skip to content

Commit

Permalink
amd-iommu: resume cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Chris Wright authored and Joerg Roedel committed Jun 16, 2009
1 parent 0906720 commit 6a047d8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/x86/kernel/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1079,21 +1079,15 @@ 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();

/*
* 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;
}
Expand Down

0 comments on commit 6a047d8

Please sign in to comment.