Re: [PATCH 43/50] xtensa: Add show_stack_loglvl()

From: Max Filippov
Date: Wed Nov 06 2019 - 11:44:33 EST


On Wed, Nov 6, 2019 at 12:15 AM Petr Mladek <pmladek@xxxxxxxx> wrote:
> > > for (i = 0; i < kstack_depth_to_print; i++) {
> > > if (kstack_end(sp))
> > > break;
> > > - pr_cont(" %08lx", *sp++);
> > > + printk("%s %08lx", loglvl, *sp++);
>
> KERN_CONT can be combined with any other loglevel.
> So you could keep using pr_cont() together with explicit loglevel:
>
> pr_cont("%s %08lx", loglvl, *sp++);
>
> It should fix the problems reported below.
>
> Well, the preferred solution would be to snprintf() the continuous
> line into a temporary buffer. And printk() it when it is complete.
> pr_cont() is not reliable when more CPUs print at the same time.

Good point. Let me do this cleanup.

--
Thanks.
-- Max