diff options
author | Mario Limonciello <mario.limonciello@amd.com> | 2024-08-26 16:13:52 -0500 |
---|---|---|
committer | Mario Limonciello <mario.limonciello@amd.com> | 2024-09-11 10:23:22 -0500 |
commit | 6c09e3b445a1a647a5b57ea6afd23e846225dd8f (patch) | |
tree | 3c1c181ecfe88232dc64b214421360c87cca571c /include/acpi | |
parent | 01ced022e125f7b328335bb2944a107afcafe351 (diff) | |
download | lwn-6c09e3b445a1a647a5b57ea6afd23e846225dd8f.tar.gz lwn-6c09e3b445a1a647a5b57ea6afd23e846225dd8f.zip |
x86/amd: Rename amd_get_highest_perf() to amd_get_boost_ratio_numerator()
The function name is ambiguous because it returns an intermediate value
for calculating maximum frequency rather than the CPPC 'Highest Perf'
register.
Rename the function to clarify its use and allow the function to return
errors. Adjust the consumer in acpi-cpufreq to catch errors.
Reviewed-by: Gautham R. Shenoy <gautham.shenoy@amd.com>
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Diffstat (limited to 'include/acpi')
-rw-r--r-- | include/acpi/cppc_acpi.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/acpi/cppc_acpi.h b/include/acpi/cppc_acpi.h index 409a7190a4a8..97861abc5f5b 100644 --- a/include/acpi/cppc_acpi.h +++ b/include/acpi/cppc_acpi.h @@ -159,6 +159,7 @@ extern int cppc_get_epp_perf(int cpunum, u64 *epp_perf); extern int cppc_set_epp_perf(int cpu, struct cppc_perf_ctrls *perf_ctrls, bool enable); extern int cppc_get_auto_sel_caps(int cpunum, struct cppc_perf_caps *perf_caps); extern int cppc_set_auto_sel(int cpu, bool enable); +extern int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator); #else /* !CONFIG_ACPI_CPPC_LIB */ static inline int cppc_get_desired_perf(int cpunum, u64 *desired_perf) { @@ -232,6 +233,10 @@ static inline int cppc_get_auto_sel_caps(int cpunum, struct cppc_perf_caps *perf { return -EOPNOTSUPP; } +static inline int amd_get_boost_ratio_numerator(unsigned int cpu, u64 *numerator) +{ + return -EOPNOTSUPP; +} #endif /* !CONFIG_ACPI_CPPC_LIB */ #endif /* _CPPC_ACPI_H*/ |