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

Michael Shavit mshavit at google.com
Mon Aug 7 05:26:34 PDT 2023


On Sat, Aug 5, 2023 at 4:22 AM Nicolin Chen <nicolinc at nvidia.com> wrote:
>
> 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.

Yeah noticed that too; I think those other calls are technically OK
because the call can't fail when writing to a CD entry that was
previously written (it can only fail on allocation of a leaf table).
It's also not obvious how those callers could gracefully handle this.
I'd prefer keeping this commit as close to the existing behavior as
possible.



More information about the linux-arm-kernel mailing list