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

Pull power management fixes from Rafael Wysocki:
"These fix a race condition and an ordering issue related to using
device links in the runtime PM framework and two kerneldoc comments in
cpufreq.

Specifics:

- Fix race condition related to the handling of supplier devices
during consumer device probe and fix the order of decrementation of
two related reference counters in the runtime PM core code handling
supplier devices (Adrian Hunter).

- Fix kerneldoc comments in cpufreq that have not been updated along
with the functions documented by them (Geert Uytterhoeven)"

* tag 'pm-5.12-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
PM: runtime: Fix race getting/putting suppliers at probe
PM: runtime: Fix ordering in pm_runtime_get_suppliers()
cpufreq: Fix scaling_{available,boost}_frequencies_show() comments

+10 -4
+8 -2
drivers/base/power/runtime.c
··· 1690 1690 device_links_read_lock_held()) 1691 1691 if (link->flags & DL_FLAG_PM_RUNTIME) { 1692 1692 link->supplier_preactivated = true; 1693 - refcount_inc(&link->rpm_active); 1694 1693 pm_runtime_get_sync(link->supplier); 1694 + refcount_inc(&link->rpm_active); 1695 1695 } 1696 1696 1697 1697 device_links_read_unlock(idx); ··· 1704 1704 void pm_runtime_put_suppliers(struct device *dev) 1705 1705 { 1706 1706 struct device_link *link; 1707 + unsigned long flags; 1708 + bool put; 1707 1709 int idx; 1708 1710 1709 1711 idx = device_links_read_lock(); ··· 1714 1712 device_links_read_lock_held()) 1715 1713 if (link->supplier_preactivated) { 1716 1714 link->supplier_preactivated = false; 1717 - if (refcount_dec_not_one(&link->rpm_active)) 1715 + spin_lock_irqsave(&dev->power.lock, flags); 1716 + put = pm_runtime_status_suspended(dev) && 1717 + refcount_dec_not_one(&link->rpm_active); 1718 + spin_unlock_irqrestore(&dev->power.lock, flags); 1719 + if (put) 1718 1720 pm_runtime_put(link->supplier); 1719 1721 } 1720 1722
+2 -2
drivers/cpufreq/freq_table.c
··· 267 267 __ATTR_RO(_name##_frequencies) 268 268 269 269 /* 270 - * show_scaling_available_frequencies - show available normal frequencies for 270 + * scaling_available_frequencies_show - show available normal frequencies for 271 271 * the specified CPU 272 272 */ 273 273 static ssize_t scaling_available_frequencies_show(struct cpufreq_policy *policy, ··· 279 279 EXPORT_SYMBOL_GPL(cpufreq_freq_attr_scaling_available_freqs); 280 280 281 281 /* 282 - * show_available_boost_freqs - show available boost frequencies for 282 + * scaling_boost_frequencies_show - show available boost frequencies for 283 283 * the specified CPU 284 284 */ 285 285 static ssize_t scaling_boost_frequencies_show(struct cpufreq_policy *policy,