diff --git a/drivers/base/dd.c b/drivers/base/dd.c index 11b0fb6414d3..d7b9aff3718e 100644 --- a/drivers/base/dd.c +++ b/drivers/base/dd.c @@ -732,10 +732,14 @@ int driver_probe_done(void) void wait_for_device_probe(void) { /* wait for the deferred probe workqueue to finish */ + pr_info("Calling flush_work(&deferred_probe_work)\n"); flush_work(&deferred_probe_work); /* wait for the known devices to complete their probing */ - wait_event(probe_waitqueue, atomic_read(&probe_count) == 0); + pr_info("Calling wait_event(probe_waitqueue)\n"); + while (wait_event_timeout(probe_waitqueue, atomic_read(&probe_count) == 0, HZ) == 0) + pr_info("Calling probe_count=%d\n", atomic_read(&probe_count)); + pr_info("Calling async_synchronize_full()\n"); async_synchronize_full(); } EXPORT_SYMBOL_GPL(wait_for_device_probe); diff --git a/kernel/power/user.c b/kernel/power/user.c index ad241b4ff64c..f3106d826723 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -52,6 +52,7 @@ static int snapshot_open(struct inode *inode, struct file *filp) return -EPERM; lock_system_sleep(); + pr_info("Held system_transition_mutex.\n"); if (!hibernate_acquire()) { error = -EBUSY; @@ -72,18 +73,22 @@ static int snapshot_open(struct inode *inode, struct file *filp) data->swap = swap_type_of(swsusp_resume_device, 0); data->mode = O_RDONLY; data->free_bitmaps = false; + pr_info("Calling pm_notifier_call_chain_robust(HIBERNATION)\n"); error = pm_notifier_call_chain_robust(PM_HIBERNATION_PREPARE, PM_POST_HIBERNATION); } else { /* * Resuming. We may need to wait for the image device to * appear. */ + pr_info("Calling wait_for_device_probe()\n"); wait_for_device_probe(); data->swap = -1; data->mode = O_WRONLY; + pr_info("Calling pm_notifier_call_chain_robust(RESTORE)\n"); error = pm_notifier_call_chain_robust(PM_RESTORE_PREPARE, PM_POST_RESTORE); if (!error) { + pr_info("Calling create_basic_memory_bitmaps()\n"); error = create_basic_memory_bitmaps(); data->free_bitmaps = !error; } @@ -97,6 +102,7 @@ static int snapshot_open(struct inode *inode, struct file *filp) data->dev = 0; Unlock: + pr_info("Released system_transition_mutex.\n"); unlock_system_sleep(); return error;