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: <20230104104718.ppvvly4jpuufmknf@vireshk-i7>
Date:   Wed, 4 Jan 2023 16:17:18 +0530
From:   Viresh Kumar <viresh.kumar@...aro.org>
To:     Hector Martin <marcan@...can.st>
Cc:     "Rafael J. Wysocki" <rafael@...nel.org>,
        Sven Peter <sven@...npeter.dev>,
        Alyssa Rosenzweig <alyssa@...enzweig.io>,
        Marc Zyngier <maz@...nel.org>, asahi@...ts.linux.dev,
        linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] cpufreq: apple-soc: Switch to the lowest frequency on
 suspend

On 04-01-23, 19:21, Hector Martin wrote:
> Without this, the CPUs are left in a random pstate. Since we don't
> support deep idle yet (which powers down the CPUs), this results in
> significantly increased idle power consumption in suspend.
> 
> Fixes: 6286bbb40576 ("cpufreq: apple-soc: Add new driver to control Apple SoC CPU P-states")
> Signed-off-by: Hector Martin <marcan@...can.st>
> ---
>  drivers/cpufreq/apple-soc-cpufreq.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/cpufreq/apple-soc-cpufreq.c b/drivers/cpufreq/apple-soc-cpufreq.c
> index d1801281cdd9..1b4e6c701860 100644
> --- a/drivers/cpufreq/apple-soc-cpufreq.c
> +++ b/drivers/cpufreq/apple-soc-cpufreq.c
> @@ -280,6 +280,7 @@ static int apple_soc_cpufreq_init(struct cpufreq_policy *policy)
>  	policy->cpuinfo.transition_latency = transition_latency;
>  	policy->dvfs_possible_from_any_cpu = true;
>  	policy->fast_switch_possible = true;
> +	policy->suspend_freq = freq_table[0].frequency;
>  
>  	if (policy_has_boost_freq(policy)) {
>  		ret = cpufreq_enable_boost_support();
> @@ -329,6 +330,7 @@ static struct cpufreq_driver apple_soc_cpufreq_driver = {
>  	.fast_switch	= apple_soc_cpufreq_fast_switch,
>  	.register_em	= cpufreq_register_em_with_opp,
>  	.attr		= apple_soc_cpufreq_hw_attr,
> +	.suspend	= cpufreq_generic_suspend,
>  };
>  
>  static int __init apple_soc_cpufreq_module_init(void)

Applied. Thanks.

-- 
viresh

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ