mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "TingHan Shen (沈廷翰)" <TingHan.Shen@mediatek.com>
To: "mathieu.poirier@linaro.org" <mathieu.poirier@linaro.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"linux-remoteproc@vger.kernel.org"
	<linux-remoteproc@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-mediatek@lists.infradead.org" 
	<linux-mediatek@lists.infradead.org>,
	"conor+dt@kernel.org" <conor+dt@kernel.org>,
	Project_Global_Chrome_Upstream_Group 
	<Project_Global_Chrome_Upstream_Group@mediatek.com>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"krzysztof.kozlowski+dt@linaro.org" 
	<krzysztof.kozlowski+dt@linaro.org>,
	"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>,
	"andersson@kernel.org" <andersson@kernel.org>,
	"angelogioacchino.delregno@collabora.com" 
	<angelogioacchino.delregno@collabora.com>
Subject: Re: [PATCH v14 10/12] remoteproc: mediatek: Report watchdog crash to all cores
Date: Thu, 13 Jul 2023 08:01:10 +0000	[thread overview]
Message-ID: <315df6fe5006cab529f776500e0474bd1d5bc7ff.camel@mediatek.com> (raw)
In-Reply-To: <ZK8BJOXcBjjLXUlu@p14s>

Hi Mathieu,

On Wed, 2023-07-12 at 13:38 -0600, Mathieu Poirier wrote:
> On Fri, Jul 07, 2023 at 01:26:10PM +0800, Tinghan Shen wrote:
> > Once the SCP watchdog timeout happened, trigger the rproc recovery flow on
> > all cores.
> > 
> 
> You are missing the most important part... "Why" is this needed?  Without it I
> don't know what is going on and can't review your work.

Sorry, I'll improve the commit message.

I think that the SCP should have the same behavior as an SMP system. In the event
of a watchdog timeout occuring on any of the cores, the entire SCP should be recovered.


> 
> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > ---
> >  drivers/remoteproc/mtk_scp.c | 8 +++++++-
> >  1 file changed, 7 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/remoteproc/mtk_scp.c b/drivers/remoteproc/mtk_scp.c
> > index 9fed5161f094..7e786aaf04e1 100644
> > --- a/drivers/remoteproc/mtk_scp.c
> > +++ b/drivers/remoteproc/mtk_scp.c
> > @@ -80,8 +80,14 @@ EXPORT_SYMBOL_GPL(scp_put);
> >  
> >  static void scp_wdt_handler(struct mtk_scp *scp, u32 scp_to_host)
> >  {
> > +	struct mtk_scp_of_cluster *scp_cluster = platform_get_drvdata(scp->cluster_pdev);
> > +	struct mtk_scp *scp_node;
> > +
> >  	dev_err(scp->dev, "SCP watchdog timeout! 0x%x", scp_to_host);
> > -	rproc_report_crash(scp->rproc, RPROC_WATCHDOG);
> > +
> > +	/* report watchdog timeout to all cores */
> > +	list_for_each_entry(scp_node, &scp_cluster->mtk_scp_list, elem)
> > +		rproc_report_crash(scp_node->rproc, RPROC_WATCHDOG);
> >  }
> >  
> >  static void scp_init_ipi_handler(void *data, unsigned int len, void *priv)
> > -- 
> > 2.18.0

-- 
Best regards,
TingHan

  reply	other threads:[~2023-07-13  8:04 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-07  5:26 [PATCH v14 00/12] Add support for MT8195 SCP 2nd core Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 01/12] dt-bindings: remoteproc: mediatek: Improve the rpmsg subnode definition Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 02/12] arm64: dts: mediatek: Update the node name of SCP rpmsg subnode Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 03/12] dt-bindings: remoteproc: mediatek: Support MT8195 dual-core SCP Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 04/12] remoteproc: mediatek: Add MT8195 SCP core 1 operations Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 05/12] remoteproc: mediatek: Introduce cluster on single-core SCP Tinghan Shen
2023-07-12 20:40   ` Mathieu Poirier
2023-07-07  5:26 ` [PATCH v14 06/12] remoteproc: mediatek: Probe multi-core SCP Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 07/12] remoteproc: mediatek: Remove dependency of MT8195 SCP L2TCM power control on dual-core SCP Tinghan Shen
2023-07-11 17:50   ` Mathieu Poirier
2023-07-11 18:00     ` Mathieu Poirier
2023-07-13  7:34     ` TingHan Shen (沈廷翰)
2023-07-07  5:26 ` [PATCH v14 08/12] remoteproc: mediatek: Setup MT8195 SCP core 1 SRAM offset Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 09/12] remoteproc: mediatek: Handle MT8195 SCP core 1 watchdog timeout Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 10/12] remoteproc: mediatek: Report watchdog crash to all cores Tinghan Shen
2023-07-12 19:38   ` Mathieu Poirier
2023-07-13  8:01     ` TingHan Shen (沈廷翰) [this message]
2023-07-07  5:26 ` [PATCH v14 11/12] remoteproc: mediatek: Refine ipi handler error message Tinghan Shen
2023-07-07  5:26 ` [PATCH v14 12/12] arm64: dts: mediatek: mt8195: Add SCP 2nd core Tinghan Shen

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=315df6fe5006cab529f776500e0474bd1d5bc7ff.camel@mediatek.com \
    --to=tinghan.shen@mediatek.com \
    --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \
    --cc=andersson@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=matthias.bgg@gmail.com \
    --cc=robh+dt@kernel.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 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®