aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-18 01:11:32 -0400
committerDavid S. Miller <davem@davemloft.net>2008-07-18 01:11:32 -0400
commit4fe3ebec122f23a095cc1d17557c175caaa55ca1 (patch)
tree034197d736e08b076cb849d2cac1b1e974d38cbc /arch/sparc/kernel
parentf538f3df4f92f34f5d8bc024d54c12387541cdee (diff)
sparc: Use new '%pS' infrastructure to print symbols.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel')
-rw-r--r--arch/sparc/kernel/process.c11
-rw-r--r--arch/sparc/kernel/traps.c7
2 files changed, 8 insertions, 10 deletions
diff --git a/arch/sparc/kernel/process.c b/arch/sparc/kernel/process.c
index e18a5da025d3..4bb430940a61 100644
--- a/arch/sparc/kernel/process.c
+++ b/arch/sparc/kernel/process.c
@@ -1,6 +1,6 @@
1/* linux/arch/sparc/kernel/process.c 1/* linux/arch/sparc/kernel/process.c
2 * 2 *
3 * Copyright (C) 1995 David S. Miller (davem@davemloft.net) 3 * Copyright (C) 1995, 2008 David S. Miller (davem@davemloft.net)
4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be) 4 * Copyright (C) 1996 Eddie C. Dost (ecd@skynet.be)
5 */ 5 */
6 6
@@ -14,7 +14,6 @@
14#include <linux/module.h> 14#include <linux/module.h>
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include <linux/kernel.h> 16#include <linux/kernel.h>
17#include <linux/kallsyms.h>
18#include <linux/mm.h> 17#include <linux/mm.h>
19#include <linux/stddef.h> 18#include <linux/stddef.h>
20#include <linux/ptrace.h> 19#include <linux/ptrace.h>
@@ -198,7 +197,7 @@ void __show_backtrace(unsigned long fp)
198 rw->ins[4], rw->ins[5], 197 rw->ins[4], rw->ins[5],
199 rw->ins[6], 198 rw->ins[6],
200 rw->ins[7]); 199 rw->ins[7]);
201 print_symbol("%s\n", rw->ins[7]); 200 printk("%pS\n", (void *) rw->ins[7]);
202 rw = (struct reg_window *) rw->ins[6]; 201 rw = (struct reg_window *) rw->ins[6];
203 } 202 }
204 spin_unlock_irqrestore(&sparc_backtrace_lock, flags); 203 spin_unlock_irqrestore(&sparc_backtrace_lock, flags);
@@ -265,14 +264,14 @@ void show_regs(struct pt_regs *r)
265 264
266 printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n", 265 printk("PSR: %08lx PC: %08lx NPC: %08lx Y: %08lx %s\n",
267 r->psr, r->pc, r->npc, r->y, print_tainted()); 266 r->psr, r->pc, r->npc, r->y, print_tainted());
268 print_symbol("PC: <%s>\n", r->pc); 267 printk("PC: <%pS>\n", (void *) r->pc);
269 printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 268 printk("%%G: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
270 r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3], 269 r->u_regs[0], r->u_regs[1], r->u_regs[2], r->u_regs[3],
271 r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]); 270 r->u_regs[4], r->u_regs[5], r->u_regs[6], r->u_regs[7]);
272 printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 271 printk("%%O: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
273 r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11], 272 r->u_regs[8], r->u_regs[9], r->u_regs[10], r->u_regs[11],
274 r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]); 273 r->u_regs[12], r->u_regs[13], r->u_regs[14], r->u_regs[15]);
275 print_symbol("RPC: <%s>\n", r->u_regs[15]); 274 printk("RPC: <%pS>\n", (void *) r->u_regs[15]);
276 275
277 printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n", 276 printk("%%L: %08lx %08lx %08lx %08lx %08lx %08lx %08lx %08lx\n",
278 rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3], 277 rw->locals[0], rw->locals[1], rw->locals[2], rw->locals[3],
@@ -307,7 +306,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
307 rw = (struct reg_window *) fp; 306 rw = (struct reg_window *) fp;
308 pc = rw->ins[7]; 307 pc = rw->ins[7];
309 printk("[%08lx : ", pc); 308 printk("[%08lx : ", pc);
310 print_symbol("%s ] ", pc); 309 printk("%pS ] ", (void *) pc);
311 fp = rw->ins[6]; 310 fp = rw->ins[6];
312 } while (++count < 16); 311 } while (++count < 16);
313 printk("\n"); 312 printk("\n");
diff --git a/arch/sparc/kernel/traps.c b/arch/sparc/kernel/traps.c
index ac8ee6ab1337..5d45d5fd8c99 100644
--- a/arch/sparc/kernel/traps.c
+++ b/arch/sparc/kernel/traps.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * arch/sparc/kernel/traps.c 2 * arch/sparc/kernel/traps.c
3 * 3 *
4 * Copyright 1995 David S. Miller (davem@caip.rutgers.edu) 4 * Copyright 1995, 2008 David S. Miller (davem@davemloft.net)
5 * Copyright 2000 Jakub Jelinek (jakub@redhat.com) 5 * Copyright 2000 Jakub Jelinek (jakub@redhat.com)
6 */ 6 */
7 7
@@ -11,7 +11,6 @@
11 11
12#include <linux/sched.h> /* for jiffies */ 12#include <linux/sched.h> /* for jiffies */
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/kallsyms.h>
15#include <linux/signal.h> 14#include <linux/signal.h>
16#include <linux/smp.h> 15#include <linux/smp.h>
17#include <linux/smp_lock.h> 16#include <linux/smp_lock.h>
@@ -116,8 +115,8 @@ void die_if_kernel(char *str, struct pt_regs *regs)
116 count++ < 30 && 115 count++ < 30 &&
117 (((unsigned long) rw) >= PAGE_OFFSET) && 116 (((unsigned long) rw) >= PAGE_OFFSET) &&
118 !(((unsigned long) rw) & 0x7)) { 117 !(((unsigned long) rw) & 0x7)) {
119 printk("Caller[%08lx]", rw->ins[7]); 118 printk("Caller[%08lx]: %pS\n", rw->ins[7],
120 print_symbol(": %s\n", rw->ins[7]); 119 (void *) rw->ins[7]);
121 rw = (struct reg_window *)rw->ins[6]; 120 rw = (struct reg_window *)rw->ins[6];
122 } 121 }
123 } 122 }