From 193f41dad3d4197b35be8b4cff13c606eb0e1efe Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Tue, 24 Mar 2026 23:39:01 +0100 Subject: [PATCH 1/5] cpupower-idle-info.1: fix short option names The cpupower-idle-info(1) man page describes '-f' as the short form of the '--silent' option and '-e' as the short form of the '--proc' option. But they are not correct: $ cpupower idle-info -f idle-info: invalid option -- 'f' invalid or unknown argument $ cpupower idle-info -e idle-info: invalid option -- 'e' invalid or unknown argument The short form of '--silent' is actually '-s' and the short form of '--proc' is actually '-o': cpuidle-info.c: {"silent", no_argument, NULL, 's'}, {"proc", no_argument, NULL, 'o'}, Signed-off-by: Roberto Ricci Link: https://lore.kernel.org/r/20260324223921.14317-2-io@r-ricci.it Signed-off-by: Shuah Khan --- tools/power/cpupower/man/cpupower-idle-info.1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/power/cpupower/man/cpupower-idle-info.1 b/tools/power/cpupower/man/cpupower-idle-info.1 index 20b6345c53ad..b2f92aba5f5b 100644 --- a/tools/power/cpupower/man/cpupower-idle-info.1 +++ b/tools/power/cpupower/man/cpupower-idle-info.1 @@ -11,10 +11,10 @@ A tool which prints out per cpu idle information helpful to developers and inter .SH "OPTIONS" .LP .TP -\fB\-f\fR \fB\-\-silent\fR +\fB\-s\fR \fB\-\-silent\fR Only print a summary of all available C-states in the system. .TP -\fB\-e\fR \fB\-\-proc\fR +\fB\-o\fR \fB\-\-proc\fR deprecated. Prints out idle information in old /proc/acpi/processor/*/power format. This interface has been removed from the kernel for quite some time, do not let From 10a54e715985baac21bb506f86c5ad1b83a12784 Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Tue, 24 Mar 2026 23:39:02 +0100 Subject: [PATCH 2/5] cpupower-frequency-info.1: use the proper name of the --perf option The cpupower-frequency-info(1) man page describes a '--perf' option. Even though this form is accepted by the program, its proper name is '--performance'. cpufreq-info.c: {"performance", no_argument, NULL, 'c'}, Signed-off-by: Roberto Ricci Link: https://lore.kernel.org/r/20260324223921.14317-3-io@r-ricci.it Signed-off-by: Shuah Khan --- tools/power/cpupower/man/cpupower-frequency-info.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1 index 47fdd7218748..1173d4f31e69 100644 --- a/tools/power/cpupower/man/cpupower-frequency-info.1 +++ b/tools/power/cpupower/man/cpupower-frequency-info.1 @@ -53,7 +53,7 @@ human\-readable output for the \-f, \-w, \-s and \-y parameters. \fB\-n\fR \fB\-\-no-rounding\fR Output frequencies and latencies without rounding off values. .TP -\fB\-c\fR \fB\-\-perf\fR +\fB\-c\fR \fB\-\-performance\fR Get performances and frequencies capabilities of CPPC, by reading it from hardware (only available on the hardware with CPPC). .TP .SH "REMARKS" From ed2946802bad2ec997383d22edfc14ae44245183 Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Tue, 24 Mar 2026 23:39:03 +0100 Subject: [PATCH 3/5] cpupower-frequency-info.1: document --boost and --epp options `cpupower frequency-info` supports the '--boost' option since the program was first added with commit 7fe2f6399a84 ("cpupowerutils - cpufrequtils extended with quite some features"), but the man page lacks it. '--epp' has been added with commit 5f567afc283f ("cpupower: Add support for showing energy performance preference") but it has never been added to the man page. cpufreq-info.c: {"boost", no_argument, NULL, 'b'}, ... {"epp", no_argument, NULL, 'z'}, Signed-off-by: Roberto Ricci Link: https://lore.kernel.org/r/20260324223921.14317-4-io@r-ricci.it Signed-off-by: Shuah Khan --- tools/power/cpupower/man/cpupower-frequency-info.1 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/power/cpupower/man/cpupower-frequency-info.1 b/tools/power/cpupower/man/cpupower-frequency-info.1 index 1173d4f31e69..b0d69c9adcbd 100644 --- a/tools/power/cpupower/man/cpupower-frequency-info.1 +++ b/tools/power/cpupower/man/cpupower-frequency-info.1 @@ -32,6 +32,12 @@ Gets the currently used cpufreq policy. \fB\-g\fR \fB\-\-governors\fR Determines available cpufreq governors. .TP +\fB\-b\fR \fB\-\-boost\fR +Gets the current boost state support. +.TP +\fB\-z\fR \fB\-\-epp\fR +Gets the current EPP (energy performance preference). +.TP \fB\-r\fR \fB\-\-related\-cpus\fR Determines which CPUs run at the same hardware frequency. .TP From 8bbd81ddbe174aa8488db7971fe2717cb636a46c Mon Sep 17 00:00:00 2001 From: Roberto Ricci Date: Tue, 24 Mar 2026 23:39:04 +0100 Subject: [PATCH 4/5] cpupower-info.1: describe the --perf-bias option The cpupower-info(1) man page only mentions the short form of the '--perf-bias' option in the synopsys, but the long form is not documented and its effect is not explained. cpupower-info.c: {"perf-bias", optional_argument, NULL, 'b'}, Signed-off-by: Roberto Ricci Link: https://lore.kernel.org/r/20260324223921.14317-5-io@r-ricci.it Signed-off-by: Shuah Khan --- tools/power/cpupower/man/cpupower-info.1 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/power/cpupower/man/cpupower-info.1 b/tools/power/cpupower/man/cpupower-info.1 index 340bcd0be7de..1f42d8c388a0 100644 --- a/tools/power/cpupower/man/cpupower-info.1 +++ b/tools/power/cpupower/man/cpupower-info.1 @@ -3,7 +3,7 @@ cpupower\-info \- Shows processor power related kernel or hardware configurations .SH SYNOPSIS .ft B -.B cpupower info [ \-b ] +.B cpupower info [\fIoptions\fP] .SH DESCRIPTION \fBcpupower info \fP shows kernel configurations or processor hardware @@ -13,6 +13,13 @@ Some options are platform wide, some affect single cores. By default values of core zero are displayed only. cpupower --cpu all cpuinfo will show the settings of all cores, see cpupower(1) how to choose specific cores. +.SH "OPTIONS" +.LP +.TP +\fB\-b\fR \fB\-\-perf-bias\fR +Gets the current performance bias value. +.TP + .SH "SEE ALSO" Options are described in detail in: From 2fd3b83cacfb9160b896fb26117328eeb0598c54 Mon Sep 17 00:00:00 2001 From: Kaushlendra Kumar Date: Thu, 2 Apr 2026 21:45:32 +0530 Subject: [PATCH 5/5] cpupower: remove extern declarations in cmd functions extern char *optarg and extern int optind, opterr, optopt are already declared by , which is included at the top of the file. Repeating extern declarations inside a function body is misleading and unnecessary. Signed-off-by: Kaushlendra Kumar Signed-off-by: Shuah Khan --- tools/power/cpupower/utils/cpufreq-info.c | 2 -- tools/power/cpupower/utils/cpufreq-set.c | 2 -- tools/power/cpupower/utils/cpuidle-info.c | 2 -- tools/power/cpupower/utils/cpuidle-set.c | 2 -- tools/power/cpupower/utils/cpupower-info.c | 2 -- tools/power/cpupower/utils/cpupower-set.c | 2 -- 6 files changed, 12 deletions(-) diff --git a/tools/power/cpupower/utils/cpufreq-info.c b/tools/power/cpupower/utils/cpufreq-info.c index 5fe01e516817..5a242b491a9d 100644 --- a/tools/power/cpupower/utils/cpufreq-info.c +++ b/tools/power/cpupower/utils/cpufreq-info.c @@ -542,8 +542,6 @@ static struct option info_opts[] = { int cmd_freq_info(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; int ret = 0, cont = 1; unsigned int cpu = 0; unsigned int human = 0; diff --git a/tools/power/cpupower/utils/cpufreq-set.c b/tools/power/cpupower/utils/cpufreq-set.c index c5e60a39cfa6..06cd4b280132 100644 --- a/tools/power/cpupower/utils/cpufreq-set.c +++ b/tools/power/cpupower/utils/cpufreq-set.c @@ -195,8 +195,6 @@ static int do_one_cpu(unsigned int cpu, struct cpufreq_policy *new_pol, int cmd_freq_set(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; int ret = 0, cont = 1; int double_parm = 0, related = 0, policychange = 0; unsigned long freq = 0; diff --git a/tools/power/cpupower/utils/cpuidle-info.c b/tools/power/cpupower/utils/cpuidle-info.c index 81b4763a97d6..ccb37125bd37 100644 --- a/tools/power/cpupower/utils/cpuidle-info.c +++ b/tools/power/cpupower/utils/cpuidle-info.c @@ -139,8 +139,6 @@ static inline void cpuidle_exit(int fail) int cmd_idle_info(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; int ret = 0, cont = 1, output_param = 0, verbose = 1; unsigned int cpu = 0; diff --git a/tools/power/cpupower/utils/cpuidle-set.c b/tools/power/cpupower/utils/cpuidle-set.c index a551d1d4ac51..703094f1343c 100644 --- a/tools/power/cpupower/utils/cpuidle-set.c +++ b/tools/power/cpupower/utils/cpuidle-set.c @@ -24,8 +24,6 @@ static struct option info_opts[] = { int cmd_idle_set(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; int ret = 0, cont = 1, param = 0, disabled; unsigned long long latency = 0, state_latency; unsigned int cpu = 0, idlestate = 0, idlestates = 0; diff --git a/tools/power/cpupower/utils/cpupower-info.c b/tools/power/cpupower/utils/cpupower-info.c index 18fd7751f509..79154d71e498 100644 --- a/tools/power/cpupower/utils/cpupower-info.c +++ b/tools/power/cpupower/utils/cpupower-info.c @@ -28,8 +28,6 @@ static void print_wrong_arg_exit(void) int cmd_info(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; unsigned int cpu; struct utsname uts; diff --git a/tools/power/cpupower/utils/cpupower-set.c b/tools/power/cpupower/utils/cpupower-set.c index 550a942e72ce..c2176b9fa57d 100644 --- a/tools/power/cpupower/utils/cpupower-set.c +++ b/tools/power/cpupower/utils/cpupower-set.c @@ -33,8 +33,6 @@ static void print_wrong_arg_exit(void) int cmd_set(int argc, char **argv) { - extern char *optarg; - extern int optind, opterr, optopt; unsigned int cpu; struct utsname uts;