aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kernel/amd_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-05-05 15:33:57 +0200
committerJoerg Roedel <joerg.roedel@amd.com>2009-05-28 18:10:12 +0200
commitbfd1be1857e5a3385bf146e02e6dc3dd4241bec1 (patch)
treeb33ca1a26dcecae3556ea9a1c3c019ffcfaab52e /arch/x86/kernel/amd_iommu.c
parent92ac4320af6ed4294c2c221dd4ccbfd9026a3aa7 (diff)
amd-iommu: add function to flush tlb for all domains
This function is required for suspend/resume support with AMD IOMMU enabled. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel/amd_iommu.c')
-rw-r--r--arch/x86/kernel/amd_iommu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index d9e9dc141a1..826ad079efc 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -449,6 +449,17 @@ static void iommu_flush_domain(u16 domid)
}
}
+void amd_iommu_flush_all_domains(void)
+{
+ int i;
+
+ for (i = 1; i < MAX_DOMAIN_ID; ++i) {
+ if (!test_bit(i, amd_iommu_pd_alloc_bitmap))
+ continue;
+ iommu_flush_domain(i);
+ }
+}
+
/****************************************************************************
*
* The functions below are used the create the page table mappings for