lkml.org 
[lkml]   [2022]   [Mar]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v2] PM: fix dynamic debug within pm_pr_debug()
On Sat, Mar 12, 2022 at 5:37 AM David Cohen <dacohen@pm.me> wrote:
>
> Currently, pm_pr_debug() and pm_deferred_pr_debug() use __pm_pr_debug()
> to filter pm debug messages based on pm_debug_messages_on flag.
> According to __pm_pr_debug() implementation, pm_deferred_pr_debug()
> indirectly calls printk_deferred() within __pm_pr_debug() which doesn't
> support dynamic debug, but pm_pr_debug() indirectly calls pr_debug()

I'm not sure what you mean by pm_pr_debug(). There's no such thing in
the kernel tree.

Assuming that it means pm_pr_dbg(), it doesn't call pr_debug():

#define pm_pr_dbg(fmt, ...) __pm_pr_dbg(false, fmt, ##__VA_ARGS__)

and

void __pm_pr_dbg(bool defer, const char *fmt, ...)
{
...
if (defer)
printk_deferred(KERN_DEBUG "PM: %pV", &vaf);
else
printk(KERN_DEBUG "PM: %pV", &vaf);

And as I said printk(KERN_DEBUG ...) is not equivalent to
pr_debug(...), because it is not dynamic printk().

pm_pr_dbg() is not dynamic printk() on purpose, so they both can be
controlled independently.

\
 
 \ /
  Last update: 2022-03-17 14:46    [W:0.068 / U:0.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site