]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
iommu: Allow taking a reference on a group directly
authorRobin Murphy <robin.murphy@arm.com>
Fri, 11 Nov 2016 17:59:21 +0000 (17:59 +0000)
committerJoerg Roedel <jroedel@suse.de>
Tue, 15 Nov 2016 11:25:33 +0000 (12:25 +0100)
commit13f59a78c6d69a9bf4c8989dd5f3396f54a2fe41
tree6faca25c8154692b8d0b564522cb0834e3c7e8ad
parent60c4e804ff7f8ab5f9909bec36065f7e598eabcf
iommu: Allow taking a reference on a group directly

iommu_group_get_for_dev() expects that the IOMMU driver's device_group
callback return a group with a reference held for the given device.
Whilst allocating a new group is fine, and pci_device_group() correctly
handles reusing an existing group, there is no general means for IOMMU
drivers doing their own group lookup to take additional references on an
existing group pointer without having to also store device pointers or
resort to elaborate trickery.

Add an IOMMU-driver-specific function to fill the hole.

Acked-by: Sricharan R <sricharan@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c
include/linux/iommu.h