Re: [PATCH 1/2] cpufreq: Allow global boost updates without active capable policies
From: Viresh Kumar
Date: Thu Dec 03 2026 - 05:40:52 EST
On 01-12-26, 10:30, Jiangtian Feng wrote:
> Global boost grants permission to use boost; it does not require boost to
> be active on every policy. Saving that permission should not depend on at
> least one boost-capable policy being active when the global knob is
> written.
>
> Since commit 77cf053b041f ("cpufreq: Return -EOPNOTSUPP if no policy
> supports boost"), cpufreq_boost_trigger_state() returns -EOPNOTSUPP when
> the active-policy loop has no boost-capable policy, and store_boost() maps
> that error to -EINVAL for the global sysfs write. Besides rejecting an
> otherwise valid preconfiguration, this prevents users from disabling boost
> before a capable policy becomes active when a driver starts with boost
> enabled by default.
>
> Initialize ret to 0 so the no-active-capable-policy case saves the
> requested global state and returns success. Continue to call
> policy_set_boost() for every active, boost-capable policy and preserve
> all real callback failures. This intentionally changes the no-policy
> result introduced by 77cf053b041f.
>
> Link: https://lore.kernel.org/all/467b9ef5-1fc3-4771-9895-363e815670c7@xxxxxxxxxx/
>
> Qoder, an AI coding assistant, helped analyze the default-enabled case,
> review the active-policy/error semantics and draft this change and
> description. Runtime hardware and hotplug behavior remain subject to
> final review and validation.
>
> Signed-off-by: Jiangtian Feng <jiangtianfeng@xxxxxxxxxxxxxxxxx>
> ---
> drivers/cpufreq/cpufreq.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Acked-by: Viresh Kumar <viresh.kumar@xxxxxxxxxx>
--
viresh