[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1cc9acbd-1576-ab2b-c51f-d2ab70cb1a45@quicinc.com>
Date: Fri, 16 Sep 2022 14:17:59 +0530
From: Mukesh Ojha <quic_mojha@...cinc.com>
To: Maria Yu <quic_aiquny@...cinc.com>, <mathieu.poirier@...aro.org>
CC: <linux-remoteproc@...r.kernel.org>,
<linux-arm-msm@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<quic_clew@...cinc.com>
Subject: Re: [PATCH v4] remoteproc: core: do pm relax when in RPROC_OFFLINE
Hi,
On 9/16/2022 12:42 PM, Maria Yu wrote:
> RPROC_OFFLINE state indicate there is no recovery process
> is in progress and no chance to do the pm_relax.
> Because when recovering from crash, rproc->lock is held and
> state is RPROC_CRASHED -> RPROC_OFFLINE -> RPROC_RUNNING,
> and then unlock rproc->lock.
> When the state is in RPROC_OFFLINE it means separate request
> of rproc_stop was done and no need to hold the wakeup source
> in crash handler to recover any more.
>
> Signed-off-by: Maria Yu <quic_aiquny@...cinc.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index e5279ed9a8d7..6bc7b8b7d01e 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1956,6 +1956,17 @@ static void rproc_crash_handler_work(struct work_struct *work)
> if (rproc->state == RPROC_CRASHED || rproc->state == RPROC_OFFLINE) {
> /* handle only the first crash detected */
> mutex_unlock(&rproc->lock);
> + /*
> + * RPROC_OFFLINE state indicate there is no recovery process
> + * is in progress and no chance to have pm_relax in place.
> + * Because when recovering from crash, rproc->lock is held and
> + * state is RPROC_CRASHED -> RPROC_OFFLINE -> RPROC_RUNNING,
> + * and then unlock rproc->lock.
> + * RPROC_OFFLINE is only an intermediate state in recovery
> + * process.
> + */
> + if (rproc->state == RPROC_OFFLINE)
> + pm_relax(rproc->dev.parent);
LGTM.
Reviewed-by: Mukesh Ojha <quic_mojha@...cinc.com>
-Mukesh
> return;
> }
>
Powered by blists - more mailing lists