Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1698272 > unrolled thread

[PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function

Started byDietmar Eggemann <dietmar.eggemann@arm.com>
First post2017-07-27 21:40 +0200
Last post2017-07-28 10:30 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function Dietmar Eggemann <dietmar.eggemann@arm.com> - 2017-07-27 21:40 +0200
    Re: [PATCH v3 03/10] cpufreq: arm_big_little: invoke  frequency-invariance setter function Viresh Kumar <viresh.kumar@linaro.org> - 2017-07-28 10:30 +0200

#1698272 — [PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function

FromDietmar Eggemann <dietmar.eggemann@arm.com>
Date2017-07-27 21:40 +0200
Subject[PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function
Message-ID<u7WNB-1TC-31@gated-at.bofh.it>
Call the frequency-invariance setter function arch_set_freq_scale()
if the new frequency has been successfully set which is indicated by
bL_cpufreq_set_rate() returning 0.

Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
---
 drivers/cpufreq/arm_big_little.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
index ea6d62547b10..8880f8d9d09d 100644
--- a/drivers/cpufreq/arm_big_little.c
+++ b/drivers/cpufreq/arm_big_little.c
@@ -213,6 +213,7 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
 {
 	u32 cpu = policy->cpu, cur_cluster, new_cluster, actual_cluster;
 	unsigned int freqs_new;
+	int ret;
 
 	cur_cluster = cpu_to_cluster(cpu);
 	new_cluster = actual_cluster = per_cpu(physical_cluster, cpu);
@@ -229,7 +230,14 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
 		}
 	}
 
-	return bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new);
+	ret = bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new);
+
+	if (!ret) {
+		arch_set_freq_scale(policy->related_cpus, freqs_new,
+				    policy->cpuinfo.max_freq);
+	}
+
+	return ret;
 }
 
 static inline u32 get_table_count(struct cpufreq_frequency_table *table)
-- 
2.11.0

[toc] | [next] | [standalone]


#1698584 — Re: [PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-07-28 10:30 +0200
SubjectRe: [PATCH v3 03/10] cpufreq: arm_big_little: invoke frequency-invariance setter function
Message-ID<u88OK-1fB-3@gated-at.bofh.it>
In reply to#1698272
On 27-07-17, 20:33, Dietmar Eggemann wrote:
> Call the frequency-invariance setter function arch_set_freq_scale()
> if the new frequency has been successfully set which is indicated by
> bL_cpufreq_set_rate() returning 0.
> 
> Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
> Cc: Viresh Kumar <viresh.kumar@linaro.org>
> Cc: Sudeep Holla <sudeep.holla@arm.com>
> Signed-off-by: Dietmar Eggemann <dietmar.eggemann@arm.com>
> ---
>  drivers/cpufreq/arm_big_little.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/cpufreq/arm_big_little.c b/drivers/cpufreq/arm_big_little.c
> index ea6d62547b10..8880f8d9d09d 100644
> --- a/drivers/cpufreq/arm_big_little.c
> +++ b/drivers/cpufreq/arm_big_little.c
> @@ -213,6 +213,7 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
>  {
>  	u32 cpu = policy->cpu, cur_cluster, new_cluster, actual_cluster;
>  	unsigned int freqs_new;
> +	int ret;
>  
>  	cur_cluster = cpu_to_cluster(cpu);
>  	new_cluster = actual_cluster = per_cpu(physical_cluster, cpu);
> @@ -229,7 +230,14 @@ static int bL_cpufreq_set_target(struct cpufreq_policy *policy,
>  		}
>  	}
>  
> -	return bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new);
> +	ret = bL_cpufreq_set_rate(cpu, actual_cluster, new_cluster, freqs_new);
> +
> +	if (!ret) {
> +		arch_set_freq_scale(policy->related_cpus, freqs_new,
> +				    policy->cpuinfo.max_freq);
> +	}
> +
> +	return ret;
>  }
>  
>  static inline u32 get_table_count(struct cpufreq_frequency_table *table)

Acked-by: Viresh Kumar <viresh.kumar@linaro.org>

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web