They will be called later when copy old dev/irq tables. It's better to use them then call iommu_flush_all_caches() since iommu_flush_all_caches() will iterate many empty table entries.
Signed-off-by: Baoquan He <[email protected]> --- drivers/iommu/amd_iommu.c | 4 ++-- drivers/iommu/amd_iommu_proto.h | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index b01006d..48bcd83 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -995,7 +995,7 @@ static int iommu_queue_command(struct amd_iommu *iommu, struct iommu_cmd *cmd) * This function queues a completion wait command into the command * buffer of an IOMMU */ -static int iommu_completion_wait(struct amd_iommu *iommu) +int iommu_completion_wait(struct amd_iommu *iommu) { struct iommu_cmd cmd; volatile u64 sem = 0; @@ -1013,7 +1013,7 @@ static int iommu_completion_wait(struct amd_iommu *iommu) return wait_on_sem(&sem); } -static int iommu_flush_dte(struct amd_iommu *iommu, u16 devid) +int iommu_flush_dte(struct amd_iommu *iommu, u16 devid) { struct iommu_cmd cmd; diff --git a/drivers/iommu/amd_iommu_proto.h b/drivers/iommu/amd_iommu_proto.h index 743e209..62d8f2f 100644 --- a/drivers/iommu/amd_iommu_proto.h +++ b/drivers/iommu/amd_iommu_proto.h @@ -101,5 +101,7 @@ static inline bool iommu_feature(struct amd_iommu *iommu, u64 f) /* kdump checking */ extern bool translation_pre_enabled(void); extern void clear_translation_pre_enabled(void); +extern int iommu_completion_wait(struct amd_iommu *iommu); +extern int iommu_flush_dte(struct amd_iommu *iommu, u16 devid); #endif /* _ASM_X86_AMD_IOMMU_PROTO_H */ -- 2.4.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
