[PATCH v4 5/8] iommu/arm-smmu-v3: Refactor write_ctx_desc

Nicolin Chen nicolinc at nvidia.com
Fri Aug 4 13:22:24 PDT 2023


On Thu, Aug 03, 2023 at 12:32:33AM +0800, Michael Shavit wrote:

> -       ret = arm_smmu_write_ctx_desc(smmu_domain, mm->pasid, cd);
> -       if (ret)
> +       ret = arm_smmu_write_ctx_desc_devices(smmu_domain, mm->pasid, cd);
> +       if (ret) {
> +               arm_smmu_write_ctx_desc_devices(smmu_domain, mm->pasid, NULL);
>                 goto err_put_notifier;

There are a couple of places calling this helper but they don't
check the return code. Not sure if they should check too and do
a fallback like this: if so, this fallback can be squashed into
the helper; otherwise, this should be fine. Anyway, if there is
a need of change for those, it would need another patch I think.

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



More information about the linux-arm-kernel mailing list