summaryrefslogtreecommitdiff
path: root/include/linux/cpufreq.h
diff options
context:
space:
mode:
authorDave Jones <davej@redhat.com>2003-09-09 23:44:43 +0100
committerDave Jones <davej@redhat.com>2003-09-09 23:44:43 +0100
commit5f27f4614e37155d0d5efab61140e30bef1e83f1 (patch)
treea5db69d58119635b8eb0a72041d9061a7d900af7 /include/linux/cpufreq.h
parentb8f215caf1e7495a59a28d5b646cfd175689a0d9 (diff)
[CPUFREQ] add cpufreq_update_policy()
Add a new cpufreq_update_policy call: Certain cpufreq policy notifers have different needs at different times. Thus it needs to be possible to re-evaluate an already set cpufreq policy. Note that the cpufreq policy should only be set by one person: the user. Not any other in-kernel code [with one exception, of course: during booting].
Diffstat (limited to 'include/linux/cpufreq.h')
-rw-r--r--include/linux/cpufreq.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
index f747117285f4..2fe45a92c9fb 100644
--- a/include/linux/cpufreq.h
+++ b/include/linux/cpufreq.h
@@ -60,6 +60,13 @@ struct cpufreq_cpuinfo {
unsigned int transition_latency; /* in 10^(-9) s */
};
+struct cpufreq_real_policy {
+ unsigned int min; /* in kHz */
+ unsigned int max; /* in kHz */
+ unsigned int policy; /* see above */
+ struct cpufreq_governor *governor; /* see below */
+};
+
struct cpufreq_policy {
unsigned int cpu; /* cpu nr */
struct cpufreq_cpuinfo cpuinfo;/* see above */
@@ -74,6 +81,8 @@ struct cpufreq_policy {
struct semaphore lock; /* CPU ->setpolicy or ->target may
only be called once a time */
+ struct cpufreq_real_policy user_policy;
+
struct kobject kobj;
struct completion kobj_unregister;
};
@@ -217,6 +226,7 @@ struct freq_attr {
*********************************************************************/
int cpufreq_set_policy(struct cpufreq_policy *policy);
int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
+int cpufreq_update_policy(unsigned int cpu);
/* the proc_intf.c needs this */
int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor);