[PATCH 00/50] Add log level to show_stack()
Sergey Senozhatsky
sergey.senozhatsky.work at gmail.com
Wed Nov 13 12:23:37 AEDT 2019
On (19/11/12 19:12), Sergey Senozhatsky wrote:
> On (19/11/12 09:35), Petr Mladek wrote:
> [..]
> > This is getting too complicated. It would introduce too many
> > hidden rules. While the explicitly passed loglevel parameter
> > is straightforward and clear.
>
> If loglevel is DEFAULT or NOTICE or INFO then we can overwrite it
> (either downgrade or upgrade). That's one rule, basically. Not too
> complicated, I guess.
Can be taken even a bit further than
show_stack(NULL, NULL, LOGLEVEL_DEBUG);
or
show_stack(NULL, NULL, LOGLEVEL_ERR);
For instance,
spin_lock_irqsave(&rq->lock, flags);
printk_emergency_enter(LOGLEVEL_SCHED);
...
show_stack(...);
printk();
printk();
...
spin_unlock_irqrestore(&rq->lock, flags);
or
spin_lock_irqsave(&uart_port->lock, flags);
printk_emergency_enter(LOGLEVEL_SCHED);
...
printk();
printk();
...
and so on.
-ss
More information about the Linuxppc-dev
mailing list