diff options
author | 2020-04-02 15:56:52 +0800 | |
---|---|---|
committer | 2020-04-02 15:29:56 +0200 | |
commit | db96a75946d3a2a41092c83992e65f727cd35529 (patch) | |
tree | 78ed92834bbd1aea7e3d272af8d3cb44c50bf237 /kernel/power | |
parent | PM: sleep: core: Drop racy and redundant checks from device_prepare() (diff) | |
download | linux-db96a75946d3a2a41092c83992e65f727cd35529.tar.gz linux-db96a75946d3a2a41092c83992e65f727cd35529.tar.bz2 linux-db96a75946d3a2a41092c83992e65f727cd35529.zip |
PM: sleep: Add pm_debug_messages kernel command line option
Debug messages from the system suspend/hibernation infrastructure
are 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, for example.
Add a kernel command line option to set pm_debug_messages during
boot up.
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
[ rjw: Subject & changelog ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/main.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/kernel/power/main.c b/kernel/power/main.c index 69b7a8aeca3b..40f86ec4ab30 100644 --- a/kernel/power/main.c +++ b/kernel/power/main.c @@ -535,6 +535,13 @@ static ssize_t pm_debug_messages_store(struct kobject *kobj, power_attr(pm_debug_messages); +static int __init pm_debug_messages_setup(char *str) +{ + pm_debug_messages_on = true; + return 1; +} +__setup("pm_debug_messages", pm_debug_messages_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. |