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: <20250923094413.quvxrj2ru46qdjgb@lcpd911>
Date: Tue, 23 Sep 2025 15:14:13 +0530
From: Dhruva Gole <d-gole@...com>
To: Peng Fan <peng.fan@....com>
CC: "Rafael J. Wysocki" <rafael@...nel.org>, Pavel Machek <pavel@...nel.org>,
        Len Brown <lenb@...nel.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Danilo Krummrich <dakr@...nel.org>,
        Ulf Hansson <ulf.hansson@...aro.org>,
        Peter Chen <peter.chen@...nel.org>, Shawn Guo <shawnguo@...nel.org>,
        Sascha
 Hauer <s.hauer@...gutronix.de>,
        Pengutronix Kernel Team
	<kernel@...gutronix.de>,
        Fabio Estevam <festevam@...il.com>,
        Thinh Nguyen
	<Thinh.Nguyen@...opsys.com>, <linux-pm@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-usb@...r.kernel.org>,
        <imx@...ts.linux.dev>, <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH v4 2/5] PM: domains: Allow power-off for out-of-band
 wakeup-capable devices

On Sep 22, 2025 at 10:21:07 +0800, Peng Fan wrote:
> Currently, if a device is configured as a system wakeup source, the PM
> domain core avoids powering off its power domain during system-wide
> suspend. However, this can lead to unnecessary power consumption,
> especially for devices whose wakeup logic resides in an always-on domain,
> i.e., devices with out-of-band wakeup capability.
> 
> To address this, add a check for device_out_band_wakeup() in
> genpd_finish_suspend(). If the device supports out-of-band wakeup, its
> power domain can be safely powered off, just like regular devices without
> wakeup enabled. And same check in genpd_finish_resume().

Seems very well structured now! Thanks.

> 
> This change improves power efficiency without compromising wakeup
> functionality.

On a lighter note-
This seems like an AI generated sentence to me :P

I've often seen LLMs throw around terms like improve code / power
efficiency, etc...

> 
> Signed-off-by: Peng Fan <peng.fan@....com>
> ---
>  drivers/pmdomain/core.c | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pmdomain/core.c b/drivers/pmdomain/core.c
> index 61c2277c9ce39fcd2f7e77df549626e49a4d5310..4925bc1c441078a8d38600192ee696bf550e80f0 100644
> --- a/drivers/pmdomain/core.c
> +++ b/drivers/pmdomain/core.c
> @@ -1545,7 +1545,8 @@ static int genpd_finish_suspend(struct device *dev,
>  	if (ret)
>  		return ret;
>  
> -	if (device_awake_path(dev) && genpd_is_active_wakeup(genpd))
> +	if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) &&
> +	    !device_out_band_wakeup(dev))
>  		return 0;
>  
>  	if (genpd->dev_ops.stop && genpd->dev_ops.start &&
> @@ -1600,7 +1601,8 @@ static int genpd_finish_resume(struct device *dev,
>  	if (IS_ERR(genpd))
>  		return -EINVAL;
>  
> -	if (device_awake_path(dev) && genpd_is_active_wakeup(genpd))
> +	if (device_awake_path(dev) && genpd_is_active_wakeup(genpd) &&
> +	    !device_out_band_wakeup(dev))
>  		return resume_noirq(dev);

Reviewed-by: Dhruva Gole <d-gole@...com>

-- 
Best regards,
Dhruva Gole
Texas Instruments Incorporated

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ