Skip to content

Commit

Permalink
cpufreq: ondemand: use all CPUs in update_sampling_rate
Browse files Browse the repository at this point in the history
Modify update_sampling_rate() to check, and eventually immediately
schedule, all CPU's do_dbs_timer delayed work.

This is required in case of software coordinated CPUs, as we now have a
separate delayed work for each CPU.

Signed-off-by: Fabio Baltieri <fabio.baltieri@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  • Loading branch information
Fabio Baltieri authored and Rafael J. Wysocki committed Feb 1, 2013
1 parent 66df2a0 commit 8ee2ec5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions drivers/cpufreq/cpufreq_ondemand.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ static void update_sampling_rate(unsigned int new_rate)
cpufreq_cpu_put(policy);
continue;
}
dbs_info = &per_cpu(od_cpu_dbs_info, policy->cpu);
dbs_info = &per_cpu(od_cpu_dbs_info, cpu);
cpufreq_cpu_put(policy);

mutex_lock(&dbs_info->cdbs.timer_mutex);
Expand All @@ -345,8 +345,7 @@ static void update_sampling_rate(unsigned int new_rate)
cancel_delayed_work_sync(&dbs_info->cdbs.work);
mutex_lock(&dbs_info->cdbs.timer_mutex);

schedule_delayed_work_on(dbs_info->cdbs.cpu,
&dbs_info->cdbs.work,
schedule_delayed_work_on(cpu, &dbs_info->cdbs.work,
usecs_to_jiffies(new_rate));

}
Expand Down

0 comments on commit 8ee2ec5

Please sign in to comment.