diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-23 00:03:43 +0200 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2017-07-23 00:03:43 +0200 |
commit | cb08e0353c249a27aed10c6f60a13871ae449d33 (patch) | |
tree | 1f0a5ea686df33423b364a98cc692d94b86676ab /kernel/time | |
parent | 8915aa2042f85ecf86d4a202ef6d04bf06f05cca (diff) | |
download | linux-stable-cb08e0353c249a27aed10c6f60a13871ae449d33.tar.gz linux-stable-cb08e0353c249a27aed10c6f60a13871ae449d33.tar.bz2 linux-stable-cb08e0353c249a27aed10c6f60a13871ae449d33.zip |
PM / timekeeping: Print debug messages when requested
The messages printed by tk_debug_account_sleep_time() are basically
useful for system sleep debugging, so print them only when the other
debug messages from the core suspend/hibernate code are enabled.
While at it, make it clear that the messages from
tk_debug_account_sleep_time() are about timekeeping suspend
duration, because in general timekeeping may be suspeded and
resumed for multiple times during one system suspend-resume cycle.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'kernel/time')
-rw-r--r-- | kernel/time/timekeeping_debug.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/time/timekeeping_debug.c b/kernel/time/timekeeping_debug.c index 38bc4d2208e8..0754cadfa9e6 100644 --- a/kernel/time/timekeeping_debug.c +++ b/kernel/time/timekeeping_debug.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/kernel.h> #include <linux/seq_file.h> +#include <linux/suspend.h> #include <linux/time.h> #include "timekeeping_internal.h" @@ -75,7 +76,7 @@ void tk_debug_account_sleep_time(struct timespec64 *t) int bin = min(fls(t->tv_sec), NUM_BINS-1); sleep_time_bin[bin]++; - printk_deferred(KERN_INFO "Suspended for %lld.%03lu seconds\n", - (s64)t->tv_sec, t->tv_nsec / NSEC_PER_MSEC); + pm_deferred_pr_dbg("Timekeeping suspended for %lld.%03lu seconds\n", + (s64)t->tv_sec, t->tv_nsec / NSEC_PER_MSEC); } |