On Thu, Mar 26, 2026 at 12:42:59AM +0530, Mukesh Ojha wrote:
> DTB PAS context creation should be done only for subsystems that support
> a DTB firmware binary; otherwise, memory is wasted. Move the context
> creation to the appropriate location and, while at it, fix the place
> where the DTB PAS context was being released unconditionally.
Okay, if it wasn't obvious from the previous comment: split into two
patches.
>
> Fixes: b13d8baf5601 ("remoteproc: pas: Replace metadata context with PAS
> context structure")
Was the issue not present before this commit? Was the metadata correctly
freed?
> Signed-off-by: Mukesh Ojha <[email protected]>
> ---
> Changes in v2:
> https://lore.kernel.org/lkml/sxklpgc2rtr75maiu7lg4iukmaetvjyho7ytyyykmtdu2tov3k@gctoozxj7frl/
> - No change.
>
> drivers/remoteproc/qcom_q6v5_pas.c | 36 +++++++++++++++---------------
> 1 file changed, 18 insertions(+), 18 deletions(-)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c
> b/drivers/remoteproc/qcom_q6v5_pas.c
> index 46204da046fa..3bde37ac510c 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -250,7 +250,9 @@ static int qcom_pas_load(struct rproc *rproc, const
> struct firmware *fw)
> return 0;
>
> release_dtb_metadata:
> - qcom_scm_pas_metadata_release(pas->dtb_pas_ctx);
> + if (pas->dtb_pas_id)
> + qcom_scm_pas_metadata_release(pas->dtb_pas_ctx);
> +
> release_firmware(pas->dtb_firmware);
>
> return ret;
--
With best wishes
Dmitry