[PATCH 06/13] sh: 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 06/13] sh: do not use print_symbol()
- From: Sergey Senozhatsky <sergey.senozhatsky.work@xxxxxxxxx>
- Date: Mon, 11 Dec 2017 21:50:18 +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>, Rich Felker <dalias@xxxxxxxx>
- 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: Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Cc: Rich Felker <dalias@xxxxxxxx>
---
arch/sh/kernel/process_32.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/arch/sh/kernel/process_32.c b/arch/sh/kernel/process_32.c
index 2c7bdf8cb934..5c88e7cb9c18 100644
--- a/arch/sh/kernel/process_32.c
+++ b/arch/sh/kernel/process_32.c
@@ -20,7 +20,6 @@
#include <linux/sched/task_stack.h>
#include <linux/slab.h>
#include <linux/elfcore.h>
-#include <linux/kallsyms.h>
#include <linux/fs.h>
#include <linux/ftrace.h>
#include <linux/hw_breakpoint.h>
@@ -37,8 +36,8 @@ void show_regs(struct pt_regs * regs)
printk("\n");
show_regs_print_info(KERN_DEFAULT);
- print_symbol("PC is at %s\n", instruction_pointer(regs));
- print_symbol("PR is at %s\n", regs->pr);
+ printk("PC is at %pS\n", instruction_pointer(regs));
+ printk("PR is at %pS\n", (void *)regs->pr);
printk("PC : %08lx SP : %08lx SR : %08lx ",
regs->pc, regs->regs[15], regs->sr);
--
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]