|
@@ -338,7 +338,7 @@ static int create_image(int platform_mode)
|
|
* hibernation_snapshot - Quiesce devices and create a hibernation image.
|
|
* hibernation_snapshot - Quiesce devices and create a hibernation image.
|
|
* @platform_mode: If set, use platform driver to prepare for the transition.
|
|
* @platform_mode: If set, use platform driver to prepare for the transition.
|
|
*
|
|
*
|
|
- * This routine must be called with pm_mutex held.
|
|
|
|
|
|
+ * This routine must be called with system_transition_mutex held.
|
|
*/
|
|
*/
|
|
int hibernation_snapshot(int platform_mode)
|
|
int hibernation_snapshot(int platform_mode)
|
|
{
|
|
{
|
|
@@ -500,8 +500,9 @@ static int resume_target_kernel(bool platform_mode)
|
|
* hibernation_restore - Quiesce devices and restore from a hibernation image.
|
|
* hibernation_restore - Quiesce devices and restore from a hibernation image.
|
|
* @platform_mode: If set, use platform driver to prepare for the transition.
|
|
* @platform_mode: If set, use platform driver to prepare for the transition.
|
|
*
|
|
*
|
|
- * This routine must be called with pm_mutex held. If it is successful, control
|
|
|
|
- * reappears in the restored target kernel in hibernation_snapshot().
|
|
|
|
|
|
+ * This routine must be called with system_transition_mutex held. If it is
|
|
|
|
+ * successful, control reappears in the restored target kernel in
|
|
|
|
+ * hibernation_snapshot().
|
|
*/
|
|
*/
|
|
int hibernation_restore(int platform_mode)
|
|
int hibernation_restore(int platform_mode)
|
|
{
|
|
{
|
|
@@ -806,13 +807,13 @@ static int software_resume(void)
|
|
* name_to_dev_t() below takes a sysfs buffer mutex when sysfs
|
|
* name_to_dev_t() below takes a sysfs buffer mutex when sysfs
|
|
* is configured into the kernel. Since the regular hibernate
|
|
* is configured into the kernel. Since the regular hibernate
|
|
* trigger path is via sysfs which takes a buffer mutex before
|
|
* trigger path is via sysfs which takes a buffer mutex before
|
|
- * calling hibernate functions (which take pm_mutex) this can
|
|
|
|
- * cause lockdep to complain about a possible ABBA deadlock
|
|
|
|
|
|
+ * calling hibernate functions (which take system_transition_mutex)
|
|
|
|
+ * this can cause lockdep to complain about a possible ABBA deadlock
|
|
* which cannot happen since we're in the boot code here and
|
|
* which cannot happen since we're in the boot code here and
|
|
* sysfs can't be invoked yet. Therefore, we use a subclass
|
|
* sysfs can't be invoked yet. Therefore, we use a subclass
|
|
* here to avoid lockdep complaining.
|
|
* here to avoid lockdep complaining.
|
|
*/
|
|
*/
|
|
- mutex_lock_nested(&pm_mutex, SINGLE_DEPTH_NESTING);
|
|
|
|
|
|
+ mutex_lock_nested(&system_transition_mutex, SINGLE_DEPTH_NESTING);
|
|
|
|
|
|
if (swsusp_resume_device)
|
|
if (swsusp_resume_device)
|
|
goto Check_image;
|
|
goto Check_image;
|
|
@@ -900,7 +901,7 @@ static int software_resume(void)
|
|
atomic_inc(&snapshot_device_available);
|
|
atomic_inc(&snapshot_device_available);
|
|
/* For success case, the suspend path will release the lock */
|
|
/* For success case, the suspend path will release the lock */
|
|
Unlock:
|
|
Unlock:
|
|
- mutex_unlock(&pm_mutex);
|
|
|
|
|
|
+ mutex_unlock(&system_transition_mutex);
|
|
pm_pr_dbg("Hibernation image not present or could not be loaded.\n");
|
|
pm_pr_dbg("Hibernation image not present or could not be loaded.\n");
|
|
return error;
|
|
return error;
|
|
Close_Finish:
|
|
Close_Finish:
|