[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AM6PR04MB4966F8E07B105EDCAF3CB40680D30@AM6PR04MB4966.eurprd04.prod.outlook.com>
Date: Thu, 23 Apr 2020 10:06:54 +0000
From: Aisheng Dong <aisheng.dong@....com>
To: Peng Fan <peng.fan@....com>,
"shawnguo@...nel.org" <shawnguo@...nel.org>,
"s.hauer@...gutronix.de" <s.hauer@...gutronix.de>
CC: "kernel@...gutronix.de" <kernel@...gutronix.de>,
"festevam@...il.com" <festevam@...il.com>,
"linux@...pel-privat.de" <linux@...pel-privat.de>,
Leonard Crestez <leonard.crestez@....com>,
Daniel Baluta <daniel.baluta@....com>,
Joakim Zhang <qiangqing.zhang@....com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
dl-linux-imx <linux-imx@....com>
Subject: RE: [PATCH 3/4] firmware: imx: scu-pd: ignore power domain not owned
> From: Peng Fan <peng.fan@....com>
> Sent: Thursday, April 23, 2020 3:00 PM
>
> Should not register power domain that not owned by current partition.
>
> Reviewed-by: Leonard Crestez <leonard.crestez@....com>
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
> drivers/firmware/imx/scu-pd.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/firmware/imx/scu-pd.c b/drivers/firmware/imx/scu-pd.c
> index d1b313fa7b96..7b43bd63cc1e 100644
> --- a/drivers/firmware/imx/scu-pd.c
> +++ b/drivers/firmware/imx/scu-pd.c
> @@ -46,6 +46,7 @@
>
> #include <dt-bindings/firmware/imx/rsrc.h> #include
> <linux/firmware/imx/sci.h>
> +#include <linux/firmware/imx/svc/rm.h>
> #include <linux/io.h>
> #include <linux/module.h>
> #include <linux/of.h>
> @@ -246,6 +247,9 @@ imx_scu_add_pm_domain(struct device *dev, int idx,
> struct imx_sc_pm_domain *sc_pd;
> int ret;
>
> + if (!imx_sc_rm_is_resource_owned(pm_ipc_handle, pd_ranges->rsrc + idx))
> + return NULL;
> +
Same question.
See my comment on patch 2/4.
Regards
Aisheng
> sc_pd = devm_kzalloc(dev, sizeof(*sc_pd), GFP_KERNEL);
> if (!sc_pd)
> return ERR_PTR(-ENOMEM);
> --
> 2.16.4
Powered by blists - more mailing lists