iommu/arm-smmu: Convert to a global static identity domain
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 17 Oct 2023 18:11:41 +0000 (15:11 -0300)
committerWill Deacon <will@kernel.org>
Wed, 13 Dec 2023 13:01:12 +0000 (13:01 +0000)
commit22bb7b41476a1b8dc282dc5b3ca5470090b52e46
tree48485560649b57eefd1d2be873b63d4d9e5430a7
parentff0f802974136c7f4c576da227565dc27cc1c69d
iommu/arm-smmu: Convert to a global static identity domain

Create a global static identity domain with it's own
arm_smmu_attach_dev_identity() that simply calls
arm_smmu_master_install_s2crs() with the identity parameters.

This is done by giving the attach path for identity its own unique
implementation that simply calls arm_smmu_master_install_s2crs().

Remove ARM_SMMU_DOMAIN_BYPASS and all checks of IOMMU_DOMAIN_IDENTITY.

Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Link: https://lore.kernel.org/r/2-v2-c86cc8c2230e+160bb-smmu_newapi_jgg@nvidia.com
[will: Move duplicated autosuspend logic into a helper function]
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu/arm-smmu.c
drivers/iommu/arm/arm-smmu/arm-smmu.h