mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 04:33:26 +02:00
PM / sleep: Do not print debug messages by default
Debug messages from the system suspend/hibernation infrastructure can fill up the entire kernel log buffer in some cases and anyway they are only useful for debugging. They depend on CONFIG_PM_DEBUG, but that is set as a rule as some generally useful diagnostic facilities depend on it too. For this reason, avoid printing those messages by default, but make it possible to turn them on as needed with the help of a new sysfs attribute under /sys/power/. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
@@ -492,8 +492,14 @@ static inline void unlock_system_sleep(void) {}
|
||||
|
||||
#ifdef CONFIG_PM_SLEEP_DEBUG
|
||||
extern bool pm_print_times_enabled;
|
||||
extern __printf(1, 2) void pm_pr_dbg(const char *fmt, ...);
|
||||
#else
|
||||
#define pm_print_times_enabled (false)
|
||||
|
||||
#include <linux/printk.h>
|
||||
|
||||
#define pm_pr_dbg(fmt, ...) \
|
||||
no_printk(KERN_DEBUG fmt, ##__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_PM_AUTOSLEEP
|
||||
|
Reference in New Issue
Block a user