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 back earlier runtime PM changes for 6.19

+16 -17
-10
Documentation/power/runtime_pm.rst
··· 480 480 `bool pm_runtime_status_suspended(struct device *dev);` 481 481 - return true if the device's runtime PM status is 'suspended' 482 482 483 - `void pm_runtime_allow(struct device *dev);` 484 - - set the power.runtime_auto flag for the device and decrease its usage 485 - counter (used by the /sys/devices/.../power/control interface to 486 - effectively allow the device to be power managed at run time) 487 - 488 - `void pm_runtime_forbid(struct device *dev);` 489 - - unset the power.runtime_auto flag for the device and increase its usage 490 - counter (used by the /sys/devices/.../power/control interface to 491 - effectively prevent the device from being power managed at run time) 492 - 493 483 `void pm_runtime_no_callbacks(struct device *dev);` 494 484 - set the power.no_callbacks flag for the device and remove the runtime 495 485 PM attributes from /sys/devices/.../power (or prevent them from being
+16 -7
drivers/base/power/runtime.c
··· 90 90 /* 91 91 * Because ktime_get_mono_fast_ns() is not monotonic during 92 92 * timekeeping updates, ensure that 'now' is after the last saved 93 - * timesptamp. 93 + * timestamp. 94 94 */ 95 95 if (now < last) 96 96 return; ··· 217 217 * resume/suspend callback of any one of its ancestors(or the 218 218 * block device itself), the deadlock may be triggered inside the 219 219 * memory allocation since it might not complete until the block 220 - * device becomes active and the involed page I/O finishes. The 220 + * device becomes active and the involved page I/O finishes. The 221 221 * situation is pointed out first by Alan Stern. Network device 222 222 * are involved in iSCSI kind of situation. 223 223 * ··· 1210 1210 * 1211 1211 * Otherwise, if its runtime PM status is %RPM_ACTIVE and (1) @ign_usage_count 1212 1212 * is set, or (2) @dev is not ignoring children and its active child count is 1213 - * nonero, or (3) the runtime PM usage counter of @dev is not zero, increment 1213 + * nonzero, or (3) the runtime PM usage counter of @dev is not zero, increment 1214 1214 * the usage counter of @dev and return 1. 1215 1215 * 1216 1216 * Otherwise, return 0 without changing the usage counter. ··· 1664 1664 * pm_runtime_forbid - Block runtime PM of a device. 1665 1665 * @dev: Device to handle. 1666 1666 * 1667 - * Increase the device's usage count and clear its power.runtime_auto flag, 1668 - * so that it cannot be suspended at run time until pm_runtime_allow() is called 1669 - * for it. 1667 + * Resume @dev if already suspended and block runtime suspend of @dev in such 1668 + * a way that it can be unblocked via the /sys/devices/.../power/control 1669 + * interface, or otherwise by calling pm_runtime_allow(). 1670 + * 1671 + * Calling this function many times in a row has the same effect as calling it 1672 + * once. 1670 1673 */ 1671 1674 void pm_runtime_forbid(struct device *dev) 1672 1675 { ··· 1690 1687 * pm_runtime_allow - Unblock runtime PM of a device. 1691 1688 * @dev: Device to handle. 1692 1689 * 1693 - * Decrease the device's usage count and set its power.runtime_auto flag. 1690 + * Unblock runtime suspend of @dev after it has been blocked by 1691 + * pm_runtime_forbid() (for instance, if it has been blocked via the 1692 + * /sys/devices/.../power/control interface), check if @dev can be 1693 + * suspended and suspend it in that case. 1694 + * 1695 + * Calling this function many times in a row has the same effect as calling it 1696 + * once. 1694 1697 */ 1695 1698 void pm_runtime_allow(struct device *dev) 1696 1699 {