cobalt: Print symbolic code location upon mode switch
PATCH 1/1 cobalt: Print symbolic code location upon mode switch
These days the raw program counter is close to useless, do it like the rest of the kernel and print fn+offset [module name].
Example log output after this change:
[Xenomai] switching testx to secondary mode after exception #0 in kernel-space at test_ioctl_rt+0x14/0x20 [maptest] (pid 879)
--- kernel/cobalt/dovetail/kevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
kernel/cobalt/dovetail/kevents.c +2 -2
@@ -65,9 +65,9 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)if (!user_mode (regs)) {printk (XENO_WARNING "switching %s to secondary mode after exception #%u in " -"kernel-space at 0x%lx (pid %d)\n" , thread->name, +"kernel-space at %pS (pid %d)\n" , thread->name, trapnr, -xnarch_fault_pc (regs), + (void *)xnarch_fault_pc (regs),xnthread_host_pid (thread)); }else if (xnarch_fault_notify (trapnr))/* Don't report debug traps */ printk(XENO_WARNING
Signature · 1 line
2.26.2
Jan Kiszka
AppliedQuoted 17 lines · Richard Weinberger
These days the raw program counter is close to useless, do it like the rest of the kernel and print fn+offset [module name].
Example log output after this change:
[Xenomai] switching testx to secondary mode after exception #0 in kernel-space attest_ioctl_rt+0x14/0x20[maptest] (pid 879)Signed-off-by Richard Weinberger <[email protected]>--- kernel/cobalt/dovetail/kevents.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)kernel/cobalt/dovetail/kevents.c +0
-0@@ -65,9 +65,9 @@ void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs)if (!user_mode (regs)) {
kernel/cobalt/dovetail/kevents.c void handle_oob_trap_entry(unsigned int trapnr, struct pt_regs *regs) · line 73
Quoted 10 lines
kernel/cobalt/dovetail/kevents.c +2
-2printk (XENO_WARNING "switching %s to secondary mode after exception #%u in " -"kernel-space at 0x%lx (pid %d)\n" , thread->name, +"kernel-space at %pS (pid %d)\n" , thread->name, trapnr, -xnarch_fault_pc (regs), + (void *)xnarch_fault_pc (regs),xnthread_host_pid (thread)); }else if (xnarch_fault_notify (trapnr))/* Don't report debug traps */ printk(XENO_WARNING
Thanks, applied.
Jan
Signature · 2 lines
Siemens AG, Technology Linux Expert Center