Skip to content

Commit

Permalink
iommu/sun50i: Remove IOMMU_DOMAIN_IDENTITY
Browse files Browse the repository at this point in the history
This driver treats IOMMU_DOMAIN_IDENTITY the same as UNMANAGED, which
cannot possibly be correct.

UNMANAGED domains are required to start out blocking all DMAs. This seems
to be what this driver does as it allocates a first level 'dt' for the IO
page table that is 0 filled.

Thus UNMANAGED looks like a working IO page table, and so IDENTITY must be
a mistake. Remove it.

Fixes: 4100b8c ("iommu: Add Allwinner H6 IOMMU driver")
Signed-off-by: Jason Gunthorpe <[email protected]>
Reviewed-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
jgunthorpe authored and joergroedel committed Dec 5, 2022
1 parent e563cc0 commit ef5bb8e
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/iommu/sun50i-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ static struct iommu_domain *sun50i_iommu_domain_alloc(unsigned type)
struct sun50i_iommu_domain *sun50i_domain;

if (type != IOMMU_DOMAIN_DMA &&
type != IOMMU_DOMAIN_IDENTITY &&
type != IOMMU_DOMAIN_UNMANAGED)
return NULL;

Expand Down

0 comments on commit ef5bb8e

Please sign in to comment.