Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Mukesh Ojha <quic_mojha@quicinc.com>
To: Elliot Berman <quic_eberman@quicinc.com>
Cc: <andersson@kernel.org>, <konrad.dybcio@linaro.org>,
	<linux-arm-msm@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH ] firmware: qcom: scm: Disable SDI and write no dump to download mode register
Date: Mon, 8 Jul 2024 18:21:30 +0530	[thread overview]
Message-ID: <ZovgiDPZBOpXdxOp@hu-mojha-hyd.qualcomm.com> (raw)
In-Reply-To: <20240705113813958-0700.eberman@hu-eberman-lv.qualcomm.com>

On Fri, Jul 05, 2024 at 11:55:52AM -0700, Elliot Berman wrote:
> On Fri, Jul 05, 2024 at 05:36:23PM +0530, Mukesh Ojha wrote:
> > SDI is enabled for most of the Qualcomm SoCs and as per commit
> > ff4aa3bc9825 ("firmware: qcom_scm: disable SDI if required")
> > it was recommended to disable SDI by mentioning it in device tree
> > 
> > However, for some cases download mode tcsr register already configured
> > from boot firmware to collect dumps and in such cases if download
> > mode is set to zero(nodump mode) from kernel side and SDI is disabled
>                      ^^^^^^^^^^^^^
> that's not what download_mode=0 does currently, but it's what you're
> proposing it should be doing. I think that proposal is reasonable, but
> can you call out in the commit text that the current behavior of
> download_mode=0 is nop.

Correct..

> 
> > via means of mentioning it in device tree we could end up with dump
> > collection.
> > 
> > To disable complete dump collection mode, SDI and dload mode register
> > need to be set no dump mode.
> > 
> > Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
> 
> Should this be?
> 
> Fixes: ff4aa3bc9825 ("firmware: qcom_scm: disable SDI if required")

Yes, SDI disablement can still result in dump collection and can cause
a hang.

> 
> > ---
> >  drivers/firmware/qcom/qcom_scm.c | 6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> > 
> > diff --git a/drivers/firmware/qcom/qcom_scm.c b/drivers/firmware/qcom/qcom_scm.c
> > index 00c379a3cceb..2e10f75a9cfd 100644
> > --- a/drivers/firmware/qcom/qcom_scm.c
> > +++ b/drivers/firmware/qcom/qcom_scm.c
> > @@ -1954,14 +1954,12 @@ static int qcom_scm_probe(struct platform_device *pdev)
> >  	 * will cause the boot stages to enter download mode, unless
> >  	 * disabled below by a clean shutdown/reboot.
> >  	 */
> > -	if (download_mode)
> > -		qcom_scm_set_download_mode(true);
> > -
> > +	qcom_scm_set_download_mode(download_mode ? true : false);
> 
> Just: qcom_scm_set_download_mode(download_mode);

Sure.

-Mukesh

      reply	other threads:[~2024-07-08 12:51 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-05 12:06 [PATCH ] firmware: qcom: scm: Disable SDI and write no dump to download mode register Mukesh Ojha
2024-07-05 18:55 ` Elliot Berman
2024-07-08 12:51   ` Mukesh Ojha [this message]

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=ZovgiDPZBOpXdxOp@hu-mojha-hyd.qualcomm.com \
    --to=quic_mojha@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_eberman@quicinc.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