On 05/04/2018 11:22 AM, Sebastian Andrzej Siewior wrote:
From: Anna-Maria Gleixner <[email protected]>

When device is already attached to a domain, there is no need to execute
the domain_flush_tlb_pde(). Therefore move the check if the domain is set
into attach_device().

Signed-off-by: Anna-Maria Gleixner <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
---
  drivers/iommu/amd_iommu.c | 32 ++++++++++----------------------
  1 file changed, 10 insertions(+), 22 deletions(-)

diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c
index f66a5d0b7c62..a801678ae1b4 100644
--- a/drivers/iommu/amd_iommu.c
+++ b/drivers/iommu/amd_iommu.c
@@ -1878,8 +1878,11 @@ static void clear_dte_entry(u16 devid)
        amd_iommu_apply_erratum_63(devid);
  }
-static void do_attach(struct iommu_dev_data *dev_data,
-                     struct protection_domain *domain)
+/*
+ * This function does assigns the device visible for the hardware
+ */

<grammar cop>

The prior version of this comment appears 3 times in the file, and is grammatically problematic every time. Can we simplify it to say

 * This function makes the device visible in the domain

Or some such? I.e. tidy up the two remaining comments?

</grammar cop>


_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu

Reply via email to