[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190109104511.mi3gtdcytkky4eyn@vireshk-i7>
Date: Wed, 9 Jan 2019 16:15:11 +0530
From: Viresh Kumar <viresh.kumar@...aro.org>
To: Quentin Perret <quentin.perret@....com>
Cc: sudeep.holla@....com, rjw@...ysocki.net,
linux-arm-kernel@...ts.infradead.org, linux-pm@...r.kernel.org,
linux-kernel@...r.kernel.org, dietmar.eggemann@....com,
qais.yousef@....com
Subject: Re: [PATCH] cpufreq: scmi: Fix frequency invariance in slow path
On 09-01-19, 10:42, Quentin Perret wrote:
> The scmi-cpufreq driver calls the arch_set_freq_scale() callback on
> frequency changes to provide scale-invariant load-tracking signals to
> the scheduler. However, in the slow path, it does so while specifying
> the current and max frequencies in different units, hence resulting in a
> broken freq_scale factor.
>
> Fix this by passing all frequencies in KHz, as stored in the CPUFreq
> frequency table.
>
> Fixes: 99d6bdf33877 ("cpufreq: add support for CPU DVFS based on SCMI
> message protocol")
> Signed-off-by: Quentin Perret <quentin.perret@....com>
> ---
> drivers/cpufreq/scmi-cpufreq.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/cpufreq/scmi-cpufreq.c b/drivers/cpufreq/scmi-cpufreq.c
> index 50b1551ba894..3f0693439486 100644
> --- a/drivers/cpufreq/scmi-cpufreq.c
> +++ b/drivers/cpufreq/scmi-cpufreq.c
> @@ -52,9 +52,9 @@ scmi_cpufreq_set_target(struct cpufreq_policy *policy, unsigned int index)
> int ret;
> struct scmi_data *priv = policy->driver_data;
> struct scmi_perf_ops *perf_ops = handle->perf_ops;
> - u64 freq = policy->freq_table[index].frequency * 1000;
> + u64 freq = policy->freq_table[index].frequency;
>
> - ret = perf_ops->freq_set(handle, priv->domain_id, freq, false);
> + ret = perf_ops->freq_set(handle, priv->domain_id, freq * 1000, false);
> if (!ret)
> arch_set_freq_scale(policy->related_cpus, freq,
> policy->cpuinfo.max_freq);
Acked-by: Viresh Kumar <viresh.kumar@...aro.org>
--
viresh
Powered by blists - more mailing lists