diff options
author | Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com> | 2011-12-06 23:24:38 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-12-08 23:22:21 +0100 |
commit | 9b6fc5dc879bc90f765db0e95eefcf123d0d06dd (patch) | |
tree | 1ccae80c48070963c2296a6e4c6d98107a0efbbf /kernel/power | |
parent | 33e638b9070ba5e8812836e20390da6a6af13900 (diff) | |
download | linux-9b6fc5dc879bc90f765db0e95eefcf123d0d06dd.tar.bz2 |
PM / Sleep: Make [un]lock_system_sleep() generic
The [un]lock_system_sleep() APIs were originally introduced to mutually
exclude memory hotplug and hibernation.
Directly using mutex_lock(&pm_mutex) to achieve mutual exclusion with
suspend or hibernation code can lead to freezing failures. However, the
APIs [un]lock_system_sleep() can be safely used to achieve the same,
without causing freezing failures.
So, since it would be beneficial to modify all the existing users of
mutex_lock(&pm_mutex) (in all parts of the kernel), so that they use these
safe APIs intead, make these APIs generic by removing the restriction that
they work only when CONFIG_HIBERNATE_CALLBACKS is set. Moreover, that
restriction didn't buy us anything anyway.
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Diffstat (limited to 'kernel/power')
0 files changed, 0 insertions, 0 deletions