iommu/arm-smmu-v3: Remove ARM_SMMU_DOMAIN_NESTED
authorJason Gunthorpe <jgg@nvidia.com>
Tue, 5 Dec 2023 19:14:35 +0000 (15:14 -0400)
committerWill Deacon <will@kernel.org>
Wed, 13 Dec 2023 12:32:19 +0000 (12:32 +0000)
Currently this is exactly the same as ARM_SMMU_DOMAIN_S2, so just remove
it. The ongoing work to add nesting support through iommufd will do
something a little different.

Reviewed-by: Moritz Fischer <mdf@kernel.org>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Nicolin Chen <nicolinc@nvidia.com>
Tested-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com>
Tested-by: Nicolin Chen <nicolinc@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Signed-off-by: Will Deacon <will@kernel.org>
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.c
drivers/iommu/arm/arm-smmu-v3/arm-smmu-v3.h

index 46b2555b7c5af5399a1c20ce538ee62bdcfafeb2..5387c90b329308daf6309c3cbf2417fe7502d9f4 100644 (file)
@@ -1289,7 +1289,6 @@ static void arm_smmu_write_strtab_ent(struct arm_smmu_master *master, u32 sid,
                        cd_table = &master->cd_table;
                        break;
                case ARM_SMMU_DOMAIN_S2:
-               case ARM_SMMU_DOMAIN_NESTED:
                        s2_cfg = &smmu_domain->s2_cfg;
                        break;
                default:
@@ -2170,7 +2169,6 @@ static int arm_smmu_domain_finalise(struct iommu_domain *domain)
                fmt = ARM_64_LPAE_S1;
                finalise_stage_fn = arm_smmu_domain_finalise_s1;
                break;
-       case ARM_SMMU_DOMAIN_NESTED:
        case ARM_SMMU_DOMAIN_S2:
                ias = smmu->ias;
                oas = smmu->oas;
@@ -2739,7 +2737,7 @@ static int arm_smmu_enable_nesting(struct iommu_domain *domain)
        if (smmu_domain->smmu)
                ret = -EPERM;
        else
-               smmu_domain->stage = ARM_SMMU_DOMAIN_NESTED;
+               smmu_domain->stage = ARM_SMMU_DOMAIN_S2;
        mutex_unlock(&smmu_domain->init_mutex);
 
        return ret;
index 03f9e526cbd92fa5fbaef83684cf0e262a926e6c..27ddf1acd12cea15f2edb62e1570c4d9fc44a42a 100644 (file)
@@ -715,7 +715,6 @@ struct arm_smmu_master {
 enum arm_smmu_domain_stage {
        ARM_SMMU_DOMAIN_S1 = 0,
        ARM_SMMU_DOMAIN_S2,
-       ARM_SMMU_DOMAIN_NESTED,
        ARM_SMMU_DOMAIN_BYPASS,
 };