riscv: use KERN_INFO in do_trap
PATCH 1/1 riscv: use KERN_INFO in do_trap
Print the instruction dump with info instead of emergency level like the rest of the output when printing the information for an unhandled signal.
--- arch/riscv/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/riscv/kernel/traps.c +1 -1
@@ -121,7 +121,7 @@ void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)print_vma_addr (KERN_CONT " in " ,instruction_pointer (regs));pr_cont ("\n" );__show_regs (regs); -dump_instr (KERN_EMERG , regs); +dump_instr (KERN_INFO , regs); }force_sig_fault (signo, code, (void __user *)addr);
Signature · 7 lines
2.43.1 -- Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 2 lines · Andreas Schwab
Print the instruction dump with info instead of emergency level like the rest of the output when printing the information for an unhandled signal.
I'm not entirely sure that this is true, __show_regs() prints with KERN_DEFAULT, but this certainly is more consistent than it was before. Dumping at EMERG doesn't make sense to me though, so
Cheers,
Conor.
Quoted 17 lines
--- arch/riscv/kernel/traps.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)arch/riscv/kernel/traps.c +1
-1@@ -121,7 +121,7 @@ void do_trap(struct pt_regs *regs, int signo, int code, unsigned long addr)print_vma_addr (KERN_CONT " in " ,instruction_pointer (regs));pr_cont ("\n" );__show_regs (regs); -dump_instr (KERN_EMERG , regs); +dump_instr (KERN_INFO , regs); }force_sig_fault (signo, code, (void __user *)addr);
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Andreas Schwab
Print the instruction dump with info instead of emergency level like the rest of the output when printing the information for an unhandled signal.
I'm not entirely sure that this is true,
__show_regs()prints withKERN_DEFAULT, but this certainly is more consistent than it was before.
The first line is printed with pr_info. Perhaps __show_regs should gain a level argument.
Signature · 3 lines
Andreas Schwab, SUSE Labs, [email protected] GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different."
Quoted 10 lines · Andreas Schwab
Quoted 6 lines · Conor Dooley
Quoted 2 lines · Andreas Schwab
Print the instruction dump with info instead of emergency level like the rest of the output when printing the information for an unhandled signal.
I'm not entirely sure that this is true,
__show_regs()prints withKERN_DEFAULT, but this certainly is more consistent than it was before.The first line is printed with
pr_info.
Yah, that's what I meant with "more consistent" :)
Quoted 2 lines
Perhaps
__show_regsshould gain
a level argument.
I wouldn't be averse. There's 3 users, of which one is show_regs(). I think we could easily add an argument that sets the printk level to match the other outputs from the non show_regs() callers. I suppose show_regs() could retain the KERN_DEFAULT behaviour unless you've got a better idea.