aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/power/disk.c
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-12-07 20:09:43 -0500
committerLen Brown <len.brown@intel.com>2008-02-01 18:30:55 -0500
commit23976728a48c3b76d34e17ead19addd52b3a280e (patch)
tree964eb95ae9dccb179165649c7ea631d96b23bc91 /kernel/power/disk.c
parent465d2b477f6a0ffe01242561a93e7bf81d67c776 (diff)
Hibernation: Update messages
Make hibernation messages start with one common prefix "PM: " and use the word "hibernation" in the messages as a synonym of "suspend to disk". Turn some KERN_INFO messages into debug ones. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Len Brown <len.brown@intel.com>
Diffstat (limited to 'kernel/power/disk.c')
-rw-r--r--kernel/power/disk.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c
index 3e24a200f1d4..64e42ab8b57c 100644
--- a/kernel/power/disk.c
+++ b/kernel/power/disk.c
@@ -191,8 +191,8 @@ int create_image(int platform_mode)
191 */ 191 */
192 error = device_power_down(PMSG_FREEZE); 192 error = device_power_down(PMSG_FREEZE);
193 if (error) { 193 if (error) {
194 printk(KERN_ERR "Some devices failed to power down, " 194 printk(KERN_ERR "PM: Some devices failed to power down, "
195 KERN_ERR "aborting suspend\n"); 195 "aborting hibernation\n");
196 goto Enable_irqs; 196 goto Enable_irqs;
197 } 197 }
198 198
@@ -203,7 +203,8 @@ int create_image(int platform_mode)
203 save_processor_state(); 203 save_processor_state();
204 error = swsusp_arch_suspend(); 204 error = swsusp_arch_suspend();
205 if (error) 205 if (error)
206 printk(KERN_ERR "Error %d while creating the image\n", error); 206 printk(KERN_ERR "PM: Error %d creating hibernation image\n",
207 error);
207 /* Restore control flow magically appears here */ 208 /* Restore control flow magically appears here */
208 restore_processor_state(); 209 restore_processor_state();
209 if (!in_suspend) 210 if (!in_suspend)
@@ -289,7 +290,7 @@ static int resume_target_kernel(void)
289 local_irq_disable(); 290 local_irq_disable();
290 error = device_power_down(PMSG_PRETHAW); 291 error = device_power_down(PMSG_PRETHAW);
291 if (error) { 292 if (error) {
292 printk(KERN_ERR "Some devices failed to power down, " 293 printk(KERN_ERR "PM: Some devices failed to power down, "
293 "aborting resume\n"); 294 "aborting resume\n");
294 goto Enable_irqs; 295 goto Enable_irqs;
295 } 296 }
@@ -438,7 +439,7 @@ static void power_down(void)
438 * Valid image is on the disk, if we continue we risk serious data 439 * Valid image is on the disk, if we continue we risk serious data
439 * corruption after resume. 440 * corruption after resume.
440 */ 441 */
441 printk(KERN_CRIT "Please power me down manually\n"); 442 printk(KERN_CRIT "PM: Please power down manually\n");
442 while(1); 443 while(1);
443} 444}
444 445
@@ -484,7 +485,7 @@ int hibernate(void)
484 if (error) 485 if (error)
485 goto Exit; 486 goto Exit;
486 487
487 printk("Syncing filesystems ... "); 488 printk(KERN_INFO "PM: Syncing filesystems ... ");
488 sys_sync(); 489 sys_sync();
489 printk("done.\n"); 490 printk("done.\n");
490 491
@@ -560,10 +561,11 @@ static int software_resume(void)
560 return -ENOENT; 561 return -ENOENT;
561 } 562 }
562 swsusp_resume_device = name_to_dev_t(resume_file); 563 swsusp_resume_device = name_to_dev_t(resume_file);
563 pr_debug("swsusp: Resume From Partition %s\n", resume_file); 564 pr_debug("PM: Resume from partition %s\n", resume_file);
564 } else { 565 } else {
565 pr_debug("swsusp: Resume From Partition %d:%d\n", 566 pr_debug("PM: Resume from partition %d:%d\n",
566 MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device)); 567 MAJOR(swsusp_resume_device),
568 MINOR(swsusp_resume_device));
567 } 569 }
568 570
569 if (noresume) { 571 if (noresume) {
@@ -575,7 +577,7 @@ static int software_resume(void)
575 return 0; 577 return 0;
576 } 578 }
577 579
578 pr_debug("PM: Checking swsusp image.\n"); 580 pr_debug("PM: Checking hibernation image.\n");
579 error = swsusp_check(); 581 error = swsusp_check();
580 if (error) 582 if (error)
581 goto Unlock; 583 goto Unlock;
@@ -601,7 +603,7 @@ static int software_resume(void)
601 goto Done; 603 goto Done;
602 } 604 }
603 605
604 pr_debug("PM: Reading swsusp image.\n"); 606 pr_debug("PM: Reading hibernation image.\n");
605 607
606 error = swsusp_read(&flags); 608 error = swsusp_read(&flags);
607 if (!error) 609 if (!error)
@@ -728,7 +730,7 @@ static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr,
728 error = -EINVAL; 730 error = -EINVAL;
729 731
730 if (!error) 732 if (!error)
731 pr_debug("PM: suspend-to-disk mode set to '%s'\n", 733 pr_debug("PM: Hibernation mode set to '%s'\n",
732 hibernation_modes[mode]); 734 hibernation_modes[mode]);
733 mutex_unlock(&pm_mutex); 735 mutex_unlock(&pm_mutex);
734 return error ? error : n; 736 return error ? error : n;
@@ -760,7 +762,7 @@ static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr,
760 mutex_lock(&pm_mutex); 762 mutex_lock(&pm_mutex);
761 swsusp_resume_device = res; 763 swsusp_resume_device = res;
762 mutex_unlock(&pm_mutex); 764 mutex_unlock(&pm_mutex);
763 printk("Attempting manual resume\n"); 765 printk(KERN_INFO "PM: Starting manual resume from disk\n");
764 noresume = 0; 766 noresume = 0;
765 software_resume(); 767 software_resume();
766 ret = n; 768 ret = n;