OSDN Git Service

iommu: Move default domain allocation to iommu_probe_device()
authorJoerg Roedel <jroedel@suse.de>
Wed, 29 Apr 2020 13:36:46 +0000 (15:36 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 5 May 2020 12:36:12 +0000 (14:36 +0200)
commit6e1aa2049154d7462968c968b20f985859308267
tree307df724ba130b7613541c1fb8fc1035efb43980
parenta6a4c7e2c5b8b981d1c546a393ff21f2112468c3
iommu: Move default domain allocation to iommu_probe_device()

Well, not really. The call to iommu_alloc_default_domain() in
iommu_group_get_for_dev() has to stay around as long as there are
IOMMU drivers using the add/remove_device() call-backs instead of
probe/release_device().

Those drivers expect that iommu_group_get_for_dev() returns the device
attached to a group and the group set up with a default domain (and
the device attached to the groups current domain).

But when all drivers are converted this compatability mess can be
removed.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
Tested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Link: https://lore.kernel.org/r/20200429133712.31431-9-joro@8bytes.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c