git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
include
/
linux
/
cpufreq.h
diff --git
a/include/linux/cpufreq.h
b/include/linux/cpufreq.h
index
f48a064
..
48a23f1
100644
(file)
--- a/
include/linux/cpufreq.h
+++ b/
include/linux/cpufreq.h
@@
-21,6
+21,7
@@
#include <linux/kobject.h>
#include <linux/sysfs.h>
#include <linux/completion.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>
#include <linux/completion.h>
+#include <linux/workqueue.h>
#define CPUFREQ_NAME_LEN 16
#define CPUFREQ_NAME_LEN 16
@@
-81,6
+82,9
@@
struct cpufreq_policy {
struct semaphore lock; /* CPU ->setpolicy or ->target may
only be called once a time */
struct semaphore lock; /* CPU ->setpolicy or ->target may
only be called once a time */
+ struct work_struct update; /* if update_policy() needs to be
+ * called, but you're in IRQ context */
+
struct cpufreq_real_policy user_policy;
struct kobject kobj;
struct cpufreq_real_policy user_policy;
struct kobject kobj;
@@
-96,11
+100,13
@@
struct cpufreq_policy {
#define CPUFREQ_PRECHANGE (0)
#define CPUFREQ_POSTCHANGE (1)
#define CPUFREQ_PRECHANGE (0)
#define CPUFREQ_POSTCHANGE (1)
+#define CPUFREQ_RESUMECHANGE (8)
struct cpufreq_freqs {
unsigned int cpu; /* cpu nr */
unsigned int old;
unsigned int new;
struct cpufreq_freqs {
unsigned int cpu; /* cpu nr */
unsigned int old;
unsigned int new;
+ u8 flags; /* flags of cpufreq_driver, see below. */
};
};
@@
-187,6
+193,9
@@
struct cpufreq_driver {
unsigned int target_freq,
unsigned int relation);
unsigned int target_freq,
unsigned int relation);
+ /* should be defined, if possible */
+ unsigned int (*get) (unsigned int cpu);
+
/* optional */
int (*exit) (struct cpufreq_policy *policy);
int (*resume) (struct cpufreq_policy *policy);
/* optional */
int (*exit) (struct cpufreq_policy *policy);
int (*resume) (struct cpufreq_policy *policy);
@@
-195,8
+204,12
@@
struct cpufreq_driver {
/* flags */
/* flags */
-#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if
- all ->init() calls failed */
+#define CPUFREQ_STICKY 0x01 /* the driver isn't removed even if
+ * all ->init() calls failed */
+#define CPUFREQ_CONST_LOOPS 0x02 /* loops_per_jiffy or other kernel
+ * "constants" aren't affected by
+ * frequency transitions */
+
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
int cpufreq_register_driver(struct cpufreq_driver *driver_data);
int cpufreq_unregister_driver(struct cpufreq_driver *driver_data);
@@
-234,6
+247,9
@@
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);
int cpufreq_get_policy(struct cpufreq_policy *policy, unsigned int cpu);
int cpufreq_update_policy(unsigned int cpu);
+/* query the current CPU frequency (in kHz). If zero, cpufreq couldn't detect it */
+unsigned int cpufreq_get(unsigned int cpu);
+
/* the proc_intf.c needs this */
int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor);
/* the proc_intf.c needs this */
int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpufreq_governor **governor);
@@
-241,13
+257,10
@@
int cpufreq_parse_governor (char *str_governor, unsigned int *policy, struct cpu
/*********************************************************************
* CPUFREQ USERSPACE GOVERNOR *
*********************************************************************/
/*********************************************************************
* CPUFREQ USERSPACE GOVERNOR *
*********************************************************************/
-int cpufreq_gov_userspace_init(void);
-
#ifdef CONFIG_CPU_FREQ_24_API
int cpufreq_setmax(unsigned int cpu);
int cpufreq_set(unsigned int kHz, unsigned int cpu);
#ifdef CONFIG_CPU_FREQ_24_API
int cpufreq_setmax(unsigned int cpu);
int cpufreq_set(unsigned int kHz, unsigned int cpu);
-unsigned int cpufreq_get(unsigned int cpu);
/* /proc/sys/cpu */
/* /proc/sys/cpu */