[PATCH 07/13] unicore32: do not use print_symbol()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Russell King <linux@xxxxxxxxxxxxxxx>, Catalin Marinas <catalin.marinas@xxxxxxx>, Mark Salter <msalter@xxxxxxxxxx>, Tony Luck <tony.luck@xxxxxxxxx>, David Howells <dhowells@xxxxxxxxxx>, Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>, Guan Xuetao <gxt@xxxxxxxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, Vineet Gupta <vgupta@xxxxxxxxxxxx>, Fengguang Wu <fengguang.wu@xxxxxxxxx>
- Subject: [PATCH 07/13] unicore32: do not use print_symbol()
- From: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
- Date: Mon, 11 Dec 2017 21:50:19 +0900
- Cc: Steven Rostedt <rostedt@xxxxxxxxxxx>, Petr Mladek <pmladek@xxxxxxxx>, LKML <linux-kernel@xxxxxxxxxxxxxxx>, linux-arm-kernel@xxxxxxxxxxxxxxxxxxx, linux-c6x-dev@xxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-am33-list@xxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-edac@xxxxxxxxxxxxxxx, x86@xxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>, Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
- In-reply-to: <20171211125025.2270-1-sergey.senozhatsky@gmail.com>
- References: <20171211125025.2270-1-sergey.senozhatsky@gmail.com>
print_symbol() uses extra stack space to sprintf() symbol
information and then to feed that buffer to printk()
char buffer[KSYM_SYMBOL_LEN];
sprint_symbol(buffer, address);
printk(fmt, buffer);
Replace print_symbol() with a direct printk("%pS") call.
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@xxxxxxxxx>
Cc: Guan Xuetao <gxt@xxxxxxxxxxxxxxx>
---
arch/unicore32/kernel/process.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/unicore32/kernel/process.c b/arch/unicore32/kernel/process.c
index ddaf78ae6854..9a9d49bccc02 100644
--- a/arch/unicore32/kernel/process.c
+++ b/arch/unicore32/kernel/process.c
@@ -23,7 +23,6 @@
#include <linux/delay.h>
#include <linux/reboot.h>
#include <linux/interrupt.h>
-#include <linux/kallsyms.h>
#include <linux/init.h>
#include <linux/cpu.h>
#include <linux/elfcore.h>
@@ -139,8 +138,8 @@ void __show_regs(struct pt_regs *regs)
char buf[64];
show_regs_print_info(KERN_DEFAULT);
- print_symbol("PC is at %s\n", instruction_pointer(regs));
- print_symbol("LR is at %s\n", regs->UCreg_lr);
+ printk("PC is at %pS\n", instruction_pointer(regs));
+ printk("LR is at %pS\n", (void *)regs->UCreg_lr);
printk(KERN_DEFAULT "pc : [<%08lx>] lr : [<%08lx>] psr: %08lx\n"
"sp : %08lx ip : %08lx fp : %08lx\n",
regs->UCreg_pc, regs->UCreg_lr, regs->UCreg_asr,
--
2.15.1
--
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]