iommu: Add generic_single_device_group()
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 22 Aug 2023 16:15:57 +0000 (13:15 -0300)
committerJoerg Roedel <jroedel@suse.de>
Mon, 25 Sep 2023 09:45:29 +0000 (11:45 +0200)
commite8f52d84cf0b6d1862ab62f7ed705f78690d11b2
tree5fba4306a231fc6d6a49f3f22aee870098d3085b
parente946f8e3e62bf05da21a14658f8cb05e2a616260
iommu: Add generic_single_device_group()

This implements the common pattern seen in drivers of a single iommu_group
for the entire iommu driver instance. Implement this in core code so the
drivers that want this can select it from their ops.

Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/2-v1-c869a95191f2+5e8-iommu_single_grp_jgg@nvidia.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h