[PATCH 2/2] riscv: Fix __show_regs printing formats

Kefeng Wang wangkefeng.wang at huawei.com
Wed Nov 25 20:10:02 EST 2020


+ John

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.

after some test, I fould first bad commit: 
[cfe2790b163acdc9c058a63bff310923e84a16b4] printk: move printk_info into 
separate array

Hi John,  there is printk-rework from you in v5.10-rc1,  could you check 
it ?

Thanks

>
>> Before:
>> epc: ffffffe0008dc23a ra : ffffffe0008dc238 sp : ffffffe081ddbd80 gp : ffffffe0010e2c70 tp : ffffffe0800d47c0 t0 : ffffffe001018620
>>   t1 : 0000000000000064 t2 : 000000000000000a s0 : ffffffe081ddbda0 s1 : 0000000000000270 a0 : 000000000000002e a1 : ffffffe000baaf90
>>   a2 : 0000000000000010 a3 : 0000000000000001 a4 : 1db93e333d1e1200 a5 : 1db93e333d1e1200 a6 : 0000000000000030 a7 : ffffffffffffffff
>>   s2 : 0000000000000000 s3 : ffffffe000b9ac80 s4 : ffffffe081d9f000 s5 : 0000000000000048 s6 : 000000000000000c s7 : ffffffe081ddbe80
>>   s8 : 0000000000000000 s9 : 00000000000b1688 s10: 0000000000099dc8 s11: 0000003fffbd9fa2 t3 : 1db93e333d1e1200 t4 : 0000000000000002
>>   t5 : 0000003ff778eac8 t6 : ffffffe081ddbac8status: 0000000000000120 badaddr: 0000000000000000 cause: 000000000000000d
>>
>> After:
>> epc: ffffffe0008dc23e ra : ffffffe0008dc23c sp : ffffffe08221bd80
>> gp : ffffffe0010e2c70 tp : ffffffe081cb1ec0 t0 : ffffffe001018620
>> t1 : 0000000000000064 t2 : 000000000000000a s0 : ffffffe08221bda0
>> s1 : 0000000000000270 a0 : 000000000000002e a1 : ffffffe000baafb8
>> a2 : 0000000000000010 a3 : 0000000000000001 a4 : eee4a3de5cb81700
>> a5 : eee4a3de5cb81700 a6 : 0000000000000030 a7 : ffffffffffffffff
>> s2 : 0000000000000000 s3 : ffffffe000b9aca8 s4 : ffffffe081d52000
>> s5 : 0000000000000048 s6 : 000000000000000c s7 : ffffffe08221be80
>> s8 : 0000000000000000 s9 : 00000000000b1688 s10: 0000000000099dc8
>> s11: 0000003fffe33fa2 t3 : eee4a3de5cb81700 t4 : 0000000000000002
>> t5 : 0000003fcc454ac8 t6 : ffffffe08221bac8
>> status: 0000000000000120 badaddr: 0000000000000000 cause: 000000000000000d
>>
>> Signed-off-by: Kefeng Wang <wangkefeng.wang at huawei.com>



More information about the linux-riscv mailing list