Skip to content

Commit a330376

Browse files
hegdevasantjoergroedel
authored andcommitted
iommu/amd: Rework amd_iommu_update_and_flush_device_table()
Remove separate function to update and flush the device table as only amd_iommu_update_and_flush_device_table() calls these functions. 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 964877d commit a330376

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

drivers/iommu/amd/iommu.c

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,15 +1591,7 @@ static void domain_flush_np_cache(struct protection_domain *domain,
15911591
/*
15921592
* This function flushes the DTEs for all devices in domain
15931593
*/
1594-
static void domain_flush_devices(struct protection_domain *domain)
1595-
{
1596-
struct iommu_dev_data *dev_data;
1597-
1598-
list_for_each_entry(dev_data, &domain->dev_list, list)
1599-
device_flush_dte(dev_data);
1600-
}
1601-
1602-
static void update_device_table(struct protection_domain *domain)
1594+
void amd_iommu_update_and_flush_device_table(struct protection_domain *domain)
16031595
{
16041596
struct iommu_dev_data *dev_data;
16051597

@@ -1609,12 +1601,10 @@ static void update_device_table(struct protection_domain *domain)
16091601
set_dte_entry(iommu, dev_data);
16101602
clone_aliases(iommu, dev_data->dev);
16111603
}
1612-
}
16131604

1614-
void amd_iommu_update_and_flush_device_table(struct protection_domain *domain)
1615-
{
1616-
update_device_table(domain);
1617-
domain_flush_devices(domain);
1605+
list_for_each_entry(dev_data, &domain->dev_list, list)
1606+
device_flush_dte(dev_data);
1607+
16181608
domain_flush_complete(domain);
16191609
}
16201610

0 commit comments

Comments
 (0)