Skip to contentSkip to conversation

cpupower update for Linux 6.17-rc2

GIT PULL Shuah Khan 2 participants 2 messages Aug 15, 2025 – Aug 18, 2025 CPU power monitoring

lore
Share & tools
lore

Shuah Khan

author maintainer
#0 lore raw

Hi Rafael,

Please pull the following cpupower update for Linux 6.17-rc2 or in your next pr to Linus.

Fixes set subcommand -t option and enables boost control feature on non-x86 platforms that support boot control.

diff is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:

Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-cpupower-6.17-rc2

for you to fetch changes up to 357d1fc38aad2cf4ea6626138cbf68299d20170c:

cpupower: Allow control of boost feature on non-x86 based systems with boost support. (2025-08-15 10:49:14 -0600)

----------------------------------------------------------------
linux-cpupower-6.17-rc2

Fixes set subcommand -t option and enables boost control feature on non-x86 platforms that support boot control.

----------------------------------------------------------------
Shinji Nomoto (2):
cpupower: Fix a bug where the -t option of the set subcommand was not working.
cpupower: Allow control of boost feature on non-x86 based systems with boost support.

 tools/power/cpupower/man/cpupower-set.1      |  7 +--
 tools/power/cpupower/utils/cpufreq-info.c    | 16 +++++-
 tools/power/cpupower/utils/cpupower-set.c    |  5 +-
 tools/power/cpupower/utils/helpers/helpers.h | 14 ++---
 tools/power/cpupower/utils/helpers/misc.c    | 76 ++++++++++++++++++++--------
 5 files changed, 83 insertions(+), 35 deletions(-)

----------------------------------------------------------------

tools/power/cpupower/man/cpupower-set.1 +4 -3
index 500653ef98c7..8ac82b6f9189 100644
@@ -81,10 +81,11 @@ Refer to the AMD P-State kernel documentation for further information.
 .RE
 
 .PP
-\-\-turbo\-boost, \-t
+\-\-turbo\-boost, \-\-boost, \-t
 .RS 4
-This option is used to enable or disable the turbo boost feature on
-supported Intel and AMD processors.
+This option is used to enable or disable the boost feature on
+supported Intel and AMD processors, and other boost supported systems.
+(The --boost option is an alias for the --turbo-boost option)
 
 This option takes as parameter either \fB1\fP to enable, or \fB0\fP to disable the feature.
 
tools/power/cpupower/utils/cpufreq-info.c +15 -1
index fc750e127404..7d3732f5f2f6 100644
@@ -128,7 +128,7 @@ static int get_boost_mode_x86(unsigned int cpu)
 	/* ToDo: Make this more global */
 	unsigned long pstates[MAX_HW_PSTATES] = {0,};
 
-	ret = cpufreq_has_boost_support(cpu, &support, &active, &b_states);
+	ret = cpufreq_has_x86_boost_support(cpu, &support, &active, &b_states);
 	if (ret) {
 		printf(_("Error while evaluating Boost Capabilities"
 				" on CPU %d -- are you root?\n"), cpu);
@@ -204,6 +204,18 @@ static int get_boost_mode_x86(unsigned int cpu)
 	return 0;
 }
 
+static int get_boost_mode_generic(unsigned int cpu)
+{
+	bool active;
+
+	if (!cpufreq_has_generic_boost_support(&active)) {
+		printf(_("  boost state support:\n"));
+		printf(_("    Active: %s\n"), active ? _("yes") : _("no"));
+	}
+
+	return 0;
+}
+
 /* --boost / -b */
 
 static int get_boost_mode(unsigned int cpu)
@@ -214,6 +226,8 @@ static int get_boost_mode(unsigned int cpu)
 	    cpupower_cpu_info.vendor == X86_VENDOR_HYGON ||
 	    cpupower_cpu_info.vendor == X86_VENDOR_INTEL)
 		return get_boost_mode_x86(cpu);
+	else
+		get_boost_mode_generic(cpu);
 
 	freqs = cpufreq_get_boost_frequencies(cpu);
 	if (freqs) {
tools/power/cpupower/utils/cpupower-set.c +3 -2
index 0677b58374ab..c2117e5650dd 100644
@@ -21,6 +21,7 @@ static struct option set_opts[] = {
 	{"epp", required_argument, NULL, 'e'},
 	{"amd-pstate-mode", required_argument, NULL, 'm'},
 	{"turbo-boost", required_argument, NULL, 't'},
+	{"boost", required_argument, NULL, 't'},
 	{ },
 };
 
@@ -62,8 +63,8 @@ int cmd_set(int argc, char **argv)
 
 	params.params = 0;
 	/* parameter parsing */
-	while ((ret = getopt_long(argc, argv, "b:e:m:",
-						set_opts, NULL)) != -1) {
+	while ((ret = getopt_long(argc, argv, "b:e:m:t:",
+				  set_opts, NULL)) != -1) {
 		switch (ret) {
 		case 'b':
 			if (params.perf_bias)
tools/power/cpupower/utils/helpers/helpers.h +7 -7
index 95749b8ee475..82ea62bdf5a2 100644
@@ -103,6 +103,9 @@ extern struct cpupower_cpu_info cpupower_cpu_info;
 
 /* cpuid and cpuinfo helpers  **************************/
 
+int cpufreq_has_generic_boost_support(bool *active);
+int cpupower_set_turbo_boost(int turbo_boost);
+
 /* X86 ONLY ****************************************/
 #if defined(__i386__) || defined(__x86_64__)
 
@@ -118,7 +121,6 @@ extern unsigned long long msr_intel_get_turbo_ratio(unsigned int cpu);
 
 extern int cpupower_set_epp(unsigned int cpu, char *epp);
 extern int cpupower_set_amd_pstate_mode(char *mode);
-extern int cpupower_set_turbo_boost(int turbo_boost);
 
 /* Read/Write msr ****************************/
 
@@ -139,8 +141,8 @@ extern int decode_pstates(unsigned int cpu, int boost_states,
 
 /* AMD HW pstate decoding **************************/
 
-extern int cpufreq_has_boost_support(unsigned int cpu, int *support,
-				     int *active, int * states);
+int cpufreq_has_x86_boost_support(unsigned int cpu, int *support,
+				  int *active, int *states);
 
 /* AMD P-State stuff **************************/
 bool cpupower_amd_pstate_enabled(void);
@@ -181,13 +183,11 @@ static inline int cpupower_set_epp(unsigned int cpu, char *epp)
 { return -1; };
 static inline int cpupower_set_amd_pstate_mode(char *mode)
 { return -1; };
-static inline int cpupower_set_turbo_boost(int turbo_boost)
-{ return -1; };
 
 /* Read/Write msr ****************************/
 
-static inline int cpufreq_has_boost_support(unsigned int cpu, int *support,
-					    int *active, int * states)
+static inline int cpufreq_has_x86_boost_support(unsigned int cpu, int *support,
+						int *active, int *states)
 { return -1; }
 
 static inline bool cpupower_amd_pstate_enabled(void)
tools/power/cpupower/utils/helpers/misc.c +54 -22

102 lines not on this page · raw message

#1 lore raw

Hi Shuah,

Quoted 38 lines · Shuah Khan

Hi Rafael,

Please pull the following cpupower update for Linux 6.17-rc2 or in your next pr to Linus.

Fixes set subcommand -t option and enables boost control feature on non-x86 platforms that support boot control.

diff is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 8f5ae30d69d7543eee0d70083daf4de8fe15d585:

   Linux 6.17-rc1 (2025-08-10 19:41:16 +0300)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-cpupower-6.17-rc2

for you to fetch changes up to 357d1fc38aad2cf4ea6626138cbf68299d20170c:

cpupower: Allow control of boost feature on non-x86 based systems with boost support. (2025-08-15 10:49:14 -0600)

----------------------------------------------------------------
linux-cpupower-6.17-rc2

Fixes set subcommand -t option and enables boost control feature on non-x86 platforms that support boot control.

----------------------------------------------------------------
Shinji Nomoto (2):
cpupower: Fix a bug where the -t option of the set subcommand was not working.
cpupower: Allow control of boost feature on non-x86 based systems with boost support.

Quoted 7 lines
  tools/power/cpupower/man/cpupower-set.1      |  7 +--
  tools/power/cpupower/utils/cpufreq-info.c    | 16 +++++-
  tools/power/cpupower/utils/cpupower-set.c    |  5 +-
  tools/power/cpupower/utils/helpers/helpers.h | 14 ++---
  tools/power/cpupower/utils/helpers/misc.c    | 76 ++++++++++++++++++++--------
  5 files changed, 83 insertions(+), 35 deletions(-)

----------------------------------------------------------------

Pulled and added to linux-pm.git/fixes, thanks!