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] [day] [month] [year] [list]
Message-ID: <CAPDyKFpFfhMTtAp63cjB2eVR78mbhBEzzSBr1Zxk-14YT448Lw@mail.gmail.com>
Date: Wed, 4 Feb 2026 12:40:01 +0100
From: Ulf Hansson <ulf.hansson@...aro.org>
To: Xu Yang <xu.yang_2@....com>
Cc: Frank.Li@....com, s.hauer@...gutronix.de, kernel@...gutronix.de, 
	festevam@...il.com, peng.fan@....com, jun.li@....com, 
	rafael.j.wysocki@...el.com, a.fatoum@...gutronix.de, ping.bai@....com, 
	shawnguo@...nel.org, l.stach@...gutronix.de, linux-pm@...r.kernel.org, 
	imx@...ts.linux.dev, linux-arm-kernel@...ts.infradead.org, 
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] pmdomain: imx8mp-blk-ctrl: set awake path for
 power_dev if attached device needs wakeup

On Wed, 4 Feb 2026 at 09:48, Xu Yang <xu.yang_2@....com> wrote:
>
> On Tue, Feb 03, 2026 at 12:06:28PM +0100, Ulf Hansson wrote:
> > On Mon, 2 Feb 2026 at 08:46, Xu Yang <xu.yang_2@....com> wrote:
> > > +
> > > +               list_for_each_entry(pdd, &domain->genpd.dev_list, list_node) {
> > > +                       if (device_awake_path(pdd->dev)) {
> > > +                               device_set_awake_path(domain->power_dev);
> > > +                               break;
> > > +                       }
> > > +               }
> >
> > This is really messy in my opinion. Ideally the above should not be
> > used by a genpd provider as it's internal data structures are managed
> > by genpd itself.
> >
> > If I understand correctly, this problem boils down to the fact that we
> > should have tried harder to model child/parent domains, rather than
> > using runtime PM to manage the parent domains. I understand there are
> > problems with that, due to specific power on/off sequences we have for
> > imx power-domains, but I wonder if those could be managed better by
> > using genpd on/off notifiers?
>
> Indeed. I have tried using subdomain will resolve the wakeup issue because
> the parent domain will manage the child domain. But I shouldn't use
> subdomain and runtime PM way together to avoid any unexpected behaviors
> according to my understanding.

Well, there is nothing wrong with using child/parent domain in
combination with runtime PM.

Although in general using runtime PM to manage parents domains from
child domains, should be better managed by genpd itself.

>
> >
> > Anyway, that said. Rather than walking through the list of devices as
> > above, I suggest that you use the ->power_off() callback for the
> > corresponding genpd(s) to dev in combination with a genpd power on/off
> > notifier for the corresponding genpd that the power_dev is attached
> > to.
> >
> > More precisely, if the "child domain(s)" that corresponds to "dev" has
> > not been powered-off (because device_awake_path() is set for some
> > device) during system suspend, the power-off notifier should return
> > NOTIFY_BAD to prevent the "parent domain" that corresponds to
> > power_dev from being powered-off.
> >
> > Would that work, you think?
>
> Thank you for the suggestion. It works for me.

Great!

>
> With this way the rejected count is increasing. Does this have any impact?
> The count is just used for statistics, right?

Yes, it's used for statistics.

>
> # cat /sys/kernel/debug/pm_genpd/usb-otg2/idle_states
> State          Time Spent(ms) Usage      Rejected   Above      Below
> S0             1203           0          1          0          0
>
> Thanks,
> Xu Yang

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ