]> git.baikalelectronics.ru Git - kernel.git/commit
iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()
authorJoerg Roedel <jroedel@suse.de>
Wed, 29 Apr 2020 13:36:50 +0000 (15:36 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 5 May 2020 12:36:13 +0000 (14:36 +0200)
commit0141dc4896e0eec945a35f697b54a96ad0445604
treea51e2a432938bb3565ec4f75a2348002a818221f
parent0079d9136fed59d3634a63be08810a2f06bbb1b1
iommu: Move iommu_group_create_direct_mappings() out of iommu_group_add_device()

After the previous changes the iommu group may not have a default
domain when iommu_group_add_device() is called. With no default domain
iommu_group_create_direct_mappings() will do nothing and no direct
mappings will be created.

Rename iommu_group_create_direct_mappings() to
iommu_create_device_direct_mappings() to better reflect that the
function creates direct mappings only for one device and not for all
devices in the group. Then move the call to the places where a default
domain actually exists.

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-13-joro@8bytes.org
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/iommu.c