summaryrefslogtreecommitdiffstats
path: root/include/linux/amd-pstate.h
diff options
context:
space:
mode:
authorMeng Li <li.meng@amd.com>2024-01-19 17:05:00 +0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-01-31 14:54:50 +0100
commite571a5e2068ef57945fcd5d0fb950f8f96da6dc8 (patch)
tree8170d868c98ff37a7caffc90a60b3d73db4cc47f /include/linux/amd-pstate.h
parent9c4a13a08a9b7afa4bc33f57675358f0195e302c (diff)
downloadlinux-stable-e571a5e2068ef57945fcd5d0fb950f8f96da6dc8.tar.gz
linux-stable-e571a5e2068ef57945fcd5d0fb950f8f96da6dc8.tar.bz2
linux-stable-e571a5e2068ef57945fcd5d0fb950f8f96da6dc8.zip
cpufreq: amd-pstate: Update amd-pstate preferred core ranking dynamically
Preferred core rankings can be changed dynamically by the platform based on the workload and platform conditions and accounting for thermals and aging. When this occurs, cpu priority need to be set. Tested-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com> Reviewed-by: Wyes Karny <wyes.karny@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Reviewed-by: Perry Yuan <perry.yuan@amd.com> Signed-off-by: Meng Li <li.meng@amd.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/linux/amd-pstate.h')
-rw-r--r--include/linux/amd-pstate.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/amd-pstate.h b/include/linux/amd-pstate.h
index 68fc1bd8d851..d21838835abd 100644
--- a/include/linux/amd-pstate.h
+++ b/include/linux/amd-pstate.h
@@ -39,11 +39,16 @@ struct amd_aperf_mperf {
* @cppc_req_cached: cached performance request hints
* @highest_perf: the maximum performance an individual processor may reach,
* assuming ideal conditions
+ * For platforms that do not support the preferred core feature, the
+ * highest_pef may be configured with 166 or 255, to avoid max frequency
+ * calculated wrongly. we take the fixed value as the highest_perf.
* @nominal_perf: the maximum sustained performance level of the processor,
* assuming ideal operating conditions
* @lowest_nonlinear_perf: the lowest performance level at which nonlinear power
* savings are achieved
* @lowest_perf: the absolute lowest performance level of the processor
+ * @prefcore_ranking: the preferred core ranking, the higher value indicates a higher
+ * priority.
* @max_freq: the frequency that mapped to highest_perf
* @min_freq: the frequency that mapped to lowest_perf
* @nominal_freq: the frequency that mapped to nominal_perf
@@ -73,6 +78,7 @@ struct amd_cpudata {
u32 nominal_perf;
u32 lowest_nonlinear_perf;
u32 lowest_perf;
+ u32 prefcore_ranking;
u32 min_limit_perf;
u32 max_limit_perf;
u32 min_limit_freq;