diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 13:27:41 +0000 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-12-10 13:27:41 +0000 |
commit | 7542c4ff00f26a91840afb3336058e8782399365 (patch) | |
tree | b14eaad4185402e0e6f3070a61a023919054dd4c /tools/libxc/xenctrl.h | |
parent | 630b6713472007f100b40bf100246ca169b23a14 (diff) | |
download | xen-7542c4ff00f26a91840afb3336058e8782399365.tar.gz xen-7542c4ff00f26a91840afb3336058e8782399365.tar.bz2 xen-7542c4ff00f26a91840afb3336058e8782399365.zip |
Add user PM control interface
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'tools/libxc/xenctrl.h')
-rw-r--r-- | tools/libxc/xenctrl.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/tools/libxc/xenctrl.h b/tools/libxc/xenctrl.h index 100749a9ab..18d2f5f4d1 100644 --- a/tools/libxc/xenctrl.h +++ b/tools/libxc/xenctrl.h @@ -1161,4 +1161,46 @@ int xc_pm_reset_cxstat(int xc_handle, int cpuid); int xc_cpu_online(int xc_handle, int cpu); int xc_cpu_offline(int xc_handle, int cpu); + +/* + * cpufreq para name of this structure named + * same as sysfs file name of native linux + */ +typedef xen_userspace_t xc_userspace_t; +typedef xen_ondemand_t xc_ondemand_t; + +struct xc_get_cpufreq_para { + /* IN/OUT variable */ + uint32_t cpu_num; + uint32_t freq_num; + uint32_t gov_num; + + /* for all governors */ + /* OUT variable */ + uint32_t *affected_cpus; + uint32_t *scaling_available_frequencies; + char *scaling_available_governors; + char scaling_driver[CPUFREQ_NAME_LEN]; + + uint32_t cpuinfo_cur_freq; + uint32_t cpuinfo_max_freq; + uint32_t cpuinfo_min_freq; + uint32_t scaling_cur_freq; + + char scaling_governor[CPUFREQ_NAME_LEN]; + uint32_t scaling_max_freq; + uint32_t scaling_min_freq; + + /* for specific governor */ + union { + xc_userspace_t userspace; + xc_ondemand_t ondemand; + } u; +}; + +int xc_get_cpufreq_para(int xc_handle, int cpuid, + struct xc_get_cpufreq_para *user_para); +int xc_set_cpufreq_gov(int xc_handle, int cpuid, char *govname); +int xc_set_cpufreq_para(int xc_handle, int cpuid, + int ctrl_type, int ctrl_value); #endif /* XENCTRL_H */ |