[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <DB6PR0402MB276025A8C537BC126725389588020@DB6PR0402MB2760.eurprd04.prod.outlook.com>
Date: Thu, 15 Oct 2020 01:29:49 +0000
From: Peng Fan <peng.fan@....com>
To: Mathieu Poirier <mathieu.poirier@...aro.org>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
"ohad@...ery.com" <ohad@...ery.com>
CC: "linux-remoteproc@...r.kernel.org" <linux-remoteproc@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH 02/13] remoteproc: Remove useless check in rproc_del()
> Subject: [PATCH 02/13] remoteproc: Remove useless check in rproc_del()
>
> Whether started at probe() time or thereafter from the command line, a
> remote processor needs to be shutdown before the final cleanup phases can
> happen. Otherwise the system may be left in an unpredictable state where
> the remote processor is expecting the remoteproc core to be providing
> services when in fact it no longer exist.
>
> Invariably calling rproc_shutdown() is fine since it will return immediately if
> the remote processor has already been switched off.
>
> Signed-off-by: Mathieu Poirier <mathieu.poirier@...aro.org>
> ---
> drivers/remoteproc/remoteproc_core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/remoteproc/remoteproc_core.c
> b/drivers/remoteproc/remoteproc_core.c
> index fb2632cbd2df..7d78c9a9d88f 100644
> --- a/drivers/remoteproc/remoteproc_core.c
> +++ b/drivers/remoteproc/remoteproc_core.c
> @@ -2260,10 +2260,8 @@ int rproc_del(struct rproc *rproc)
> if (!rproc)
> return -EINVAL;
>
> - /* if rproc is marked always-on, rproc_add() booted it */
> /* TODO: make sure this works with rproc->power > 1 */
> - if (rproc->auto_boot)
> - rproc_shutdown(rproc);
> + rproc_shutdown(rproc);
>
> mutex_lock(&rproc->lock);
> rproc->state = RPROC_DELETED;
> --
Reviewed-by: Peng Fan <peng.fan@....com>
Powered by blists - more mailing lists