Skip to content

Commit bd9635c

Browse files
AkaiEurusrafaeljw
authored andcommitted
PM: sleep: wakeirq: Update outdated documentation comments
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: c46a0d5 ("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>
1 parent 9b1b3dc commit bd9635c

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

drivers/base/power/wakeirq.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,10 @@ EXPORT_SYMBOL_GPL(dev_pm_set_dedicated_wake_irq_reverse);
273273
* otherwise try to disable already disabled wakeirq. The wake-up interrupt
274274
* starts disabled with IRQ_NOAUTOEN set.
275275
*
276-
* Should be only called from rpm_suspend() and rpm_resume() path.
277-
* Caller must hold &dev->power.lock to change wirq->status
276+
* Should be called from rpm_suspend(), rpm_resume(),
277+
* pm_runtime_force_suspend() or pm_runtime_force_resume().
278+
* Caller must hold &dev->power.lock or disable runtime PM to change
279+
* wirq->status.
278280
*/
279281
void dev_pm_enable_wake_irq_check(struct device *dev,
280282
bool can_change_status)
@@ -306,7 +308,8 @@ void dev_pm_enable_wake_irq_check(struct device *dev,
306308
* @cond_disable: if set, also check WAKE_IRQ_DEDICATED_REVERSE
307309
*
308310
* Disables wake-up interrupt conditionally based on status.
309-
* Should be only called from rpm_suspend() and rpm_resume() path.
311+
* Should be called from rpm_suspend(), rpm_resume(),
312+
* pm_runtime_force_suspend() or pm_runtime_force_resume().
310313
*/
311314
void dev_pm_disable_wake_irq_check(struct device *dev, bool cond_disable)
312315
{
@@ -332,7 +335,7 @@ void dev_pm_disable_wake_irq_check(struct device *dev, bool cond_disable)
332335
* enable wake IRQ after running ->runtime_suspend() which depends on
333336
* WAKE_IRQ_DEDICATED_REVERSE.
334337
*
335-
* Should be only called from rpm_suspend() path.
338+
* Should be called from rpm_suspend() or pm_runtime_force_suspend().
336339
*/
337340
void dev_pm_enable_wake_irq_complete(struct device *dev)
338341
{

0 commit comments

Comments
 (0)