Re: [PATCH] acpi-cpufreq: Fix max-frequency computation

From: Rafael J. Wysocki
Date: Tue Jan 14 2025 - 15:12:30 EST


On Mon, Jan 13, 2025 at 3:23 PM Mario Limonciello
<mario.limonciello@xxxxxxx> wrote:
>
> On 1/12/2025 22:41, Gautham R. Shenoy wrote:
> > commit 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover
> > boost frequencies") introduces an assumption in
> > acpi_cpufreq_cpu_init() that the first entry in the P-state table is
> > the nominal frequency. This assumption is incorrect. The frequency
> > corresponding to the P0 P-State need not be the same as the nominal
> > frequency advertised via CPPC.
> >
> > Since the driver is using the CPPC.highest_perf and CPPC.nominal_perf
> > to compute the boost-ratio, it makes sense to use CPPC.nominal_freq to
> > compute the max-frequency. CPPC.nominal_freq is advertised on
> > platforms supporting CPPC revisions 3 or higher.
> >
> > Hence, fallback to using the first entry in the P-State table only on
> > platforms that do not advertise CPPC.nominal_freq.
> >
> > Fixes: 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies")
> > Tested-by: Dhananjay Ugwekar <Dhananjay.Ugwekar@xxxxxxx>
> > Signed-off-by: Gautham R. Shenoy <gautham.shenoy@xxxxxxx>
>
> Reviewed-by: Mario Limonciello <mario.limonciello@xxxxxxx>

Applied as 6.14 material, thanks!