public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joerg Roedel <joerg.roedel@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	Chris Wright <chrisw@sous-sol.org>,
	Joerg Roedel <joerg.roedel@amd.com>
Subject: [PATCH 6/6] amd-iommu: resume cleanup
Date: Tue, 16 Jun 2009 10:56:15 +0200	[thread overview]
Message-ID: <1245142575-7166-7-git-send-email-joerg.roedel@amd.com> (raw)
In-Reply-To: <1245142575-7166-1-git-send-email-joerg.roedel@amd.com>

From: Chris Wright <chrisw@sous-sol.org>

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>
---
 arch/x86/kernel/amd_iommu_init.c |    8 +-------
 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 068a356..10b2acc 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;
 }
-- 
1.6.3.1



  parent reply	other threads:[~2009-06-16  8:57 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-16  8:56 [git pull][PATCH 0/6] amd-iommu fixes Joerg Roedel
2009-06-16  8:56 ` [PATCH 1/6] amd-iommu: disable IOMMU hardware on shutdown Joerg Roedel
2009-06-16  8:56 ` [PATCH 2/6] x86: disable IOMMUs on kernel crash Joerg Roedel
2009-06-16  8:56 ` [PATCH 3/6] amd-iommu: flush domain tlb when attaching a new device Joerg Roedel
2009-06-16  8:56 ` [PATCH 4/6] amd-iommu: disable cmd buffer and evt logging before reprogramming iommu Joerg Roedel
2009-06-16  8:56 ` [PATCH 5/6] amd-iommu: set event buffer head and tail to 0 manually Joerg Roedel
2009-06-16  8:56 ` Joerg Roedel [this message]
2009-06-16  9:52 ` [git pull][PATCH 0/6] amd-iommu fixes Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1245142575-7166-7-git-send-email-joerg.roedel@amd.com \
    --to=joerg.roedel@amd.com \
    --cc=chrisw@sous-sol.org \
    --cc=iommu@lists.linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox