RE: [PATCH] pmdomain: core: Honour pd_ignore_unused in the sync_state power-off
From: Joshua Yeong
Date: Wed Sep 02 2026 - 02:09:34 EST
On Monday, August 31, 2026 3:26 PM, Geert Uytterhoeven wrote:
> -----Original Message-----
> From: Geert Uytterhoeven <geert@xxxxxxxxxxxxxx>
> Sent: Monday, August 31, 2026 3:27 PM
> To: Joshua Yeong <joshua.yeong@xxxxxxxxxxxxxxxx>
> Cc: Ulf Hansson <ulfh@xxxxxxxxxx>; Nicolas Frattaroli
> <nicolas.frattaroli@xxxxxxxxxxxxx>; Heiko Stuebner <heiko@xxxxxxxxx>; Hiago
> De Franco <hiago.franco@xxxxxxxxxxx>; Tomi Valkeinen
> <tomi.valkeinen@xxxxxxxxxxxxxxxx>; linux-pm@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH] pmdomain: core: Honour pd_ignore_unused in the
> sync_state power-off
>
> Hi Joshua,
>
> On Sat, 29 Aug 2026 at 21:51, Joshua Yeong
> <joshua.yeong@xxxxxxxxxxxxxxxx> wrote:
> > The pd_ignore_unused command line option is documented to "keep all
> > power-domains already enabled by bootloader on, even if no driver has
> > claimed them". On an OF platform it no longer does.
> >
> > Powering off unclaimed PM domains used to be the job of
> > genpd_power_off_unused(), which bails out on the option.
> > Commit 002ebddd695a ("pmdomain: core: Restore behaviour for disabling
> > unused PM domains") stopped that late_initcall_sync from clearing
> > stay_on, so it can no longer power off a PM domain that was found
> > powered-on at initialization. The only remaining path that clears
> > stay_on is ->sync_state(), and it never looked at the option, so an
> > unclaimed PM domain that the bootloader left on is powered off there
> > regardless.
> >
> > Honour the option in the sync_state paths, for the PM domains that
> > have no consumer attached. Those are the ones the option describes,
> > and once
> > genpd_power_off_unused() has bailed out they have no other power-off
> > trigger, so they stay on as documented.
> >
> > The stay_on constraint is dropped either way, leaving the lifetime of
> > the constraint unchanged. The PM domains that do have a consumer
> > attached therefore stay under the control of runtime PM, which the
> > option has never covered, and a PM domain that gains a consumer after
> > ->sync_state() is not left pinned.
> >
> > Fixes: 0e789b491ba0 ("pmdomain: core: Leave powered-on genpds on until
> > sync_state")
> > Signed-off-by: Joshua Yeong <joshua.yeong@xxxxxxxxxxxxxxxx>
>
> Thanks for your patch!
>
> I did something similar in "[PATCH/RFC] pmdomain: core: Support
> pd_ignore_unused with sync_state"[1], and Ulf responded[2]:
>
> "Right, I think it's time to consider removing it, unless people still
> find it useful ofcourse."
It is actually very useful and similarly to the parameter 'clk_ignore_unused' especially during product power on.
In RISC-V RPMI protocol case, the power domain is discovered dynamically. While it is true that final product
should have everything configured and mapped, the idea how having an 'unused' flag save time debugging
on the actual silicon.
Thanks
Joshua
>
> [1]
> https://lore.kernel.org/1cfa86b72b2a5aa2ade92f247dd318c9cb6ef2a1.177
> 1267504.git.geert+renesas@xxxxxxxxx
> [2]
> https://lore.kernel.org/CAPDyKFq2it5TAEBBKBh+q+UiRsGYaORar0Q_42LCuxy
> KRLYj0A@xxxxxxxxxxxxxx
>
> Gr{oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-
> m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
> -- Linus Torvalds