diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 08:48:17 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2009-03-20 08:48:17 +0000 |
commit | 1d79561c4160abd7de9d754892088351f33e79c5 (patch) | |
tree | 87774e2a9517c4246ef8734627e41a59f8783aa9 /xen/include/acpi | |
parent | 7cb051784b0b23386aab37c518a1b3428e591fd0 (diff) | |
download | xen-1d79561c4160abd7de9d754892088351f33e79c5.tar.gz xen-1d79561c4160abd7de9d754892088351f33e79c5.tar.bz2 xen-1d79561c4160abd7de9d754892088351f33e79c5.zip |
cpufreq: Update cpufreq aperf and mperf read, so that it can be used
by both ondemand gov and user program
Current __get_measured_perf read aperf and mperf MSR and then clear
them for the sake of ondemand governor. This solution block user
program to get aperf and mperf on their purpose. In this patch, it no
longer clear aperf and mperf MSR, so that it can be used by both
ondemand gov and user program.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/include/acpi')
-rw-r--r-- | xen/include/acpi/cpufreq/cpufreq.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/xen/include/acpi/cpufreq/cpufreq.h b/xen/include/acpi/cpufreq/cpufreq.h index bc525862bc..8423664efe 100644 --- a/xen/include/acpi/cpufreq/cpufreq.h +++ b/xen/include/acpi/cpufreq/cpufreq.h @@ -106,7 +106,10 @@ extern struct cpufreq_governor *__find_governor(const char *governor); extern int __cpufreq_driver_target(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation); -extern int __cpufreq_driver_getavg(struct cpufreq_policy *policy); + +#define GOV_GETAVG 1 +#define USR_GETAVG 2 +extern int cpufreq_driver_getavg(unsigned int cpu, unsigned int flag); static __inline__ int __cpufreq_governor(struct cpufreq_policy *policy, unsigned int event) @@ -130,7 +133,7 @@ struct cpufreq_driver { unsigned int target_freq, unsigned int relation); unsigned int (*get)(unsigned int cpu); - unsigned int (*getavg)(unsigned int cpu); + unsigned int (*getavg)(unsigned int cpu, unsigned int flag); int (*exit)(struct cpufreq_policy *policy); }; |