lkml.org 
[lkml]   [2022]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v1] remoteproc: core: do pm relax when not first crash
Hi Maria,

On Fri, Sep 09, 2022 at 04:33:33PM +0800, Maria Yu wrote:
> Even if it is not first crash, need to relax the pm
> wakelock otherwise the device will stay awake.
>

The goal is exactly to keep the device awake...

> Signed-off-by: Maria Yu <quic_aiquny@quicinc.com>
> ---
> drivers/remoteproc/remoteproc_core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c b/drivers/remoteproc/remoteproc_core.c
> index e5279ed9a8d7..30078043e939 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -1956,6 +1956,7 @@ 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);
> + pm_relax(rproc->dev.parent);

If we are here it means that rproc_crash_handler_work() has already been called
_and_ that a recovery is in process. When the first crash handler completes
pm_relax() will be called and the device will go to sleep as expected.

Thanks,
Mathieu

> return;
> }
>
> --
> 2.7.4
>

\
 
 \ /
  Last update: 2022-09-09 21:24    [W:0.811 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site