aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2014-03-28 09:41:47 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2014-04-07 08:43:50 -0400
commit7f4b04614a273089ad65654f53771c033fadc65e (patch)
treeba06b3522475bf7fcd79d85b90180d384d75bcc6 /include/linux/cpufreq.h
parent71508a1f4f2286eea728a5994f1fb14b77340b47 (diff)
cpufreq: create another field .flags in cpufreq_frequency_table
Currently cpufreq frequency table has two fields: frequency and driver_data. driver_data is only for drivers' internal use and cpufreq core shouldn't use it at all. But with the introduction of BOOST frequencies, this assumption was broken and we started using it as a flag instead. There are two problems due to this: - It is against the description of this field, as driver's data is used by the core now. - if drivers fill it with -3 for any frequency, then those frequencies are never considered by cpufreq core as it is exactly same as value of CPUFREQ_BOOST_FREQ, i.e. ~2. The best way to get this fixed is by creating another field flags which will be used for such flags. This patch does that. Along with that various drivers need modifications due to the change of struct cpufreq_frequency_table. Reviewed-by: Gautham R Shenoy <ego@linux.vnet.ibm.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index c48e595f623e..5ae5100c1f24 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -455,11 +455,14 @@ extern struct cpufreq_governor cpufreq_gov_conservative;
455 * FREQUENCY TABLE HELPERS * 455 * FREQUENCY TABLE HELPERS *
456 *********************************************************************/ 456 *********************************************************************/
457 457
458#define CPUFREQ_ENTRY_INVALID ~0 458/* Special Values of .frequency field */
459#define CPUFREQ_TABLE_END ~1 459#define CPUFREQ_ENTRY_INVALID ~0
460#define CPUFREQ_BOOST_FREQ ~2 460#define CPUFREQ_TABLE_END ~1
461/* Special Values of .flags field */
462#define CPUFREQ_BOOST_FREQ (1 << 0)
461 463
462struct cpufreq_frequency_table { 464struct cpufreq_frequency_table {
465 unsigned int flags;
463 unsigned int driver_data; /* driver specific data, not used by core */ 466 unsigned int driver_data; /* driver specific data, not used by core */
464 unsigned int frequency; /* kHz - doesn't need to be in ascending 467 unsigned int frequency; /* kHz - doesn't need to be in ascending
465 * order */ 468 * order */