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


Groups > linux.kernel > #1579686 > unrolled thread

PATCH] cpufreq: Do not clear real_cpus mask on policy init

Started by"Rafael J. Wysocki" <rjw@rjwysocki.net>
First post2017-02-13 13:50 +0100
Last post2017-02-14 04:50 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  PATCH] cpufreq: Do not clear real_cpus mask on policy init "Rafael J. Wysocki" <rjw@rjwysocki.net> - 2017-02-13 13:50 +0100
    Re: PATCH] cpufreq: Do not clear real_cpus mask on policy init Viresh Kumar <viresh.kumar@linaro.org> - 2017-02-14 04:50 +0100

#1579686 — PATCH] cpufreq: Do not clear real_cpus mask on policy init

From"Rafael J. Wysocki" <rjw@rjwysocki.net>
Date2017-02-13 13:50 +0100
SubjectPATCH] cpufreq: Do not clear real_cpus mask on policy init
Message-ID<taoeR-3KT-7@gated-at.bofh.it>
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

If new_policy is set in cpufreq_online(), the policy object has just
been created and its real_cpus mask has been zeroed on allocation,
and the driver's ->init() callback should not touch it.

It doesn't need to be cleared again, so don't do that.

Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
 drivers/cpufreq/cpufreq.c |    2 --
 1 file changed, 2 deletions(-)

Index: linux-pm/drivers/cpufreq/cpufreq.c
===================================================================
--- linux-pm.orig/drivers/cpufreq/cpufreq.c
+++ linux-pm/drivers/cpufreq/cpufreq.c
@@ -1166,8 +1166,6 @@ static int cpufreq_online(unsigned int c
 	if (new_policy) {
 		/* related_cpus should at least include policy->cpus. */
 		cpumask_copy(policy->related_cpus, policy->cpus);
-		/* Clear mask of registered CPUs */
-		cpumask_clear(policy->real_cpus);
 	}
 
 	/*

[toc] | [next] | [standalone]


#1580270

FromViresh Kumar <viresh.kumar@linaro.org>
Date2017-02-14 04:50 +0100
Message-ID<taChQ-4Iv-19@gated-at.bofh.it>
In reply to#1579686
On 13-02-17, 13:44, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> 
> If new_policy is set in cpufreq_online(), the policy object has just
> been created and its real_cpus mask has been zeroed on allocation,
> and the driver's ->init() callback should not touch it.
> 
> It doesn't need to be cleared again, so don't do that.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
> ---
>  drivers/cpufreq/cpufreq.c |    2 --
>  1 file changed, 2 deletions(-)
> 
> Index: linux-pm/drivers/cpufreq/cpufreq.c
> ===================================================================
> --- linux-pm.orig/drivers/cpufreq/cpufreq.c
> +++ linux-pm/drivers/cpufreq/cpufreq.c
> @@ -1166,8 +1166,6 @@ static int cpufreq_online(unsigned int c
>  	if (new_policy) {
>  		/* related_cpus should at least include policy->cpus. */
>  		cpumask_copy(policy->related_cpus, policy->cpus);
> -		/* Clear mask of registered CPUs */
> -		cpumask_clear(policy->real_cpus);
>  	}
>  
>  	/*

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

-- 
viresh

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web