Skip to content

Commit 89ffb2c

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Make amd_iommu_dev_update_dte() static
As its used inside iommu.c only. Also rename function to dev_update_dte() as its static function. No functional changes intended. Signed-off-by: Vasant Hegde <[email protected]> Reviewed-by: Suravee Suthikulpanit <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Joerg Roedel <[email protected]>
1 parent a330376 commit 89ffb2c

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

drivers/iommu/amd/amd_iommu.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ int amd_iommu_complete_ppr(struct device *dev, u32 pasid, int status, int tag);
8787
void amd_iommu_flush_all_caches(struct amd_iommu *iommu);
8888
void amd_iommu_update_and_flush_device_table(struct protection_domain *domain);
8989
void amd_iommu_domain_update(struct protection_domain *domain);
90-
void amd_iommu_dev_update_dte(struct iommu_dev_data *dev_data, bool set);
9190
void amd_iommu_domain_flush_pages(struct protection_domain *domain,
9291
u64 address, size_t size);
9392
void amd_iommu_dev_flush_pasid_pages(struct iommu_dev_data *dev_data,

drivers/iommu/amd/iommu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ static void clear_dte_entry(struct amd_iommu *iommu, u16 devid)
19551955
}
19561956

19571957
/* Update and flush DTE for the given device */
1958-
void amd_iommu_dev_update_dte(struct iommu_dev_data *dev_data, bool set)
1958+
static void dev_update_dte(struct iommu_dev_data *dev_data, bool set)
19591959
{
19601960
struct amd_iommu *iommu = get_amd_iommu_from_dev(dev_data->dev);
19611961

@@ -2055,7 +2055,7 @@ static void do_detach(struct iommu_dev_data *dev_data)
20552055
struct amd_iommu *iommu = get_amd_iommu_from_dev_data(dev_data);
20562056

20572057
/* Clear DTE and flush the entry */
2058-
amd_iommu_dev_update_dte(dev_data, false);
2058+
dev_update_dte(dev_data, false);
20592059

20602060
/* Flush IOTLB and wait for the flushes to finish */
20612061
amd_iommu_domain_flush_all(domain);
@@ -2467,7 +2467,7 @@ static int blocked_domain_attach_device(struct iommu_domain *domain,
24672467

24682468
/* Clear DTE and flush the entry */
24692469
spin_lock(&dev_data->lock);
2470-
amd_iommu_dev_update_dte(dev_data, false);
2470+
dev_update_dte(dev_data, false);
24712471
spin_unlock(&dev_data->lock);
24722472

24732473
return 0;
@@ -2535,7 +2535,7 @@ static int amd_iommu_attach_device(struct iommu_domain *dom,
25352535
}
25362536

25372537
/* Update device table */
2538-
amd_iommu_dev_update_dte(dev_data, true);
2538+
dev_update_dte(dev_data, true);
25392539

25402540
return ret;
25412541
}

0 commit comments

Comments
 (0)