diff options
-rw-r--r-- | arch/x86/kernel/amd_iommu.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index 64cc582feb9b..2dc093370d2d 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) | |||
516 | flush_all_domains_on_iommu(iommu); | 516 | flush_all_domains_on_iommu(iommu); |
517 | } | 517 | } |
518 | 518 | ||
519 | static void flush_all_devices_for_iommu(struct amd_iommu *iommu) | ||
520 | { | ||
521 | int i; | ||
522 | |||
523 | for (i = 0; i <= amd_iommu_last_bdf; ++i) { | ||
524 | if (iommu != amd_iommu_rlookup_table[i]) | ||
525 | continue; | ||
526 | |||
527 | iommu_queue_inv_dev_entry(iommu, i); | ||
528 | iommu_completion_wait(iommu); | ||
529 | } | ||
530 | } | ||
531 | |||
519 | void amd_iommu_flush_all_devices(void) | 532 | void amd_iommu_flush_all_devices(void) |
520 | { | 533 | { |
521 | struct amd_iommu *iommu; | 534 | struct amd_iommu *iommu; |