File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -1057,27 +1057,28 @@ static void amd_pstate_epp_init(unsigned int cpu)
1057
1057
1058
1058
cpudata -> epp_policy = cpudata -> policy ;
1059
1059
1060
- if (cpudata -> policy == CPUFREQ_POLICY_PERFORMANCE ) {
1061
- epp = amd_pstate_get_epp (cpudata , value );
1062
- if (epp < 0 )
1063
- goto skip_epp ;
1064
- /* force the epp value to be zero for performance policy */
1065
- epp = 0 ;
1066
- } else {
1067
- /* Get BIOS pre-defined epp value */
1068
- epp = amd_pstate_get_epp (cpudata , value );
1069
- if (epp )
1070
- goto skip_epp ;
1060
+ /* Get BIOS pre-defined epp value */
1061
+ epp = amd_pstate_get_epp (cpudata , value );
1062
+ if (epp < 0 ) {
1063
+ /**
1064
+ * This return value can only be negative for shared_memory
1065
+ * systems where EPP register read/write not supported.
1066
+ */
1067
+ goto skip_epp ;
1071
1068
}
1069
+
1070
+ if (cpudata -> policy == CPUFREQ_POLICY_PERFORMANCE )
1071
+ epp = 0 ;
1072
+
1072
1073
/* Set initial EPP value */
1073
1074
if (boot_cpu_has (X86_FEATURE_CPPC )) {
1074
1075
value &= ~GENMASK_ULL (31 , 24 );
1075
1076
value |= (u64 )epp << 24 ;
1076
1077
}
1077
1078
1079
+ WRITE_ONCE (cpudata -> cppc_req_cached , value );
1078
1080
amd_pstate_set_epp (cpudata , epp );
1079
1081
skip_epp :
1080
- WRITE_ONCE (cpudata -> cppc_req_cached , value );
1081
1082
cpufreq_cpu_put (policy );
1082
1083
}
1083
1084
You can’t perform that action at this time.
0 commit comments