lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <PAXPR04MB845941FFF347274012A0ECA88866A@PAXPR04MB8459.eurprd04.prod.outlook.com>
Date: Thu, 29 May 2025 03:54:47 +0000
From: Peng Fan <peng.fan@....com>
To: Hiago De Franco <hiagofranco@...il.com>, Ulf Hansson
	<ulf.hansson@...aro.org>
CC: "Peng Fan (OSS)" <peng.fan@....nxp.com>, Mathieu Poirier
	<mathieu.poirier@...aro.org>, "linux-pm@...r.kernel.org"
	<linux-pm@...r.kernel.org>, "linux-remoteproc@...r.kernel.org"
	<linux-remoteproc@...r.kernel.org>, Shawn Guo <shawnguo@...nel.org>, Sascha
 Hauer <s.hauer@...gutronix.de>, Bjorn Andersson <andersson@...nel.org>, Hiago
 De Franco <hiago.franco@...adex.com>, "imx@...ts.linux.dev"
	<imx@...ts.linux.dev>, "linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, Daniel Baluta <daniel.baluta@....com>,
	"Iuliana Prodan (OSS)" <iuliana.prodan@....nxp.com>, Fabio Estevam
	<festevam@...il.com>, Pengutronix Kernel Team <kernel@...gutronix.de>
Subject: RE: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode check for
 remote core attachment

> Subject: Re: [PATCH v2 3/3] remoteproc: imx_rproc: add power mode
> check for remote core attachment
> 
> On Tue, May 27, 2025 at 10:45:25AM -0300, Hiago De Franco wrote:
> 
> [...]
> 
> > >
> > > Thanks for the detailed analysis!
> > >
> > > This is a very similar issue as many other genpd providers are
> > > suffering from - and something that I have been working on
> recently
> > > to fix.
> > >
> > > A few days ago I posted a new version of a series [1], which is
> > > based upon using the fw_devlink and ->sync_state() support. In
> > > principle, we need to prevent genpd from power-off a PM domain if
> it
> > > was powered-on during boot , until all the consumer-drivers of a
> PM
> > > domain have been probed.
> > >
> > > I had a look at the DT description of how imx describes power-
> domain
> > > providers/consumers, along with the corresponding genpd provider
> > > implementation in drivers/pmdomain/imx/scu-pd.c. Unless I missed
> > > something, I think [1] should do the trick for you, without any
> > > further changes. Can you please give it a try and see if that solves
> > > this problem?
> >
> > Cool! I can give a try and provide an answer soon. Thanks!
> 
> We are making progress ;-)
> 
> With the patches you shared Ulf (I added them on top of the current
> master branch), it works as expected, dev_pm_genpd_is_on() returns 0
> when I boot the kernel without M4 running and it returns 1 when I
> boot the kernel with M4 running with a hello-world demo.
> 
> However now I tried to, if dev_pm_genpd_is_on() returns 1, put the
> DETACHED state, something as
> 
> if (dev_pm_genpd_is_on(priv->pd_list->pd_devs[0]))
> 	priv->rproc->state = RPROC_DETACHED;
> 
> In this case I used 0 because I understand this is the
> IMX_SC_R_M4_0_PID0 defined in my device tree overlay:
> 
> 		power-domains = <&pd IMX_SC_R_M4_0_PID0>,
> 				<&pd IMX_SC_R_M4_0_MU_1A>;
> 
> But in this case, the kernel does not boot anymore, I see the "Starting
> kernel..." and nothing else.

Please add "earlycon" in bootargs to see where it hangs.

> 
> I am using the pm_runtime functions before rproc_add():
> 
> @@ -1146,6 +1154,9 @@ static int imx_rproc_probe(struct
> platform_device *pdev)
>                 }
>         }
> 
> +       pm_runtime_enable(dev);
> +       pm_runtime_get_sync(dev);

I think only make this apply for i.MX8QX/8QM/DX, then no
impact to other patforms.

Regards,
Peng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ