From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Cc: linux-remoteproc@vger.kernel.org, ohad@wizery.com,
linux-kernel@vger.kernel.org, tsoni@codeaurora.org,
psodagud@codeaurora.org, sidgup@codeaurora.org
Subject: Re: [PATCH] remoteproc: core: Prevent system suspend during remoteproc recovery
Date: Tue, 12 May 2020 12:12:30 -0700 [thread overview]
Message-ID: <20200512191230.GB16107@builder.lan> (raw)
In-Reply-To: <1588183482-21146-1-git-send-email-rishabhb@codeaurora.org>
On Wed 29 Apr 11:04 PDT 2020, Rishabh Bhatnagar wrote:
> The system might go into suspend during recovery of any remoteproc.
> This will interrupt the recovery process in between increasing the
> recovery time. Make the platform device as wakeup capable and
> use pm_stay_wake/pm_relax APIs to avoid system from going into
> suspend during recovery.
>
> Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
> Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
> ---
Please don't forget to add a version to $subject and provide a Changelog
here next time you're respinning something.
I've picked this up now.
Thanks,
Bjorn
> drivers/remoteproc/qcom_q6v5_pas.c | 2 ++
> drivers/remoteproc/remoteproc_core.c | 5 +++++
> 2 files changed, 7 insertions(+)
>
> diff --git a/drivers/remoteproc/qcom_q6v5_pas.c b/drivers/remoteproc/qcom_q6v5_pas.c
> index edf9d0e..e608578 100644
> --- a/drivers/remoteproc/qcom_q6v5_pas.c
> +++ b/drivers/remoteproc/qcom_q6v5_pas.c
> @@ -398,6 +398,8 @@ static int adsp_probe(struct platform_device *pdev)
> adsp->has_aggre2_clk = desc->has_aggre2_clk;
> platform_set_drvdata(pdev, adsp);
>
> + device_wakeup_enable(adsp->dev);
> +
> ret = adsp_alloc_memory_region(adsp);
> if (ret)
> goto free_rproc;
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index 097f33e..6a1cb98 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1712,6 +1712,8 @@ static void rproc_crash_handler_work(struct work_struct *work)
>
> if (!rproc->recovery_disabled)
> rproc_trigger_recovery(rproc);
> +
> + pm_relax(rproc->dev.parent);
> }
>
> /**
> @@ -2208,6 +2210,9 @@ void rproc_report_crash(struct rproc *rproc, enum rproc_crash_type type)
> return;
> }
>
> + /* Prevent suspend while the remoteproc is being recovered */
> + pm_stay_awake(rproc->dev.parent);
> +
> dev_err(&rproc->dev, "crash detected in %s: type %s\n",
> rproc->name, rproc_crash_to_string(type));
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2020-05-12 19:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 18:04 [PATCH] remoteproc: core: Prevent system suspend during remoteproc recovery Rishabh Bhatnagar
2020-05-12 19:12 ` Bjorn Andersson [this message]
2020-05-13 6:20 ` patchwork-bot+linux-remoteproc
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=20200512191230.GB16107@builder.lan \
--to=bjorn.andersson@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-remoteproc@vger.kernel.org \
--cc=ohad@wizery.com \
--cc=psodagud@codeaurora.org \
--cc=rishabhb@codeaurora.org \
--cc=sidgup@codeaurora.org \
--cc=tsoni@codeaurora.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.