Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pm-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fix from Rafael Wysocki:
"Fix the asymmetric CPU capacity support code in the intel_pstate
driver, added during this develompent cycle, to address a corner case
in which the capacity of a CPU going online is not updated (Rafael
Wysocki)"

* tag 'pm-6.12-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
cpufreq: intel_pstate: Update asym capacity for CPUs that were offline initially
cpufreq: intel_pstate: Clear hybrid_max_perf_cpu before driver registration

+23 -3
+23 -3
drivers/cpufreq/intel_pstate.c
··· 1034 1034 hybrid_update_cpu_capacity_scaling(); 1035 1035 } 1036 1036 1037 - static void hybrid_init_cpu_capacity_scaling(void) 1037 + static void hybrid_init_cpu_capacity_scaling(bool refresh) 1038 1038 { 1039 1039 bool disable_itmt = false; 1040 1040 ··· 1045 1045 * scaling has been enabled already and the driver is just changing the 1046 1046 * operation mode. 1047 1047 */ 1048 - if (hybrid_max_perf_cpu) { 1048 + if (refresh) { 1049 1049 __hybrid_init_cpu_capacity_scaling(); 1050 1050 goto unlock; 1051 1051 } ··· 1069 1069 */ 1070 1070 if (disable_itmt) 1071 1071 sched_clear_itmt_support(); 1072 + } 1073 + 1074 + static bool hybrid_clear_max_perf_cpu(void) 1075 + { 1076 + bool ret; 1077 + 1078 + guard(mutex)(&hybrid_capacity_lock); 1079 + 1080 + ret = !!hybrid_max_perf_cpu; 1081 + hybrid_max_perf_cpu = NULL; 1082 + 1083 + return ret; 1072 1084 } 1073 1085 1074 1086 static void __intel_pstate_get_hwp_cap(struct cpudata *cpu) ··· 2275 2263 } else { 2276 2264 cpu->pstate.scaling = perf_ctl_scaling; 2277 2265 } 2266 + /* 2267 + * If the CPU is going online for the first time and it was 2268 + * offline initially, asym capacity scaling needs to be updated. 2269 + */ 2270 + hybrid_update_capacity(cpu); 2278 2271 } else { 2279 2272 cpu->pstate.scaling = perf_ctl_scaling; 2280 2273 cpu->pstate.max_pstate = pstate_funcs.get_max(cpu->cpu); ··· 3369 3352 3370 3353 static int intel_pstate_register_driver(struct cpufreq_driver *driver) 3371 3354 { 3355 + bool refresh_cpu_cap_scaling; 3372 3356 int ret; 3373 3357 3374 3358 if (driver == &intel_pstate) ··· 3382 3364 3383 3365 arch_set_max_freq_ratio(global.turbo_disabled); 3384 3366 3367 + refresh_cpu_cap_scaling = hybrid_clear_max_perf_cpu(); 3368 + 3385 3369 intel_pstate_driver = driver; 3386 3370 ret = cpufreq_register_driver(intel_pstate_driver); 3387 3371 if (ret) { ··· 3393 3373 3394 3374 global.min_perf_pct = min_perf_pct_min(); 3395 3375 3396 - hybrid_init_cpu_capacity_scaling(); 3376 + hybrid_init_cpu_capacity_scaling(refresh_cpu_cap_scaling); 3397 3377 3398 3378 return 0; 3399 3379 }