Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154947810
D55253.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D55253.diff
View Options
diff --git a/sys/x86/cpufreq/hwpstate_amd.c b/sys/x86/cpufreq/hwpstate_amd.c
--- a/sys/x86/cpufreq/hwpstate_amd.c
+++ b/sys/x86/cpufreq/hwpstate_amd.c
@@ -798,14 +798,6 @@
data->init_request = sc->cppc.request;
data->request = sc->cppc.request;
- /*
- * In Intel's reference manual, the default value of EPP is 0x80u which
- * is the balanced mode. For consistency, we set the same value in AMD's
- * CPPC driver.
- */
- SET_BITS_VALUE(data->request, AMD_CPPC_REQUEST_EPP_BITS, 0x80);
- /* Enable autonomous mode by setting desired performance to 0. */
- SET_BITS_VALUE(data->request, AMD_CPPC_REQUEST_DES_PERF_BITS, 0);
/*
* Assuming reading MSR_AMD_CPPC_CAPS_1 succeeded, if it stays at its
* reset value (0) before CPPC activation (not supposed to happen, but
@@ -834,6 +826,16 @@
lowest_perf);
SET_BITS_VALUE(data->request, AMD_CPPC_REQUEST_MAX_PERF_BITS,
highest_perf);
+ /*
+ * Set controls to maximum performance to avoid regressions now that
+ * CPPC is activated by default and to match what the P-state support
+ * does.
+ */
+ SET_BITS_VALUE(data->request, AMD_CPPC_REQUEST_EPP_BITS, 0);
+ /* 0 in "Desired Performance" is autonomous mode. */
+ MPASS(highest_perf != 0);
+ SET_BITS_VALUE(data->request, AMD_CPPC_REQUEST_DES_PERF_BITS,
+ highest_perf);
error = wrmsr_safe(MSR_AMD_CPPC_REQUEST, data->request);
if (error != 0)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 1, 6:31 AM (9 h, 49 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28670070
Default Alt Text
D55253.diff (1 KB)
Attached To
Mode
D55253: hwpstate_amd(4): CPPC: Switch the default to maximum performance
Attached
Detach File
Event Timeline
Log In to Comment