linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] cpufreq: Fix initialization with disabled boost
@ 2025-06-16 17:25 Christian Loehle
  2025-06-16 19:10 ` Robin Murphy
  2025-06-18 14:32 ` Rafael J. Wysocki
  0 siblings, 2 replies; 9+ messages in thread
From: Christian Loehle @ 2025-06-16 17:25 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, linux-pm, Viresh Kumar,
	Rafael J. Wysocki
  Cc: Robin Murphy, zhenglifeng1

The boost_enabled early return in policy_set_boost() caused
the boost disabled at initialization to not actually set the
initial policy->max, therefore effectively enabling boost while
it should have been enabled.

Fixes: 27241c8b63bd ("cpufreq: Introduce policy_set_boost()")
Reported-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Christian Loehle <christian.loehle@arm.com>
---
 drivers/cpufreq/cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
index d7426e1d8bdd..e85139bd0436 100644
--- a/drivers/cpufreq/cpufreq.c
+++ b/drivers/cpufreq/cpufreq.c
@@ -1630,7 +1630,7 @@ static int cpufreq_online(unsigned int cpu)
 	 */
 	if (cpufreq_driver->set_boost && policy->boost_supported &&
 	    (new_policy || !cpufreq_boost_enabled())) {
-		ret = policy_set_boost(policy, cpufreq_boost_enabled());
+		ret = cpufreq_driver->set_boost(policy, cpufreq_boost_enabled());
 		if (ret) {
 			/* If the set_boost fails, the online operation is not affected */
 			pr_info("%s: CPU%d: Cannot %s BOOST\n", __func__, policy->cpu,
-- 
2.34.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2025-06-23 22:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-16 17:25 [PATCH] cpufreq: Fix initialization with disabled boost Christian Loehle
2025-06-16 19:10 ` Robin Murphy
2025-06-17  2:14   ` zhenglifeng (A)
2025-06-17  8:20     ` Christian Loehle
2025-06-17 12:56       ` Robin Murphy
2025-06-19  6:48         ` Viresh Kumar
2025-06-18 14:32 ` Rafael J. Wysocki
2025-06-18 14:57   ` Christian Loehle
2025-06-23 22:16     ` Dietmar Eggemann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).