PM / Runtime: Don't run callbacks under lock for power.irq_safe set
authorRafael J. Wysocki <rjw@sisk.pl>
Tue, 27 Sep 2011 19:54:52 +0000 (21:54 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Tue, 27 Sep 2011 19:54:52 +0000 (21:54 +0200)
commitad3c36a534bc7b945d7bffdda1c62e13bf93489a
tree5f7520f575891716577de33176713b8cb13a22d5
parent30b1a7a32ca48fd8758f8ca44d60deebc0aa3d72
PM / Runtime: Don't run callbacks under lock for power.irq_safe set

The rpm_suspend() and rpm_resume() routines execute subsystem or PM
domain callbacks under power.lock if power.irq_safe is set for the
given device.  This is inconsistent with that rpm_idle() does after
commit 02b2677 (PM / Runtime: Allow _put_sync() from
interrupts-disabled context) and is problematic for subsystems and PM
domains wanting to use power.lock for synchronization in their
runtime PM callbacks.

This change requires the code checking if the device's runtime PM
status is RPM_SUSPENDING or RPM_RESUMING to be modified too, to take
the power.irq_safe set case into account (that code wasn't reachable
before with power.irq_safe set, because it's executed with the
device's power.lock held).

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Ming Lei <tom.leiming@gmail.com>
Reviewed-by: Kevin Hilman <khilman@ti.com>
drivers/base/power/runtime.c
This page took 0.025158 seconds and 5 git commands to generate.