diff options
author | Thomas Renninger <trenn@suse.de> | 2013-06-28 15:34:31 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-07-05 01:52:19 +0200 |
commit | c4f3610eba69321b9cf35779cd67e68b5138cc16 (patch) | |
tree | 1e290acedef8572a22812c98709cf0754f5d36a9 /tools/power/cpupower/utils/cpupower.c | |
parent | 0924c369bc5492cf181a066fc2d459aa18ffa5ac (diff) |
cpupower: Introduce idle-set subcommand and C-state enabling/disabling
Example:
cpupower idle-set -d 3
will disable C-state 3 on all processors (set commands are active on
all CPUs by default), same as:
cpupower -c all idle-set -d 3
Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'tools/power/cpupower/utils/cpupower.c')
-rw-r--r-- | tools/power/cpupower/utils/cpupower.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/tools/power/cpupower/utils/cpupower.c b/tools/power/cpupower/utils/cpupower.c index 52bee591c1c5..7efc570ffbaa 100644 --- a/tools/power/cpupower/utils/cpupower.c +++ b/tools/power/cpupower/utils/cpupower.c @@ -17,12 +17,6 @@ #include "helpers/helpers.h" #include "helpers/bitmask.h" -struct cmd_struct { - const char *cmd; - int (*main)(int, const char **); - int needs_root; -}; - #define ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0])) static int cmd_help(int argc, const char **argv); @@ -43,10 +37,17 @@ int be_verbose; static void print_help(void); +struct cmd_struct { + const char *cmd; + int (*main)(int, const char **); + int needs_root; +}; + static struct cmd_struct commands[] = { { "frequency-info", cmd_freq_info, 0 }, { "frequency-set", cmd_freq_set, 1 }, { "idle-info", cmd_idle_info, 0 }, + { "idle-set", cmd_idle_set, 1 }, { "set", cmd_set, 1 }, { "info", cmd_info, 0 }, { "monitor", cmd_monitor, 0 }, |