mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tanmay Shah <tanmay.shah@amd.com>
To: Peng Fan <peng.fan@nxp.com>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	"Peng Fan (OSS)" <peng.fan@oss.nxp.com>
Cc: "andersson@kernel.org" <andersson@kernel.org>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] remoteproc: xlnx: remote crash recovery
Date: Tue, 11 Nov 2025 10:47:25 -0600	[thread overview]
Message-ID: <1698d1f9-440c-41e1-86ab-a8b09f4ddd59@amd.com> (raw)
In-Reply-To: <PAXPR04MB8459029D7DCF4A6D2DDCB54288CFA@PAXPR04MB8459.eurprd04.prod.outlook.com>



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
>>>>>
>>>>
> 


  reply	other threads:[~2025-11-11 16:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28  4:57 Tanmay Shah
2025-10-28  4:57 ` [PATCH 1/3] remoteproc: xlnx: enable boot recovery Tanmay Shah
2025-10-28  4:57 ` [PATCH 2/3] remoteproc: core: full attach detach during recovery Tanmay Shah
2025-10-29 22:49   ` Iuliana Prodan
2025-10-29 23:41     ` Tanmay Shah
2025-11-02  8:54   ` Zhongqiu Han
2025-11-03 17:22     ` Tanmay Shah
2025-10-28  4:57 ` [PATCH 3/3] remoteproc: xlnx: add crash detection mechanism Tanmay Shah
2025-10-29  3:24 ` [PATCH 0/3] remoteproc: xlnx: remote crash recovery Peng Fan
2025-10-29  4:15   ` Tanmay Shah
2025-10-29 23:51     ` Tanmay Shah
2025-10-30  4:21       ` Peng Fan
2025-11-10 18:03         ` Mathieu Poirier
2025-11-10 18:39           ` Tanmay Shah
2025-11-11  7:12           ` Peng Fan
2025-11-11 16:47             ` Tanmay Shah [this message]
2025-11-13 15:44 Tanmay Shah

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1698d1f9-440c-41e1-86ab-a8b09f4ddd59@amd.com \
    --to=tanmay.shah@amd.com \
    --cc=andersson@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=peng.fan@nxp.com \
    --cc=peng.fan@oss.nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®