aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/power/runtime_pm.txt
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2011-08-08 17:39:36 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2011-08-14 07:35:52 -0400
commit311aab73d273eb22be976055f6cab224f7279d5e (patch)
tree14ef310eb77cac8d85c85b3ed006713e4602ec8f /Documentation/power/runtime_pm.txt
parent17f2ae7f677f023997e02fd2ebabd90ea2a0390d (diff)
PM / Runtime: Add might_sleep() to runtime PM functions
Some of the entry points to pm runtime are not safe to call in atomic context unless pm_runtime_irq_safe() has been called. Inspecting the code, it is not immediately obvious that the functions sleep at all, as they run inside a spin_lock_irqsave, but under some conditions they can drop the lock and turn on irqs. If a driver incorrectly calls the pm_runtime apis, it can cause sleeping and irq processing when it expects to stay in atomic context. Add might_sleep_if to the majority of the __pm_runtime_* entry points to enforce correct usage. Add pm_runtime_put_sync_autosuspend to the list of functions that can be called in atomic context. Signed-off-by: Colin Cross <ccross@android.com> Reviewed-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'Documentation/power/runtime_pm.txt')
-rw-r--r--Documentation/power/runtime_pm.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/Documentation/power/runtime_pm.txt b/Documentation/power/runtime_pm.txt
index 4ce5450ab6e8..62f37bc3866f 100644
--- a/Documentation/power/runtime_pm.txt
+++ b/Documentation/power/runtime_pm.txt
@@ -484,6 +484,7 @@ pm_runtime_resume()
484pm_runtime_get_sync() 484pm_runtime_get_sync()
485pm_runtime_put_sync() 485pm_runtime_put_sync()
486pm_runtime_put_sync_suspend() 486pm_runtime_put_sync_suspend()
487pm_runtime_put_sync_autosuspend()
487 488
4885. Runtime PM Initialization, Device Probing and Removal 4895. Runtime PM Initialization, Device Probing and Removal
489 490