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]
Date:   Thu, 8 Aug 2019 18:32:32 +0100
From:   Quentin Perret <quentin.perret@....com>
To:     Douglas RAILLARD <douglas.raillard@....com>
Cc:     linux-kernel@...r.kernel.org, linux-arm-msm@...r.kernel.org,
        linux-pm@...r.kernel.org, rjw@...ysocki.net,
        viresh.kumar@...aro.org, agross@...nel.org
Subject: Re: [PATCH 1/2] cpufreq: drivers: Enable frequency invariance in
 qcom-cpufreq-hw

Hi Douglas,

On Thursday 08 Aug 2019 at 14:18:57 (+0100), Douglas RAILLARD wrote:
> Add calls to arch_set_freq_scale() in qcom-cpufreq-hw driver to enable
> frequency invariance.

Is there a patch 2/2 ?

> 
> Signed-off-by: Douglas RAILLARD <douglas.raillard@....com>
> ---
>  drivers/cpufreq/qcom-cpufreq-hw.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c
> index 4b0b50403901..3bd3b8b268d9 100644
> --- a/drivers/cpufreq/qcom-cpufreq-hw.c
> +++ b/drivers/cpufreq/qcom-cpufreq-hw.c
> @@ -34,9 +34,12 @@ static int qcom_cpufreq_hw_target_index(struct cpufreq_policy *policy,
>  					unsigned int index)
>  {
>  	void __iomem *perf_state_reg = policy->driver_data;
> +	unsigned long freq = policy->freq_table[index].frequency;
>  
>  	writel_relaxed(index, perf_state_reg);
>  
> +	arch_set_freq_scale(policy->related_cpus, freq,
> +			    policy->cpuinfo.max_freq);
>  	return 0;
>  }
>  
> @@ -63,6 +66,7 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
>  {
>  	void __iomem *perf_state_reg = policy->driver_data;
>  	int index;
> +	unsigned long freq;
>  
>  	index = policy->cached_resolved_idx;
>  	if (index < 0)
> @@ -70,7 +74,11 @@ static unsigned int qcom_cpufreq_hw_fast_switch(struct cpufreq_policy *policy,
>  
>  	writel_relaxed(index, perf_state_reg);
>  
> -	return policy->freq_table[index].frequency;
> +	freq = policy->freq_table[index].frequency;
> +	arch_set_freq_scale(policy->related_cpus, freq,
> +			    policy->cpuinfo.max_freq);
> +
> +	return freq;
>  }
>  
>  static int qcom_cpufreq_hw_read_lut(struct device *cpu_dev,
> -- 
> 2.22.0

Reviewed-by: Quentin Perret <quentin.perret@....com>

Thanks,
Quentin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ