Re: [PATCH v2 2/4] cpufreq: Introduce a more generic way to set default per-policy boost flag
From: Aboorva Devarajan
Date: Wed Feb 05 2025 - 13:23:50 EST
On Wed, 2025-02-05 at 10:31 +0530, Viresh Kumar wrote:
> On 04-02-25, 22:11, Aboorva Devarajan wrote:
> > I noticed that Viresh is working on a similar patch [1] as part of a broader patchset
> > to simplify boost handling, which should also resolve this issue.
> >
> > Should we merge this patch [1] and related patches since this is causing a crash,
> > or submit a separate patch to fix this?
>
> diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
> index d434096b7515..7c1f7f5142da 100644
> --- a/drivers/cpufreq/cpufreq.c
> +++ b/drivers/cpufreq/cpufreq.c
> @@ -1590,7 +1590,8 @@ static int cpufreq_online(unsigned int cpu)
> policy->cdev = of_cpufreq_cooling_register(policy);
>
> /* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
> - if (policy->boost_enabled != cpufreq_boost_enabled()) {
> + if (cpufreq_driver->set_boost &&
> + policy->boost_enabled != cpufreq_boost_enabled()) {
> policy->boost_enabled = cpufreq_boost_enabled();
> ret = cpufreq_driver->set_boost(policy, policy->boost_enabled);
> if (ret) {
>
> I think the right fix for now should be something like this. My series
> (which will be part of next merge window) can go in separately and
> revert this change then (as we won't see this problem then).
>
> Please send a fix with something like this if it works fine, so Rafael
> can apply.
>
Hi Viresh,
Thanks, I have posted a patch for this:
https://lore.kernel.org/all/20250205181347.2079272-1-aboorvad@xxxxxxxxxxxxx/
this should get past the boot-time crash for now, until your patchset
to simplify boost handling is merged.
Regards,
Aboorva