diff options
author | Thomas Renninger <trenn@suse.de> | 2013-06-28 15:34:30 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-05 01:52:19 +0200 |
commit | 0924c369bc5492cf181a066fc2d459aa18ffa5ac (patch) | |
tree | da95fc8a244654d0ea196e5e483704566f45ce3d /tools/power/cpupower/utils/helpers/sysfs.h | |
parent | cpupower: Make idlestate usage unsigned (diff) | |
download | linux-dev-0924c369bc5492cf181a066fc2d459aa18ffa5ac.tar.xz linux-dev-0924c369bc5492cf181a066fc2d459aa18ffa5ac.zip |
cpupower: Implement disabling of cstate interface
Latest kernel allows to disable C-states via:
/sys/devices/system/cpu/cpuX/cpuidle/stateY/disable
This patch provides lower level sysfs access functions to make use of
this interface. A later patch will implement the higher level stuff.
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to '')
-rw-r--r-- | tools/power/cpupower/utils/helpers/sysfs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/power/cpupower/utils/helpers/sysfs.h b/tools/power/cpupower/utils/helpers/sysfs.h index 0401a97a4cab..d28f11fedbda 100644 --- a/tools/power/cpupower/utils/helpers/sysfs.h +++ b/tools/power/cpupower/utils/helpers/sysfs.h @@ -7,8 +7,16 @@ extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen); +extern unsigned int sysfs_idlestate_file_exists(unsigned int cpu, + unsigned int idlestate, + const char *fname); + extern int sysfs_is_cpu_online(unsigned int cpu); +extern int sysfs_is_idlestate_disabled(unsigned int cpu, + unsigned int idlestate); +extern int sysfs_idlestate_disable(unsigned int cpu, unsigned int idlestate, + unsigned int disable); extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu, unsigned int idlestate); extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu, |