linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PATCH] cpufreq: Do not clear real_cpus mask on policy init
@ 2017-02-13 12:44 Rafael J. Wysocki
  2017-02-14  3:47 ` Viresh Kumar
  0 siblings, 1 reply; 2+ messages in thread
From: Rafael J. Wysocki @ 2017-02-13 12:44 UTC (permalink / raw)
  To: Linux PM; +Cc: Viresh Kumar, Srinivas Pandruvada, LKML

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);
 	}
 
 	/*


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH] cpufreq: Do not clear real_cpus mask on policy init
  2017-02-13 12:44 PATCH] cpufreq: Do not clear real_cpus mask on policy init Rafael J. Wysocki
@ 2017-02-14  3:47 ` Viresh Kumar
  0 siblings, 0 replies; 2+ messages in thread
From: Viresh Kumar @ 2017-02-14  3:47 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: Linux PM, Srinivas Pandruvada, LKML

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-14  3:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-13 12:44 PATCH] cpufreq: Do not clear real_cpus mask on policy init Rafael J. Wysocki
2017-02-14  3:47 ` Viresh Kumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).