Skip to content

Commit

Permalink
x86/amd-iommu: Add function to flush all DTEs on one IOMMU
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Sep 3, 2009
1 parent e394d72 commit d586d78
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions arch/x86/kernel/amd_iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit d586d78

Please sign in to comment.