summaryrefslogtreecommitdiff
path: root/arch/powerpc/sysdev/fsl_soc.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2011-07-11 22:39:29 (GMT)
committerRafael J. Wysocki <rjw@sisk.pl>2011-07-11 22:39:29 (GMT)
commit17b75eca7683d4942f4d8d00563fd15f37c39589 (patch)
tree539ee88f2c4008eec206ca98cec54263deeae708 /arch/powerpc/sysdev/fsl_soc.c
parentb6c10c84665912985d0bf9b6ae8ce19fc4298d9f (diff)
downloadlinux-fsl-qoriq-17b75eca7683d4942f4d8d00563fd15f37c39589.tar.xz
PM / Domains: Do not execute device callbacks under locks
Currently, the .start_device() and .stop_device() callbacks from struct generic_pm_domain() as well as the device drivers' runtime PM callbacks used by the generic PM domains code are executed under the generic PM domain lock. This, unfortunately, is prone to deadlocks, for example if a device and its parent are boths members of the same PM domain. For this reason, it would be better if the PM domains code didn't execute device callbacks under the lock. Rework the locking in the generic PM domains code so that the lock is dropped for the execution of device callbacks. To this end, introduce PM domains states reflecting the current status of a PM domain and such that the PM domain lock cannot be acquired if the status is GPD_STATE_BUSY. Make threads attempting to acquire a PM domain's lock wait until the status changes to either GPD_STATE_ACTIVE or GPD_STATE_POWER_OFF. This change by itself doesn't fix the deadlock problem mentioned above, but the mechanism introduced by it will be used for for this purpose by a subsequent patch. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'arch/powerpc/sysdev/fsl_soc.c')
0 files changed, 0 insertions, 0 deletions