aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2013-03-27 11:58:58 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2013-03-31 19:11:34 -0400
commit4d5dcc4211f9def4281eafb54b8ed483862e8135 (patch)
tree7f3c725675ce3042d2d2eb86b0b40f93cef73de3 /include/linux/cpufreq.h
parent7bd353a995d9049262661d85811d6109140582a3 (diff)
cpufreq: governor: Implement per policy instances of governors
Currently, there can't be multiple instances of single governor_type. If we have a multi-package system, where we have multiple instances of struct policy (per package), we can't have multiple instances of same governor. i.e. We can't have multiple instances of ondemand governor for multiple packages. Governors directory in sysfs is created at /sys/devices/system/cpu/cpufreq/ governor-name/. Which again reflects that there can be only one instance of a governor_type in the system. This is a bottleneck for multicluster system, where we want different packages to use same governor type, but with different tunables. This patch uses the infrastructure provided by earlier patch and implements init/exit routines for ondemand and conservative governors. 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index b7393b56f552..4bbc572dd521 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -232,6 +232,13 @@ struct cpufreq_driver {
232 struct module *owner; 232 struct module *owner;
233 char name[CPUFREQ_NAME_LEN]; 233 char name[CPUFREQ_NAME_LEN];
234 u8 flags; 234 u8 flags;
235 /*
236 * This should be set by platforms having multiple clock-domains, i.e.
237 * supporting multiple policies. With this sysfs directories of governor
238 * would be created in cpu/cpu<num>/cpufreq/ directory and so they can
239 * use the same governor with different tunables for different clusters.
240 */
241 bool have_governor_per_policy;
235 242
236 /* needed by all drivers */ 243 /* needed by all drivers */
237 int (*init) (struct cpufreq_policy *policy); 244 int (*init) (struct cpufreq_policy *policy);
@@ -332,6 +339,7 @@ const char *cpufreq_get_current_driver(void);
332 *********************************************************************/ 339 *********************************************************************/
333int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu); 340int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
334int cpufreq_update_policy(unsigned int cpu); 341int cpufreq_update_policy(unsigned int cpu);
342bool have_governor_per_policy(void);
335 343
336#ifdef CONFIG_CPU_FREQ 344#ifdef CONFIG_CPU_FREQ
337/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */ 345/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */