]> git.baikalelectronics.ru Git - kernel.git/commit
cpufreq: make sure frequency transitions are serialized
authorViresh Kumar <viresh.kumar@linaro.org>
Wed, 19 Jun 2013 04:46:55 +0000 (10:16 +0530)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 27 Jun 2013 19:49:55 +0000 (21:49 +0200)
commit8b509f9b80ea80fa302f7c16a52ca9346dece9a9
tree6198099d8f7fc69c3510908d539df878857684cd
parentb21cb51c6af808060f6a9c3204a5ff53d1849c4a
cpufreq: make sure frequency transitions are serialized

Whenever we are changing frequency of a cpu, we are calling PRECHANGE and
POSTCHANGE notifiers. They must be serialized. i.e. PRECHANGE or POSTCHANGE
shouldn't be called twice contiguously.

This can happen due to bugs in users of __cpufreq_driver_target() or actual
cpufreq drivers who are sending these notifiers.

This patch adds some protection against this. Now, we keep track of the last
transaction and see if something went wrong.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/cpufreq.c
include/linux/cpufreq.h