aboutsummaryrefslogtreecommitdiffstats
path: root/rust/helpers/helpers.c
diff options
context:
space:
mode:
authorGautham R. Shenoy <[email protected]>2025-05-29 08:51:43 +0000
committerRafael J. Wysocki <[email protected]>2025-05-29 13:20:45 +0000
commitcb6a85f38f456b086c366e346ebb67ffa70c7243 (patch)
treed72527f1606e8341dfda1918b67b56e93e0ba10f /rust/helpers/helpers.c
parentrust: opp: Move `cfg(CONFIG_OF)` attribute to the top of doc test (diff)
downloadkernel-cb6a85f38f456b086c366e346ebb67ffa70c7243.tar.gz
kernel-cb6a85f38f456b086c366e346ebb67ffa70c7243.zip
acpi-cpufreq: Fix nominal_freq units to KHz in get_max_boost_ratio()
commit 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") modified get_max_boost_ratio() to return the nominal_freq advertised in the _CPC object. This was for the purposes of computing the maximum frequency. The frequencies advertised in _CPC objects are in MHz. However, cpufreq expects the frequency to be in KHz. Since the nominal_freq returned by get_max_boost_ratio() was not in KHz but instead in MHz,the cpuinfo_max_frequency that was computed using this nominal_freq was incorrect and an invalid value which resulted in cpufreq reporting the P0 frequency as the cpuinfo_max_freq. Fix this by converting the nominal_freq to KHz before returning the same from get_max_boost_ratio(). Reported-by: Manu Bretelle <[email protected]> Closes: https://lore.kernel.org/lkml/aDaB63tDvbdcV0cg@HQ-GR2X1W2P57/ Fixes: 083466754596 ("cpufreq: ACPI: Fix max-frequency computation") Signed-off-by: Gautham R. Shenoy <[email protected]> Cc: 6.14+ <[email protected]> # 6.14+ Link: https://patch.msgid.link/[email protected] Signed-off-by: Rafael J. Wysocki <[email protected]>
Diffstat (limited to 'rust/helpers/helpers.c')
0 files changed, 0 insertions, 0 deletions