]> www.infradead.org Git - users/jedix/linux-maple.git/commit
x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()
authorMario Limonciello <mario.limonciello@amd.com>
Mon, 26 Aug 2024 21:13:55 +0000 (16:13 -0500)
committerMario Limonciello <mario.limonciello@amd.com>
Wed, 11 Sep 2024 15:23:23 +0000 (10:23 -0500)
commit279f838a61f96cbfeb1f9ba060e4a452e6e041d0
tree4ca5d112e8e09887ea34030509f45830f2129215
parent2819bfef6483c66c55064ca678f2630a1a09f3f9
x86/amd: Detect preferred cores in amd_get_boost_ratio_numerator()

AMD systems that support preferred cores will use "166" as their
numerator for max frequency calculations instead of "255".

Add a function for detecting preferred cores by looking at the
highest perf value on all cores.

If preferred cores are enabled return 166 and if disabled the
value in the highest perf register. As the function will be called
multiple times, cache the values for the boost numerator and if
preferred cores will be enabled in global variables.

Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
arch/x86/kernel/acpi/cppc.c
drivers/cpufreq/amd-pstate.c
include/acpi/cppc_acpi.h