All of lore.kernel.org
 help / color / mirror / Atom feed
From: John Ogness <john.ogness@linutronix.de>
To: Kefeng Wang <wangkefeng.wang@huawei.com>,
	Atish Patra <atishp@atishpatra.org>
Cc: Petr Mladek <pmladek@suse.com>,
	linux-riscv <linux-riscv@lists.infradead.org>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Paul Walmsley <paul.walmsley@sifive.com>
Subject: Re: [PATCH 2/2] riscv: Fix __show_regs printing formats
Date: Thu, 26 Nov 2020 13:01:37 +0106	[thread overview]
Message-ID: <877dq8coxy.fsf@jogness.linutronix.de> (raw)
In-Reply-To: <87d000cu6l.fsf@jogness.linutronix.de>

On 2020-11-26, John Ogness <john.ogness@linutronix.de> wrote:
> On 2020-11-26, Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>> On 2020/11/26 6:58, Atish Patra wrote:
>>> On Tue, Nov 24, 2020 at 3:17 AM Kefeng Wang <wangkefeng.wang@huawei.com> wrote:
>>>> Using printk directly and align the printing formats.
>>>>
>>> Why switch to printk ? IIRC, pr_* is preferred over printk for any new code.
>>
>> The stack output is strange, that is why I move to printk, and the old
>> kernel looks good.
>
> This is just a quick response to let you know I can reproduce the issue
> and I am investigating.
>
> @Petr: The proposed change and output difference is here [0].

This is a bug in continuous line handling. I have posted [0] a fix to
LKML.

Note that a pr_cont() message with a trailing newline will "terminate"
the continous line so that it can no longer be continued. Having a bunch
of:

    pr_cont("...\n");

lines is technically wrong. If you really want the full block to be a
single message, put the newline at the beginning of the pr_cont()
message or add some whitespace after a newline at the end. For example:

    pr_cont("\n....");
       or
    pr_cont("...\n ");

Although I would suggest making them separate printk calls. With
CONFIG_PRINTK_CALLER it is still possible to sort out simultaneous dumps
from multiple CPUs.

Thank you for reporting this!

John Ogness

[0] https://lkml.kernel.org/r/20201126114836.14750-1-john.ogness@linutronix.de

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2020-11-26 11:55 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-13  6:42 [PATCH 0/3] riscv: cover to ARCH_STACKWALK Kefeng Wang
2020-11-13  6:42 ` [PATCH 1/3] riscv: Cleanup stacktrace Kefeng Wang
2020-11-13  6:42 ` [PATCH 2/3] riscv: Make stack walk callback consistent with generic code Kefeng Wang
2020-11-13  6:42 ` [PATCH 3/3] riscv: Enable ARCH_STACKWALK Kefeng Wang
2020-11-21  3:01 ` [PATCH 0/3] riscv: cover to ARCH_STACKWALK Palmer Dabbelt
2020-11-24 11:20   ` [PATCH 1/2] riscv: Add dump stack in show_regs Kefeng Wang
2020-11-24 11:20     ` [PATCH 2/2] riscv: Fix __show_regs printing formats Kefeng Wang
2020-11-25 22:58       ` Atish Patra
2020-11-26  1:10         ` Kefeng Wang
2020-11-26 10:02           ` John Ogness
2020-11-26 11:55             ` John Ogness [this message]
2020-11-26 12:49               ` Kefeng Wang
2020-11-26 13:33       ` [PATCH v2] riscv: Using printk directly in __show_regs Kefeng Wang
2020-12-11  1:43         ` Palmer Dabbelt
2020-12-11  8:48           ` John Ogness
2020-12-14 11:49             ` Kefeng Wang
2020-11-25 23:04     ` [PATCH 1/2] riscv: Add dump stack in show_regs Atish Patra
2020-12-14 11:52     ` Kefeng Wang
2021-01-09 22:24       ` Palmer Dabbelt
2021-01-11  3:23         ` Kefeng Wang
2020-12-17  2:34   ` [PATCH 0/3] riscv: cover to ARCH_STACKWALK Kefeng Wang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=877dq8coxy.fsf@jogness.linutronix.de \
    --to=john.ogness@linutronix.de \
    --cc=aou@eecs.berkeley.edu \
    --cc=atishp@atishpatra.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=pmladek@suse.com \
    --cc=wangkefeng.wang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.