11/* arch/sparc64/kernel/traps.c
22 *
3- * Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net)
3+ * Copyright (C) 1995,1997,2008 David S. Miller (davem@davemloft.net)
44 * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com)
55 */
66
1111#include <linux/module.h>
1212#include <linux/sched.h>
1313#include <linux/kernel.h>
14- #include <linux/kallsyms.h>
1514#include <linux/signal.h>
1615#include <linux/smp.h>
1716#include <linux/mm.h>
@@ -74,7 +73,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p)
7473 i + 1 ,
7574 p -> trapstack [i ].tstate , p -> trapstack [i ].tpc ,
7675 p -> trapstack [i ].tnpc , p -> trapstack [i ].tt );
77- print_symbol ("TRAPLOG: TPC<%s >\n" , p -> trapstack [i ].tpc );
76+ printk ("TRAPLOG: TPC<%pS >\n" , ( void * ) p -> trapstack [i ].tpc );
7877 }
7978}
8079
@@ -1081,7 +1080,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in
10811080 regs -> tpc , regs -> tnpc , regs -> u_regs [UREG_I7 ], regs -> tstate );
10821081 printk ("%s" "ERROR(%d): " ,
10831082 (recoverable ? KERN_WARNING : KERN_CRIT ), smp_processor_id ());
1084- print_symbol ("TPC<%s >\n" , regs -> tpc );
1083+ printk ("TPC<%pS >\n" , ( void * ) regs -> tpc );
10851084 printk ("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n" ,
10861085 (recoverable ? KERN_WARNING : KERN_CRIT ), smp_processor_id (),
10871086 (afsr & CHAFSR_M_SYNDROME ) >> CHAFSR_M_SYNDROME_SHIFT ,
@@ -1689,15 +1688,15 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs)
16891688 smp_processor_id (),
16901689 (type & 0x1 ) ? 'I' : 'D' ,
16911690 regs -> tpc );
1692- print_symbol (KERN_EMERG "TPC<%s >\n" , regs -> tpc );
1691+ printk (KERN_EMERG "TPC<%pS >\n" , ( void * ) regs -> tpc );
16931692 panic ("Irrecoverable Cheetah+ parity error." );
16941693 }
16951694
16961695 printk (KERN_WARNING "CPU[%d]: Cheetah+ %c-cache parity error at TPC[%016lx]\n" ,
16971696 smp_processor_id (),
16981697 (type & 0x1 ) ? 'I' : 'D' ,
16991698 regs -> tpc );
1700- print_symbol (KERN_WARNING "TPC<%s >\n" , regs -> tpc );
1699+ printk (KERN_WARNING "TPC<%pS >\n" , ( void * ) regs -> tpc );
17011700}
17021701
17031702struct sun4v_error_entry {
@@ -1904,9 +1903,10 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl)
19041903
19051904 printk (KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n" ,
19061905 regs -> tpc , tl );
1907- print_symbol (KERN_EMERG "SUN4V-ITLB: TPC<%s >\n" , regs -> tpc );
1906+ printk (KERN_EMERG "SUN4V-ITLB: TPC<%pS >\n" , ( void * ) regs -> tpc );
19081907 printk (KERN_EMERG "SUN4V-ITLB: O7[%lx]\n" , regs -> u_regs [UREG_I7 ]);
1909- print_symbol (KERN_EMERG "SUN4V-ITLB: O7<%s>\n" , regs -> u_regs [UREG_I7 ]);
1908+ printk (KERN_EMERG "SUN4V-ITLB: O7<%pS>\n" ,
1909+ (void * ) regs -> u_regs [UREG_I7 ]);
19101910 printk (KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] "
19111911 "pte[%lx] error[%lx]\n" ,
19121912 sun4v_err_itlb_vaddr , sun4v_err_itlb_ctx ,
@@ -1927,9 +1927,10 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl)
19271927
19281928 printk (KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n" ,
19291929 regs -> tpc , tl );
1930- print_symbol (KERN_EMERG "SUN4V-DTLB: TPC<%s >\n" , regs -> tpc );
1930+ printk (KERN_EMERG "SUN4V-DTLB: TPC<%pS >\n" , ( void * ) regs -> tpc );
19311931 printk (KERN_EMERG "SUN4V-DTLB: O7[%lx]\n" , regs -> u_regs [UREG_I7 ]);
1932- print_symbol (KERN_EMERG "SUN4V-DTLB: O7<%s>\n" , regs -> u_regs [UREG_I7 ]);
1932+ printk (KERN_EMERG "SUN4V-DTLB: O7<%pS>\n" ,
1933+ (void * ) regs -> u_regs [UREG_I7 ]);
19331934 printk (KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] "
19341935 "pte[%lx] error[%lx]\n" ,
19351936 sun4v_err_dtlb_vaddr , sun4v_err_dtlb_ctx ,
@@ -2111,10 +2112,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
21112112 fp = ksp + STACK_BIAS ;
21122113 thread_base = (unsigned long ) tp ;
21132114
2114- printk ("Call Trace:" );
2115- #ifdef CONFIG_KALLSYMS
2116- printk ("\n" );
2117- #endif
2115+ printk ("Call Trace:\n" );
21182116 do {
21192117 struct sparc_stackf * sf ;
21202118 struct pt_regs * regs ;
@@ -2137,12 +2135,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp)
21372135 fp = (unsigned long )sf -> fp + STACK_BIAS ;
21382136 }
21392137
2140- printk (" [%016lx] " , pc );
2141- print_symbol ("%s\n" , pc );
2138+ printk (" [%016lx] %pS\n" , pc , (void * ) pc );
21422139 } while (++ count < 16 );
2143- #ifndef CONFIG_KALLSYMS
2144- printk ("\n" );
2145- #endif
21462140}
21472141
21482142void dump_stack (void )
@@ -2211,9 +2205,8 @@ void die_if_kernel(char *str, struct pt_regs *regs)
22112205 while (rw &&
22122206 count ++ < 30 &&
22132207 is_kernel_stack (current , rw )) {
2214- printk ("Caller[%016lx]" , rw -> ins [7 ]);
2215- print_symbol (": %s" , rw -> ins [7 ]);
2216- printk ("\n" );
2208+ printk ("Caller[%016lx]: %pS\n" , rw -> ins [7 ],
2209+ (void * ) rw -> ins [7 ]);
22172210
22182211 rw = kernel_stack_up (rw );
22192212 }
0 commit comments