Commit 919bfa9b authored by K Prateek Nayak's avatar K Prateek Nayak Committed by Mario Limonciello
Browse files

cpufreq/amd-pstate: Detect preferred core support before driver registration



Booting with amd-pstate on 3rd Generation EPYC system incorrectly
enabled ITMT support despite the system not supporting Preferred Core
ranking. amd_pstate_init_prefcore() called during amd_pstate*_cpu_init()
requires "amd_pstate_prefcore" to be set correctly however the preferred
core support is detected only after driver registration which is too
late.

Swap the function calls around to detect preferred core support before
registring the driver via amd_pstate_register_driver(). This ensures
amd_pstate*_cpu_init() sees the correct value of "amd_pstate_prefcore"
considering the platform support.

Fixes: 279f838a ("x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()")
Fixes: ff2653de ("cpufreq/amd-pstate: Move registration after static function call update")
Signed-off-by: default avatarK Prateek Nayak <kprateek.nayak@amd.com>
Acked-by: default avatarMario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20241210032557.754-1-kprateek.nayak@amd.com


Signed-off-by: default avatarMario Limonciello <mario.limonciello@amd.com>
parent fac04efc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment