]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/amd: Refactor amd_iommu_domain_enable_v2 to remove locking
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Thu, 25 Aug 2022 06:39:34 +0000 (06:39 +0000)
committerJoerg Roedel <jroedel@suse.de>
Wed, 7 Sep 2022 14:12:34 +0000 (16:12 +0200)
commit7feed59afc0b6271f55e7e5d43f5eb9018f4fea7
tree6cc508f9c120c8adb0231c42b8f7130d17aee829
parent9729b87c6b234433bc064361362ca137cb8ae48b
iommu/amd: Refactor amd_iommu_domain_enable_v2 to remove locking

The current function to enable IOMMU v2 also lock the domain.
In order to reuse the same code in different code path, in which
the domain has already been locked, refactor the function to separate
the locking from the enabling logic.

Co-developed-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Link: https://lore.kernel.org/r/20220825063939.8360-5-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/amd/iommu.c