diff options
| author | Jason Gunthorpe <[email protected]> | 2023-09-13 13:43:55 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2023-09-25 09:41:03 +0000 |
| commit | 4601cd2d7c4c82c4bafc822e1ff630a709eff206 (patch) | |
| tree | 39ebfc3cdac50fadcfb5a486cd25c55fe37369a4 /tools/testing/selftests/bpf/prog_tests/autoload.c | |
| parent | iommu: Add __iommu_group_domain_alloc() (diff) | |
| download | kernel-4601cd2d7c4c82c4bafc822e1ff630a709eff206.tar.gz kernel-4601cd2d7c4c82c4bafc822e1ff630a709eff206.zip | |
iommu: Add ops->domain_alloc_paging()
This callback requests the driver to create only a __IOMMU_DOMAIN_PAGING
domain, so it saves a few lines in a lot of drivers needlessly checking
the type.
More critically, this allows us to sweep out all the
IOMMU_DOMAIN_UNMANAGED and IOMMU_DOMAIN_DMA checks from a lot of the
drivers, simplifying what is going on in the code and ultimately removing
the now-unused special cases in drivers where they did not support
IOMMU_DOMAIN_DMA.
domain_alloc_paging() should return a struct iommu_domain that is
functionally compatible with ARM_DMA_USE_IOMMU, dma-iommu.c and iommufd.
Be forwards looking and pass in a 'struct device *' argument. We can
provide this when allocating the default_domain. No drivers will look at
this.
Tested-by: Steven Price <[email protected]>
Tested-by: Marek Szyprowski <[email protected]>
Tested-by: Nicolin Chen <[email protected]>
Reviewed-by: Lu Baolu <[email protected]>
Reviewed-by: Jerry Snitselaar <[email protected]>
Signed-off-by: Jason Gunthorpe <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/autoload.c')
0 files changed, 0 insertions, 0 deletions
