]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
iommu/amd: Make amd_iommu_dev_update_dte() static
authorVasant Hegde <vasant.hegde@amd.com>
Wed, 28 Aug 2024 11:10:29 +0000 (11:10 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 4 Sep 2024 09:35:58 +0000 (11:35 +0200)
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>
drivers/iommu/amd/amd_iommu.h
drivers/iommu/amd/iommu.c

index 94402b88789dc171d666c8f622d552d489821df2..705dd364afe3451f7344d7d40f79115478f14e37 100644 (file)
@@ -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,
index 5289be98377ac54d7cb728fa8fc1babe541efb37..adb579030e682b51a952c872a3ab71b0e9ab62ce 100644 (file)
@@ -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;
 }