* [PATCH] PM / suspend: Print the driver flags of device during suspend resume
@ 2020-10-23 11:02 Chen Yu
2020-11-10 18:43 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Chen Yu @ 2020-10-23 11:02 UTC (permalink / raw)
To: Rafael J. Wysocki, Len Brown, Greg Kroah-Hartman
Cc: linux-pm, linux-kernel, Chen Yu
Currently there are 4 driver flags to control system suspend/resume
behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE,
DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags
during suspend resume so as to get a brief understanding of the
expected behavior of each device, and to facilitate suspend/resume
debugging/tuning.
To enable this tracing:
echo 'file drivers/base/power/main.c +p' >
/sys/kernel/debug/dynamic_debug/control
Signed-off-by: Chen Yu <yu.c.chen@intel.com>
---
drivers/base/power/main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 205a06752ca9..be6744bdfc93 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat
static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info)
{
- dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
+ dev_dbg(dev, "%s%s%s driver flags: %x\n", info, pm_verb(state.event),
((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
- ", may wakeup" : "");
+ ", may wakeup" : "", dev->power.driver_flags);
}
static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] PM / suspend: Print the driver flags of device during suspend resume
2020-10-23 11:02 [PATCH] PM / suspend: Print the driver flags of device during suspend resume Chen Yu
@ 2020-11-10 18:43 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2020-11-10 18:43 UTC (permalink / raw)
To: Chen Yu
Cc: Rafael J. Wysocki, Len Brown, Greg Kroah-Hartman, Linux PM,
Linux Kernel Mailing List
On Fri, Oct 23, 2020 at 1:02 PM Chen Yu <yu.c.chen@intel.com> wrote:
>
> Currently there are 4 driver flags to control system suspend/resume
> behavior: DPM_FLAG_NO_DIRECT_COMPLETE, DPM_FLAG_SMART_PREPARE,
> DPM_FLAG_SMART_SUSPEND and DPM_FLAG_MAY_SKIP_RESUME. Print these flags
> during suspend resume so as to get a brief understanding of the
> expected behavior of each device, and to facilitate suspend/resume
> debugging/tuning.
>
> To enable this tracing:
> echo 'file drivers/base/power/main.c +p' >
> /sys/kernel/debug/dynamic_debug/control
>
> Signed-off-by: Chen Yu <yu.c.chen@intel.com>
> ---
> drivers/base/power/main.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
> index 205a06752ca9..be6744bdfc93 100644
> --- a/drivers/base/power/main.c
> +++ b/drivers/base/power/main.c
> @@ -442,9 +442,9 @@ static pm_callback_t pm_noirq_op(const struct dev_pm_ops *ops, pm_message_t stat
>
> static void pm_dev_dbg(struct device *dev, pm_message_t state, const char *info)
> {
> - dev_dbg(dev, "%s%s%s\n", info, pm_verb(state.event),
> + dev_dbg(dev, "%s%s%s driver flags: %x\n", info, pm_verb(state.event),
> ((state.event & PM_EVENT_SLEEP) && device_may_wakeup(dev)) ?
> - ", may wakeup" : "");
> + ", may wakeup" : "", dev->power.driver_flags);
> }
>
> static void pm_dev_err(struct device *dev, pm_message_t state, const char *info,
> --
Applied (with some edits in the subject and changelog) as 5.11 material, thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-11-10 18:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-23 11:02 [PATCH] PM / suspend: Print the driver flags of device during suspend resume Chen Yu
2020-11-10 18:43 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).