[PATCH 2/2] riscv: Fix __show_regs printing formats
Kefeng Wang
wangkefeng.wang at huawei.com
Thu Nov 26 07:49:10 EST 2020
On 2020/11/26 19:55, John Ogness wrote:
> On 2020-11-26, John Ogness <john.ogness at linutronix.de> wrote:
>> On 2020-11-26, Kefeng Wang <wangkefeng.wang at 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 at 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.
Yes, it fixes the output issue.
>
> 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.
Thanks for your explanation. I will re-post patch with changelog refresh.
>
> Thank you for reporting this!
>
> John Ogness
>
> [0] https://lkml.kernel.org/r/20201126114836.14750-1-john.ogness@linutronix.de
> .
>
More information about the linux-riscv
mailing list