]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitce6e945fedf92adf64eb149a974fb8af8fb9da52
tree307df724ba130b7613541c1fb8fc1035efb43980
parent2cb6a916fb6410435cf52a36767e5ea9222bf4aa
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