Re: [PATCH v2] cpufreq: Fix setting policy limits when frequency tables are used
From: Rafael J. Wysocki
Date: Fri Apr 25 2025 - 09:33:50 EST
On Fri, Apr 25, 2025 at 3:21 PM Stephan Gerhold
<stephan.gerhold@xxxxxxxxxx> wrote:
>
> On Fri, Apr 25, 2025 at 01:36:21PM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
> >
> > Commit 7491cdf46b5c ("cpufreq: Avoid using inconsistent policy->min and
> > policy->max") overlooked the fact that policy->min and policy->max were
> > accessed directly in cpufreq_frequency_table_target() and in the
> > functions called by it. Consequently, the changes made by that commit
> > led to problems with setting policy limits.
> >
> > Address this by passing the target frequency limits to __resolve_freq()
> > and cpufreq_frequency_table_target() and propagating them to the
> > functions called by the latter.
> >
> > Fixes: 7491cdf46b5c ("cpufreq: Avoid using inconsistent policy->min and policy->max")
> > Link: https://lore.kernel.org/linux-pm/aAplED3IA_J0eZN0@xxxxxxxxxx/
> > Reported-by: Stephan Gerhold <stephan.gerhold@xxxxxxxxxx>
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx>
>
> Thanks a lot for the quick fix! It works for me. After the CPU frequency
> was throttled due to high temperature and the device has cooled down,
> the CPU frequency goes back to maximum again.
>
> Tested-by: Stephan Gerhold <stephan.gerhold@xxxxxxxxxx>
Thanks for the quick turnaround!
I want it to spend at least a couple of days in linux-next and I'd
like to give people a chance to review it in case something is still
missing, so my current plan is to push it for -rc5.
Thank you!