PM / sleep: Add pm_debug_messages boot command control
Subsystems (3)
PATCH v2 1/1 PM / sleep: Add pm_debug_messages boot command control
Debug messages from the system suspend/hibernation infrastructure is disabled by default, and can only be enabled after the system has boot up via /sys/power/pm_debug_messages. This makes the hibernation resume hard to track as it involves system boot up across hibernation. There's no chance for software_resume() to track the resume process, eg.
Turning on the pm_debug_messages during boot up by appending 'pm_debug_message'.
---
v2: According to Randy's suggestion, add the command line
option to Documentation/admin-guide/kernel-parameters.txt
--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/power/main.c | 7 +++++++ 2 files changed, 10 insertions(+)
Documentation/admin-guide/kernel-parameters.txt +3 -0
@@ -3698,6 +3698,9 @@ Override pmtimer IOPort with a hex value. e.g. pmtmr=0x508 + pm_debug_message [SUSPEND,KNL] + Enable suspend/resume debug messages during boot up. + pnp.debug=1 [PNP] Enable PNP debug messages (depends on the CONFIG_PNP_DEBUG_MESSAGES option). Change at run-time
kernel/power/main.c +7 -0
@@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj,power_attr (pm_debug_messages); +static int __init pm_debug_message_setup (char *str) +{ + pm_debug_messages_on = true; +return 1 ; +} +__setup ("pm_debug_message" , pm_debug_message_setup); +/** * __pm_pr_dbg - Print a suspend debug message to the kernel log. * @defer: Whether or not to use printk_deferred() to print the message.
Signature · 1 line
2.17.1
Rafael J. Wysocki
maintainerQuoted 43 lines · Chen Yu
Debug messages from the system suspend/hibernation infrastructure is disabled by default, and can only be enabled after the system has boot up via
/sys/power/pm_debug_messages. This makes the hibernation resume hard to track as it involves system boot up across hibernation. There's no chance forsoftware_resume()to track the resume process, eg.Turning on the
pm_debug_messagesduring boot up by appending 'pm_debug_message'.Cc "Rafael J. Wysocki" <[email protected]>Cc Len Brown <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Randy Dunlap <[email protected]>Signed-off-by Chen Yu <[email protected]>---
v2: According to Randy's suggestion, add the command line
option toDocumentation/admin-guide/kernel-parameters.txt--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/power/main.c | 7 +++++++ 2 files changed, 10 insertions(+)Documentation/admin-guide/kernel-parameters.txt +3
-0@@ -3698,6 +3698,9 @@ Override pmtimer IOPort with a hex value. e.g. pmtmr=0x508 + pm_debug_message [SUSPEND,KNL] + Enable suspend/resume debug messages during boot up. + pnp.debug=1 [PNP] Enable PNP debug messages (depends on the CONFIG_PNP_DEBUG_MESSAGES option). Change at run-timekernel/power/main.c +0
-0
kernel/power/main.c static ssize_t pm_debug_messages_store(struct kobject *kobj, · line 543
Quoted 9 lines
kernel/power/main.c +6
-0@@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj,power_attr (pm_debug_messages); +static int __init pm_debug_message_setup (char *str) +{ + pm_debug_messages_on = true; +return 1 ; +} +__setup ("pm_debug_message" , pm_debug_message_setup);
I'd call this "pm_debug_messages" (just like the sysfs knob) and rename the rest accordingly.
Quoted 5 lines
kernel/power/main.c +1
-1+/** * __pm_pr_dbg - Print a suspend debug message to the kernel log. * @defer: Whether or not to use printk_deferred() to print the message. --
Hi Rafael,
Quoted 5 lines · Rafael J. Wysocki
Quoted 1 line · Chen Yu
+__setup("pm_debug_message",
pm_debug_message_setup);I'd call this "
pm_debug_messages" (just like the sysfs knob) and rename the rest accordingly.
Okay, I'll do in next version.
Thanks,
Chenyu
Quoted 28 lines · Chen Yu
Debug messages from the system suspend/hibernation infrastructure is disabled by default, and can only be enabled after the system has boot up via
/sys/power/pm_debug_messages. This makes the hibernation resume hard to track as it involves system boot up across hibernation. There's no chance forsoftware_resume()to track the resume process, eg.Turning on the
pm_debug_messagesduring boot up by appending 'pm_debug_message'.Cc "Rafael J. Wysocki" <[email protected]>Cc Len Brown <[email protected]>Cc Andy Shevchenko <[email protected]>Cc Randy Dunlap <[email protected]>Signed-off-by Chen Yu <[email protected]>---
v2: According to Randy's suggestion, add the command line
option toDocumentation/admin-guide/kernel-parameters.txt--- Documentation/admin-guide/kernel-parameters.txt | 3 +++ kernel/power/main.c | 7 +++++++ 2 files changed, 10 insertions(+)Documentation/admin-guide/kernel-parameters.txt +0
-0
Documentation/admin-guide/kernel-parameters.txt line 3706
Quoted 9 lines
Documentation/admin-guide/kernel-parameters.txt +3
-0@@ -3698,6 +3698,9 @@ Override pmtimer IOPort with a hex value. e.g. pmtmr=0x508 + pm_debug_message [SUSPEND,KNL] + Enable suspend/resume debug messages during boot up. + pnp.debug=1 [PNP] Enable PNP debug messages (depends on the CONFIG_PNP_DEBUG_MESSAGES option). Change at
See?
So this should be pm.debug=1 for consistency?
Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html