]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
PM: sleep: wakeirq: Update outdated documentation comments
authorWang Jiayue <akaieurus@gmail.com>
Fri, 6 Feb 2026 09:23:17 +0000 (17:23 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Wed, 11 Feb 2026 20:13:01 +0000 (21:13 +0100)
The comments claiming that dev_pm_*wake_irq*() helpers must be called
with dev->power.lock held and only from rpm_suspend/resume paths are not
accurate any mote, since pm_runtime_force_suspend/resume() call them
locklessly.

Update the comments to match the code.

Reported-by: Gui-Dong Han <hanguidong02@gmail.com>
Closes: https://lore.kernel.org/all/CAJZ5v0jN9fU9NdWqc-+F5hiSEP4JkR=_qcdGzzHtk1i5tvCDbQ@mail.gmail.com/
Fixes: c46a0d5ae4f9 ("PM: runtime: Extend support for wakeirq for force_suspend|resume")
Signed-off-by: Wang Jiayue <akaieurus@gmail.com>
[ rjw: Changelog edits ]
Link: https://patch.msgid.link/20260206092317.148885-1-akaieurus@gmail.com
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/base/power/wakeirq.c

index c0809d18fc5406b224206e0c8e5028aa8f4183b0..aab843f6dfccb0df942d6f88c2efdf42c6616c3d 100644 (file)
@@ -273,8 +273,10 @@ EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq_reverse);
  * otherwise try to disable already disabled wakeirq. The wake-up interrupt
  * starts disabled with IRQ_NOAUTOEN set.
  *
- * Should be only called from rpm_suspend() and rpm_resume() path.
- * Caller must hold &dev->power.lock to change wirq->status
+ * Should be called from rpm_suspend(), rpm_resume(),
+ * pm_runtime_force_suspend() or pm_runtime_force_resume().
+ * Caller must hold &dev->power.lock or disable runtime PM to change
+ * wirq->status.
  */
 void dev_pm_enable_wake_irq_check(struct device *dev,
                                  bool can_change_status)
@@ -306,7 +308,8 @@ enable:
  * @cond_disable: if set, also check WAKE_IRQ_DEDICATED_REVERSE
  *
  * Disables wake-up interrupt conditionally based on status.
- * Should be only called from rpm_suspend() and rpm_resume() path.
+ * Should be called from rpm_suspend(), rpm_resume(),
+ * pm_runtime_force_suspend() or pm_runtime_force_resume().
  */
 void dev_pm_disable_wake_irq_check(struct device *dev, bool cond_disable)
 {
@@ -332,7 +335,7 @@ void dev_pm_disable_wake_irq_check(struct device *dev, bool cond_disable)
  * enable wake IRQ after running ->runtime_suspend() which depends on
  * WAKE_IRQ_DEDICATED_REVERSE.
  *
- * Should be only called from rpm_suspend() path.
+ * Should be called from rpm_suspend() or pm_runtime_force_suspend().
  */
 void dev_pm_enable_wake_irq_complete(struct device *dev)
 {