diff options
author | Vasant Hegde <vasant.hegde@amd.com> | 2024-08-28 13:10:29 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2024-09-04 11:35:58 +0200 |
commit | 89ffb2c3c2a1d0bff5515fc53f93de86fb6753c0 (patch) | |
tree | ab1680e59bd780902378f8fcc65206e0bcf579f8 /drivers/iommu | |
parent | iommu/amd: Rework amd_iommu_update_and_flush_device_table() (diff) | |
download | linux-89ffb2c3c2a1d0bff5515fc53f93de86fb6753c0.tar.xz linux-89ffb2c3c2a1d0bff5515fc53f93de86fb6753c0.zip |
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 <vasant.hegde@amd.com>
Reviewed-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20240828111029.5429-9-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/amd/amd_iommu.h | 1 | ||||
-rw-r--r-- | drivers/iommu/amd/iommu.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/drivers/iommu/amd/amd_iommu.h b/drivers/iommu/amd/amd_iommu.h index 94402b88789d..705dd364afe3 100644 --- a/drivers/iommu/amd/amd_iommu.h +++ b/drivers/iommu/amd/amd_iommu.h @@ -87,7 +87,6 @@ int amd_iommu_complete_ppr(struct device *dev, u32 pasid, int status, int tag); void amd_iommu_flush_all_caches(struct amd_iommu *iommu); void amd_iommu_update_and_flush_device_table(struct protection_domain *domain); void amd_iommu_domain_update(struct protection_domain *domain); -void amd_iommu_dev_update_dte(struct iommu_dev_data *dev_data, bool set); void amd_iommu_domain_flush_pages(struct protection_domain *domain, u64 address, size_t size); void amd_iommu_dev_flush_pasid_pages(struct iommu_dev_data *dev_data, diff --git a/drivers/iommu/amd/iommu.c b/drivers/iommu/amd/iommu.c index 5289be98377a..adb579030e68 100644 --- a/drivers/iommu/amd/iommu.c +++ b/drivers/iommu/amd/iommu.c @@ -1955,7 +1955,7 @@ static void clear_dte_entry(struct amd_iommu *iommu, u16 devid) } /* Update and flush DTE for the given device */ -void amd_iommu_dev_update_dte(struct iommu_dev_data *dev_data, bool set) +static void dev_update_dte(struct iommu_dev_data *dev_data, bool set) { struct amd_iommu *iommu = get_amd_iommu_from_dev(dev_data->dev); @@ -2055,7 +2055,7 @@ static void do_detach(struct iommu_dev_data *dev_data) struct amd_iommu *iommu = get_amd_iommu_from_dev_data(dev_data); /* Clear DTE and flush the entry */ - amd_iommu_dev_update_dte(dev_data, false); + dev_update_dte(dev_data, false); /* Flush IOTLB and wait for the flushes to finish */ amd_iommu_domain_flush_all(domain); @@ -2467,7 +2467,7 @@ static int blocked_domain_attach_device(struct iommu_domain *domain, /* Clear DTE and flush the entry */ spin_lock(&dev_data->lock); - amd_iommu_dev_update_dte(dev_data, false); + dev_update_dte(dev_data, false); spin_unlock(&dev_data->lock); return 0; @@ -2535,7 +2535,7 @@ static int amd_iommu_attach_device(struct iommu_domain *dom, } /* Update device table */ - amd_iommu_dev_update_dte(dev_data, true); + dev_update_dte(dev_data, true); return ret; } |