summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/cpufreq_ondemand.c
diff options
context:
space:
mode:
authorFabio Baltieri <fabio.baltieri@linaro.org>2013-01-31 10:39:19 +0000
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-02-02 00:01:16 +0100
commit09dca5ae7531c9df379a2c2484a17438b9e947bc (patch)
tree859bbcfda0b5414c446bbc6c92955620ee9f6f62 /drivers/cpufreq/cpufreq_ondemand.c
parent2624f90c16413990ecb0414400174a066319a9f5 (diff)
downloadlinux-09dca5ae7531c9df379a2c2484a17438b9e947bc.tar.bz2
cpufreq: governors: fix misuse of cdbs.cpu
Fix governors code to set all cpu's cdbs->cpu to the the actual cpu id and use cur_policy->cpu istead of cdbs->cpu to track current governor's leader cpu. Reported-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq/cpufreq_ondemand.c')
-rw-r--r--drivers/cpufreq/cpufreq_ondemand.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/cpufreq/cpufreq_ondemand.c b/drivers/cpufreq/cpufreq_ondemand.c
index 5ae84ffeafb3..75efd5ee00f8 100644
--- a/drivers/cpufreq/cpufreq_ondemand.c
+++ b/drivers/cpufreq/cpufreq_ondemand.c
@@ -219,7 +219,7 @@ static void od_check_cpu(int cpu, unsigned int load_freq)
static void od_timer_update(struct od_cpu_dbs_info_s *dbs_info, bool sample,
struct delayed_work *dw)
{
- unsigned int cpu = dbs_info->cdbs.cpu;
+ unsigned int cpu = dbs_info->cdbs.cur_policy->cpu;
int delay, sample_type = dbs_info->sample_type;
/* Common NORMAL_SAMPLE setup */
@@ -255,7 +255,8 @@ static void od_timer_coordinated(struct od_cpu_dbs_info_s *dbs_info_local,
bool sample = true;
/* use leader CPU's dbs_info */
- dbs_info = &per_cpu(od_cpu_dbs_info, dbs_info_local->cdbs.cpu);
+ dbs_info = &per_cpu(od_cpu_dbs_info,
+ dbs_info_local->cdbs.cur_policy->cpu);
mutex_lock(&dbs_info->cdbs.timer_mutex);
time_now = ktime_get();