aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/traps.c
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@armlinux.org.uk>2021-05-13 10:59:23 +0100
committerRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2021-12-17 11:38:21 +0000
commitb0343ab330ae4d6c8d4210de5c16da704c2d4743 (patch)
tree06f1a3f287966e77a3c64674214bec9c496d4b2a /arch/arm/kernel/traps.c
parentARM: 9168/1: Add support for Cortex-M55 processor (diff)
downloadlinux-dev-b0343ab330ae4d6c8d4210de5c16da704c2d4743.tar.xz
linux-dev-b0343ab330ae4d6c8d4210de5c16da704c2d4743.zip
ARM: reduce the information printed in call traces
A while back, Linus complained about the numeric values printed by the ARM backtracing code. Printing these values does not make sense if one does not have access to the kernel ELF image (as is normally the case when helping a third party on a mailing list), but if one does, they can be very useful to find the code, rather than searching for the function name, and then doing hex math to work out where the backtrace entry is referring to. Provide an option to control whether this information is included, which will only be visible if EXPERT is enabled. Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Diffstat (limited to '')
-rw-r--r--arch/arm/kernel/traps.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/arm/kernel/traps.c b/arch/arm/kernel/traps.c
index 195dff58bafc..c5e25cf7219b 100644
--- a/arch/arm/kernel/traps.c
+++ b/arch/arm/kernel/traps.c
@@ -67,12 +67,14 @@ void dump_backtrace_entry(unsigned long where, unsigned long from,
{
unsigned long end = frame + 4 + sizeof(struct pt_regs);
-#ifdef CONFIG_KALLSYMS
+#ifndef CONFIG_KALLSYMS
+ printk("%sFunction entered at [<%08lx>] from [<%08lx>]\n",
+ loglvl, where, from);
+#elif defined CONFIG_BACKTRACE_VERBOSE
printk("%s[<%08lx>] (%ps) from [<%08lx>] (%pS)\n",
loglvl, where, (void *)where, from, (void *)from);
#else
- printk("%sFunction entered at [<%08lx>] from [<%08lx>]\n",
- loglvl, where, from);
+ printk("%s %ps from %pS\n", loglvl, (void *)where, (void *)from);
#endif
if (in_entry_text(from) && end <= ALIGN(frame, THREAD_SIZE))