summaryrefslogtreecommitdiffstats
path: root/drivers/base
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-19 02:38:44 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-07-22 02:31:27 +0200
commit8d8b2441db9647890251538f60b75a4e45fdef8d (patch)
tree57f0acb27062c75ece6982231b81d67f7909f834 /drivers/base
parentbd8c9ba3b1e2037af5af4e48aea1087212838179 (diff)
downloadtalos-op-linux-8d8b2441db9647890251538f60b75a4e45fdef8d.tar.gz
talos-op-linux-8d8b2441db9647890251538f60b75a4e45fdef8d.zip
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>
Diffstat (limited to 'drivers/base')
-rw-r--r--drivers/base/power/main.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index c99f8730de82..4f5fc212d684 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -418,7 +418,6 @@ static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
dev_name(dev), pm_verb(state.event), info, error);
}
-#ifdef CONFIG_PM_DEBUG
static void dpm_show_time(ktime_t starttime, pm_message_t state,
const char *info)
{
@@ -432,14 +431,11 @@ static void dpm_show_time(ktime_t starttime, pm_message_t state,
usecs = usecs64;
if (usecs == 0)
usecs = 1;
- pr_info("PM: %s%s%s of devices complete after %ld.%03ld msecs\n",
- info ?: "", info ? " " : "", pm_verb(state.event),
- usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC);
+
+ pm_pr_dbg("%s%s%s of devices complete after %ld.%03ld msecs\n",
+ info ?: "", info ? " " : "", pm_verb(state.event),
+ usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC);
}
-#else
-static inline void dpm_show_time(ktime_t starttime, pm_message_t state,
- const char *info) {}
-#endif /* CONFIG_PM_DEBUG */
static int dpm_run_callback(pm_callback_t cb, struct device *dev,
pm_message_t state, const char *info)
OpenPOWER on IntegriCloud