[PATCH] iommu/arm-smmu-v3: Simplify stage selection logic

Nicolin Chen nicolinc at nvidia.com
Thu Aug 17 09:21:07 PDT 2023


On Fri, Aug 18, 2023 at 12:03:30AM +0800, Michael Shavit wrote:

> It is invalid for an arm-smmu-v3 to have neither FEAT_TRANS_S1 nor
> FEAT_TRANS_S2 bits set, and this is even checked in the probe.
> 
> Only set ARM_SMMU_DOMAIN_S2 if FEAT_TRANS_S1 isn't supported, otherwise set
> ARM_SMMU_DOMAIN_S1. This is clearer as the existing code implies that
> something more sophisticated is going on with the stage selection logic.
> 
> Signed-off-by: Michael Shavit <mshavit at google.com>

Reviewed-by: Nicolin Chen <nicolinc at nvidia.com>



More information about the linux-arm-kernel mailing list