From 065040aa226eb7f6bd1e2bb408356fab133b512c Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Mon, 11 Sep 2023 14:56:17 +0200 Subject: ARM64: backtrace: print stacktrace to stderr Rule of thumb is to print interactive output to stdout and status messages to stderr. A stack dump falls into the latter category and part of the stack trace is already printed to stderr, because of use of the logging functions, which always prints there. Signed-off-by: Ahmad Fatoum Link: https://lore.barebox.org/20230911125619.2782229-3-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer --- arch/arm/lib64/stacktrace.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'arch/arm/lib64/stacktrace.c') diff --git a/arch/arm/lib64/stacktrace.c b/arch/arm/lib64/stacktrace.c index db5691a609..76aec734e1 100644 --- a/arch/arm/lib64/stacktrace.c +++ b/arch/arm/lib64/stacktrace.c @@ -40,9 +40,9 @@ int unwind_frame(struct stackframe *frame) static void dump_backtrace_entry(unsigned long where, unsigned long from) { #ifdef CONFIG_KALLSYMS - printf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); + eprintf("[<%08lx>] (%pS) from [<%08lx>] (%pS)\n", where, (void *)where, from, (void *)from); #else - printf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); + eprintf("Function entered at [<%08lx>] from [<%08lx>]\n", where, from); #endif } @@ -60,7 +60,7 @@ void unwind_backtrace(struct pt_regs *regs) frame.pc = (unsigned long)unwind_backtrace; } - printf("Call trace:\n"); + eprintf("Call trace:\n"); while (1) { unsigned long where = frame.pc; int ret; -- cgit v1.2.3