diff options
| author | Dominik Brodowski <linux@brodo.de> | 2002-12-14 19:50:32 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-12-14 19:50:32 -0800 |
| commit | 8d13373b408f1e9df4238d0df17c40d7a77e5b02 (patch) | |
| tree | 897508d6100f02c844db2f9db6094700f8e9297b /include/linux | |
| parent | 9aa5637c07edef20c893e73d17a6ba27fa36841f (diff) | |
[PATCH] cpufreq: clean up CPU information
This patch moves some basic per-CPU static information (minimum frequency,
maximum frequency and maximum transition latency) into a struct
cpufreq_cpuinfo. This offers a much cleaner struct cpufreq_driver and
struct cpufreq_policy.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/cpufreq.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h index a8f8d2a31936..e93501c7a0b8 100644 --- a/include/linux/cpufreq.h +++ b/include/linux/cpufreq.h @@ -37,15 +37,26 @@ int cpufreq_unregister_notifier(struct notifier_block *nb, unsigned int list); #define CPUFREQ_POLICY_POWERSAVE (1) #define CPUFREQ_POLICY_PERFORMANCE (2) -/* values here are CPU kHz so that hardware which doesn't run with some - * frequencies can complain without having to guess what per cent / per - * mille means. */ +/* Frequency values here are CPU kHz so that hardware which doesn't run + * with some frequencies can complain without having to guess what per + * cent / per mille means. + * Maximum transition latency is in nanoseconds - if it's unknown, + * CPUFREQ_ETERNAL shall be used. + */ + +#define CPUFREQ_ETERNAL (-1) +struct cpufreq_cpuinfo { + unsigned int max_freq; + unsigned int min_freq; + unsigned int transition_latency; +}; + struct cpufreq_policy { unsigned int cpu; /* cpu nr or CPUFREQ_ALL_CPUS */ unsigned int min; /* in kHz */ unsigned int max; /* in kHz */ unsigned int policy; /* see above */ - unsigned int max_cpu_freq; /* for information */ + struct cpufreq_cpuinfo cpuinfo; /* see above */ }; #define CPUFREQ_ADJUST (0) @@ -116,7 +127,6 @@ struct cpufreq_driver { #endif /* 2.4. compatible API */ #ifdef CONFIG_CPU_FREQ_24_API - unsigned int cpu_min_freq[NR_CPUS]; unsigned int cpu_cur_freq[NR_CPUS]; #endif }; |
