iommu: Introduce iommu_group_mutex_assert()
authorVasant Hegde <vasant.hegde@amd.com>
Mon, 5 Feb 2024 11:56:07 +0000 (11:56 +0000)
committerJoerg Roedel <jroedel@suse.de>
Fri, 9 Feb 2024 12:16:26 +0000 (13:16 +0100)
commitbf8aff2945ba4091f503df673b9df33002546e6a
treecbaeb7324c602f203e6696778b08d72cc0ba8021
parentb2e8a7f5d2c3d99285e13cdd330d339d9b040599
iommu: Introduce iommu_group_mutex_assert()

Add function to check iommu group mutex lock. So that device drivers can
rely on group mutex lock instead of adding another driver level lock
before modifying driver specific device data structure.

Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Vasant Hegde <vasant.hegde@amd.com>
Reviewed-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/20240205115615.6053-10-vasant.hegde@amd.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h