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-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull power management fixes from Rafael Wysocki:
"These fix a CPU hot-add issue in the cpufreq core, fix a comment in
the cpufreq core code and update its documentation, and disable the
DTPM (Dynamic Thermal Power Management) code for the time being to
prevent it from causing issues to appear.

Specifics:

- Disable DTPM for this cycle to prevent it from causing issues to
appear on otherwise functional systems (Daniel Lezcano)

- Fix cpufreq sysfs interface failure related to physical CPU hot-add
(Xiongfeng Wang)

- Fix comment in cpufreq core and update its documentation (Tang
Yizhou)"

* tag 'pm-5.16-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
powercap: DTPM: Drop unused local variable from init_dtpm()
cpufreq: docs: Update core.rst
cpufreq: Fix a comment in cpufreq_policy_free
powercap/drivers/dtpm: Disable DTPM at boot time
cpufreq: Fix get_cpu_device() failure in add_cpu_dev_symlink()

+10 -15
+3 -3
Documentation/cpu-freq/core.rst
··· 73 73 The third argument is a struct cpufreq_freqs with the following 74 74 values: 75 75 76 - ===== =========================== 77 - cpu number of the affected CPU 76 + ====== ====================================== 77 + policy a pointer to the struct cpufreq_policy 78 78 old old frequency 79 79 new new frequency 80 80 flags flags of the cpufreq driver 81 - ===== =========================== 81 + ====== ====================================== 82 82 83 83 3. CPUFreq Table Generation with Operating Performance Point (OPP) 84 84 ==================================================================
+7 -7
drivers/cpufreq/cpufreq.c
··· 1004 1004 .release = cpufreq_sysfs_release, 1005 1005 }; 1006 1006 1007 - static void add_cpu_dev_symlink(struct cpufreq_policy *policy, unsigned int cpu) 1007 + static void add_cpu_dev_symlink(struct cpufreq_policy *policy, unsigned int cpu, 1008 + struct device *dev) 1008 1009 { 1009 - struct device *dev = get_cpu_device(cpu); 1010 - 1011 1010 if (unlikely(!dev)) 1012 1011 return; 1013 1012 ··· 1295 1296 1296 1297 if (policy->max_freq_req) { 1297 1298 /* 1298 - * CPUFREQ_CREATE_POLICY notification is sent only after 1299 - * successfully adding max_freq_req request. 1299 + * Remove max_freq_req after sending CPUFREQ_REMOVE_POLICY 1300 + * notification, since CPUFREQ_CREATE_POLICY notification was 1301 + * sent after adding max_freq_req earlier. 1300 1302 */ 1301 1303 blocking_notifier_call_chain(&cpufreq_policy_notifier_list, 1302 1304 CPUFREQ_REMOVE_POLICY, policy); ··· 1391 1391 if (new_policy) { 1392 1392 for_each_cpu(j, policy->related_cpus) { 1393 1393 per_cpu(cpufreq_cpu_data, j) = policy; 1394 - add_cpu_dev_symlink(policy, j); 1394 + add_cpu_dev_symlink(policy, j, get_cpu_device(j)); 1395 1395 } 1396 1396 1397 1397 policy->min_freq_req = kzalloc(2 * sizeof(*policy->min_freq_req), ··· 1565 1565 /* Create sysfs link on CPU registration */ 1566 1566 policy = per_cpu(cpufreq_cpu_data, cpu); 1567 1567 if (policy) 1568 - add_cpu_dev_symlink(policy, cpu); 1568 + add_cpu_dev_symlink(policy, cpu, dev); 1569 1569 1570 1570 return 0; 1571 1571 }
-5
drivers/powercap/dtpm.c
··· 463 463 464 464 static int __init init_dtpm(void) 465 465 { 466 - struct dtpm_descr *dtpm_descr; 467 - 468 466 pct = powercap_register_control_type(NULL, "dtpm", NULL); 469 467 if (IS_ERR(pct)) { 470 468 pr_err("Failed to register control type\n"); 471 469 return PTR_ERR(pct); 472 470 } 473 - 474 - for_each_dtpm_table(dtpm_descr) 475 - dtpm_descr->init(); 476 471 477 472 return 0; 478 473 }