summaryrefslogtreecommitdiff
path: root/arch/x86/kernel
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2009-09-03 13:39:23 (GMT)
committerJoerg Roedel <joerg.roedel@amd.com>2009-09-03 13:55:23 (GMT)
commitd586d7852ccd0cecb502bf4809f827e60c486af0 (patch)
tree42d01aaa0acfa6a9e73ba99db5c032653aed7a8b /arch/x86/kernel
parente394d72aa8b319211b8f947d151d9d50b0fde842 (diff)
downloadlinux-fsl-qoriq-d586d7852ccd0cecb502bf4809f827e60c486af0.tar.xz
x86/amd-iommu: Add function to flush all DTEs on one IOMMU
This function flushes all DTE entries on one IOMMU for all devices behind this IOMMU. This is required for command buffer resetting later. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86/kernel')
-rw-r--r--arch/x86/kernel/amd_iommu.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 64cc582..2dc0933 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -516,6 +516,19 @@ void amd_iommu_flush_all_domains(void)
flush_all_domains_on_iommu(iommu);
}
+static void flush_all_devices_for_iommu(struct amd_iommu *iommu)
+{
+ int i;
+
+ for (i = 0; i <= amd_iommu_last_bdf; ++i) {
+ if (iommu != amd_iommu_rlookup_table[i])
+ continue;
+
+ iommu_queue_inv_dev_entry(iommu, i);
+ iommu_completion_wait(iommu);
+ }
+}
+
void amd_iommu_flush_all_devices(void)
{
struct amd_iommu *iommu;