Skip to content

Commit af32637

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Rename iommu_flush_all_caches() -> amd_iommu_flush_all_caches()
Rename function inline with driver naming convention. No functional changes. Signed-off-by: Vasant Hegde <vasant.hegde@amd.com> Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com> Reviewed-by: Jason Gunthorpe <jgg@nvidia.com> Link: https://lore.kernel.org/r/20231122090215.6191-2-vasant.hegde@amd.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
1 parent 57cdb72 commit af32637

4 files changed

Lines changed: 10 additions & 11 deletions

File tree

drivers/iommu/amd/amd_iommu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,11 @@ int amd_iommu_pdev_enable_cap_pri(struct pci_dev *pdev);
5353
void amd_iommu_pdev_disable_cap_pri(struct pci_dev *pdev);
5454

5555
int amd_iommu_flush_page(struct iommu_domain *dom, u32 pasid, u64 address);
56+
/*
57+
* This function flushes all internal caches of
58+
* the IOMMU used by this driver.
59+
*/
60+
void amd_iommu_flush_all_caches(struct amd_iommu *iommu);
5661
void amd_iommu_update_and_flush_device_table(struct protection_domain *domain);
5762
void amd_iommu_domain_update(struct protection_domain *domain);
5863
void amd_iommu_domain_flush_complete(struct protection_domain *domain);

drivers/iommu/amd/amd_iommu_types.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -902,12 +902,6 @@ extern int amd_iommu_max_glx_val;
902902
extern u64 amd_iommu_efr;
903903
extern u64 amd_iommu_efr2;
904904

905-
/*
906-
* This function flushes all internal caches of
907-
* the IOMMU used by this driver.
908-
*/
909-
void iommu_flush_all_caches(struct amd_iommu *iommu);
910-
911905
static inline int get_ioapic_devid(int id)
912906
{
913907
struct devid_map *entry;

drivers/iommu/amd/init.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2223,7 +2223,7 @@ static int __init amd_iommu_init_pci(void)
22232223
init_device_table_dma(pci_seg);
22242224

22252225
for_each_iommu(iommu)
2226-
iommu_flush_all_caches(iommu);
2226+
amd_iommu_flush_all_caches(iommu);
22272227

22282228
print_iommu_info();
22292229

@@ -2773,7 +2773,7 @@ static void early_enable_iommu(struct amd_iommu *iommu)
27732773
iommu_enable_xt(iommu);
27742774
iommu_enable_irtcachedis(iommu);
27752775
iommu_enable(iommu);
2776-
iommu_flush_all_caches(iommu);
2776+
amd_iommu_flush_all_caches(iommu);
27772777
}
27782778

27792779
/*
@@ -2829,7 +2829,7 @@ static void early_enable_iommus(void)
28292829
iommu_enable_xt(iommu);
28302830
iommu_enable_irtcachedis(iommu);
28312831
iommu_set_device_table(iommu);
2832-
iommu_flush_all_caches(iommu);
2832+
amd_iommu_flush_all_caches(iommu);
28332833
}
28342834
}
28352835
}
@@ -3293,7 +3293,7 @@ static int __init state_next(void)
32933293
uninit_device_table_dma(pci_seg);
32943294

32953295
for_each_iommu(iommu)
3296-
iommu_flush_all_caches(iommu);
3296+
amd_iommu_flush_all_caches(iommu);
32973297
}
32983298
}
32993299
return ret;

drivers/iommu/amd/iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1392,7 +1392,7 @@ static void amd_iommu_flush_irt_all(struct amd_iommu *iommu)
13921392
iommu_completion_wait(iommu);
13931393
}
13941394

1395-
void iommu_flush_all_caches(struct amd_iommu *iommu)
1395+
void amd_iommu_flush_all_caches(struct amd_iommu *iommu)
13961396
{
13971397
if (check_feature(FEATURE_IA)) {
13981398
amd_iommu_flush_all(iommu);

0 commit comments

Comments
 (0)