Re: [PATCH 0/3] remoteproc: xlnx: remote crash recovery

From: Tanmay Shah

Date: Tue Nov 11 2025 - 11:47:32 EST




On 11/11/25 1:12 AM, Peng Fan wrote:
Hi Mathieu, Tanmay

Subject: Re: [PATCH 0/3] remoteproc: xlnx: remote crash recovery
....


So what is happening here - Peng, do you plan on providing more
debugging information? Tanmay - are you planning on sending a
second revision?


Sorry for delay. I gave a hack with below changes(at end) and it works.
The below change is just hack code to let me verify the rproc->power value.
The issue with current patchset is that after rproc_attach(),
the rproc->power will be 0. So recovery only works for the 1st time,
when it is triggered again, rproc_detach() will abort early in the if check:
if (!atomic_dec_and_test(&rproc->power)) {
ret = 0;
return ret;
}

---------------
diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
index a92c6cd6df67b..2b69304084d11 100644
--- a/drivers/remoteproc/remoteproc_core.c
+++ b/drivers/remoteproc/remoteproc_core.c
@@ -1786,7 +1786,9 @@ static int rproc_attach_recovery(struct rproc *rproc)
if (ret)
return ret;
- return rproc_attach(rproc);
+ ret = rproc_attach(rproc);
+ atomic_set(&rproc->power, 1);
+ return ret;
}

Thanks,
Peng.


Hi Peng,

This issue should be fixed after using rproc_boot instead of rproc_attach. rproc_boot makes sure that rproc_attach is atomic operation and it also increases power count as you mentioned above.

Thanks,
Tanmay

Thanks,
Peng


Thanks,
Tanmay

Thanks,
Peng