mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-15 17:46:45 +07:00
PM / sleep: Print timing information if debug is enabled
Avoid printing the device suspend/resume timing information if CONFIG_PM_DEBUG is not set to reduce the log noise level. Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
This commit is contained in:
parent
235d81a630
commit
604d895857
@ -417,6 +417,7 @@ static void pm_dev_err(struct device *dev, pm_message_t state, char *info,
|
|||||||
dev_name(dev), pm_verb(state.event), info, error);
|
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, char *info)
|
static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info)
|
||||||
{
|
{
|
||||||
ktime_t calltime;
|
ktime_t calltime;
|
||||||
@ -433,6 +434,9 @@ static void dpm_show_time(ktime_t starttime, pm_message_t state, char *info)
|
|||||||
info ?: "", info ? " " : "", pm_verb(state.event),
|
info ?: "", info ? " " : "", pm_verb(state.event),
|
||||||
usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC);
|
usecs / USEC_PER_MSEC, usecs % USEC_PER_MSEC);
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
static inline void dpm_show_time(ktime_t starttime, pm_message_t state, char *info) {}
|
||||||
|
#endif /* CONFIG_PM_DEBUG */
|
||||||
|
|
||||||
static int dpm_run_callback(pm_callback_t cb, struct device *dev,
|
static int dpm_run_callback(pm_callback_t cb, struct device *dev,
|
||||||
pm_message_t state, char *info)
|
pm_message_t state, char *info)
|
||||||
|
Loading…
Reference in New Issue
Block a user