All of lore.kernel.org
 help / color / mirror / Atom feed
From: Francesco Valla <francesco@valla.it>
To: Chrispine Tinega <dev@chrispinetinega.com>
Cc: andersson@kernel.org, mathieu.poirier@linaro.org,
	 linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/2] remoteproc: k3: Report a remote crash to the remoteproc core
Date: Wed, 18 Nov 2026 17:57:10 +0100	[thread overview]
Message-ID: <av3YQ1tKSABEha9o@bywater> (raw)
In-Reply-To: <20261116184146.1897281-2-dev@chrispinetinega.com>

Hi Chrispine,

On Mon, Nov 16, 2026 at 09:41:44PM +0300, Chrispine Tinega wrote:
> A K3 remote core that faults can send RP_MBOX_CRASH over the mailbox,
> but k3_rproc_mbox_callback() only logs it. The remoteproc core never
> learns of the crash, so its recovery never runs, the crash is not
> counted, and the core stays halted with every rpmsg channel to it dead.
> 
> Call rproc_report_crash(), which may be called from atomic context. The
> core then moves to RPROC_CRASHED and the crash is counted. Where the
> driver leaves recovery enabled, recovery stops the core and boots it
> again. Where recovery is disabled, the core can still be stopped and
> started again through sysfs.
> 
> Recovery on its own cannot yet restart an R5F: the reset the R5F needs
> before it starts again is applied in its unprepare() op, which sysfs
> stop calls and recovery does not. The R5F driver keeps recovery
> disabled, so this does not change what happens there.
> 

Did you have the chance to take a look at the review sashiko did [1]?
I think the points about the leaks in IPC mode make sense and are worth
an investigation, both for the M4 and R5F cases. 

> Signed-off-by: Chrispine Tinega <dev@chrispinetinega.com>
> ---
> Changes in v2:
> - Drop the dev_err(). rproc_report_crash() already logs the crash
>   and names the core. (Francesco)
> - Say in the commit message that recovery cannot yet restart an R5F.
>   (Francesco)
> 
>  drivers/remoteproc/ti_k3_common.c | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_common.c
> index 4b6da3363..43a7a21fd 100644
> --- a/drivers/remoteproc/ti_k3_common.c
> +++ b/drivers/remoteproc/ti_k3_common.c
> @@ -60,11 +60,7 @@ void k3_rproc_mbox_callback(struct mbox_client *client, void *data)
>  
>  	switch (msg) {
>  	case RP_MBOX_CRASH:
> -		/*
> -		 * remoteproc detected an exception, but error recovery is not
> -		 * supported. So, just log this for now
> -		 */
> -		dev_err(dev, "K3 rproc %s crashed\n", rproc->name);
> +		rproc_report_crash(rproc, RPROC_FATAL_ERROR);
>  		break;
>  	case RP_MBOX_ECHO_REPLY:
>  		dev_info(dev, "received echo reply from %s\n", rproc->name);
> -- 
> 2.53.0
> 
> 

Regards,
Francesco

[1] https://sashiko.dev/#/patchset/20261116184146.1897281-1-dev%40chrispinetinega.com


  reply	other threads:[~2026-11-18 16:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-16 18:41 [PATCH v2 0/2] remoteproc: k3: Recover a crashed remote core Chrispine Tinega
2026-11-16 18:41 ` [PATCH v2 1/2] remoteproc: k3: Report a remote crash to the remoteproc core Chrispine Tinega
2026-11-18 16:57   ` Francesco Valla [this message]
2026-11-18 19:44     ` Chrispine Tinega
2026-11-22 13:57       ` Francesco Valla
2026-11-16 18:41 ` [PATCH v2 2/2] remoteproc: k3-m4: Enable crash recovery for a core Linux booted Chrispine Tinega

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=av3YQ1tKSABEha9o@bywater \
    --to=francesco@valla.it \
    --cc=andersson@kernel.org \
    --cc=dev@chrispinetinega.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.