diff options
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
| -rw-r--r-- | arch/sparc64/kernel/traps.c | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 369749262653..0aa819c29dbc 100644 --- a/arch/sparc64/kernel/traps.c +++ b/arch/sparc64/kernel/traps.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* arch/sparc64/kernel/traps.c | 1 | /* arch/sparc64/kernel/traps.c |
| 2 | * | 2 | * |
| 3 | * Copyright (C) 1995,1997 David S. Miller (davem@davemloft.net) | 3 | * Copyright (C) 1995,1997,2008 David S. Miller (davem@davemloft.net) |
| 4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) | 4 | * Copyright (C) 1997,1999,2000 Jakub Jelinek (jakub@redhat.com) |
| 5 | */ | 5 | */ |
| 6 | 6 | ||
| @@ -11,7 +11,6 @@ | |||
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/sched.h> | 12 | #include <linux/sched.h> |
| 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/mm.h> | 16 | #include <linux/mm.h> |
| @@ -74,7 +73,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
| 74 | i + 1, | 73 | i + 1, |
| 75 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 74 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
| 76 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 75 | 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); |
| 78 | } | 77 | } |
| 79 | } | 78 | } |
| 80 | 79 | ||
| @@ -1081,7 +1080,7 @@ static void cheetah_log_errors(struct pt_regs *regs, struct cheetah_err_info *in | |||
| 1081 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); | 1080 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
| 1082 | printk("%s" "ERROR(%d): ", | 1081 | printk("%s" "ERROR(%d): ", |
| 1083 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | 1082 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); |
| 1084 | print_symbol("TPC<%s>\n", regs->tpc); | 1083 | printk("TPC<%pS>\n", (void *) regs->tpc); |
| 1085 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1084 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
| 1086 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1085 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
| 1087 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1086 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
| @@ -1689,7 +1688,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
| 1689 | smp_processor_id(), | 1688 | smp_processor_id(), |
| 1690 | (type & 0x1) ? 'I' : 'D', | 1689 | (type & 0x1) ? 'I' : 'D', |
| 1691 | regs->tpc); | 1690 | regs->tpc); |
| 1692 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | 1691 | printk(KERN_EMERG "TPC<%pS>\n", (void *) regs->tpc); |
| 1693 | panic("Irrecoverable Cheetah+ parity error."); | 1692 | panic("Irrecoverable Cheetah+ parity error."); |
| 1694 | } | 1693 | } |
| 1695 | 1694 | ||
| @@ -1697,7 +1696,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
| 1697 | smp_processor_id(), | 1696 | smp_processor_id(), |
| 1698 | (type & 0x1) ? 'I' : 'D', | 1697 | (type & 0x1) ? 'I' : 'D', |
| 1699 | regs->tpc); | 1698 | regs->tpc); |
| 1700 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | 1699 | printk(KERN_WARNING "TPC<%pS>\n", (void *) regs->tpc); |
| 1701 | } | 1700 | } |
| 1702 | 1701 | ||
| 1703 | struct sun4v_error_entry { | 1702 | struct sun4v_error_entry { |
| @@ -1904,9 +1903,10 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
| 1904 | 1903 | ||
| 1905 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1904 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
| 1906 | regs->tpc, tl); | 1905 | 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); |
| 1908 | printk(KERN_EMERG "SUN4V-ITLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | 1907 | 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]); | ||
| 1910 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1910 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
| 1911 | "pte[%lx] error[%lx]\n", | 1911 | "pte[%lx] error[%lx]\n", |
| 1912 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1912 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
| @@ -1927,9 +1927,10 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
| 1927 | 1927 | ||
| 1928 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1928 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
| 1929 | regs->tpc, tl); | 1929 | 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); |
| 1931 | printk(KERN_EMERG "SUN4V-DTLB: O7[%lx]\n", regs->u_regs[UREG_I7]); | 1931 | 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]); | ||
| 1933 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1934 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
| 1934 | "pte[%lx] error[%lx]\n", | 1935 | "pte[%lx] error[%lx]\n", |
| 1935 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1936 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
| @@ -2111,10 +2112,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
| 2111 | fp = ksp + STACK_BIAS; | 2112 | fp = ksp + STACK_BIAS; |
| 2112 | thread_base = (unsigned long) tp; | 2113 | thread_base = (unsigned long) tp; |
| 2113 | 2114 | ||
| 2114 | printk("Call Trace:"); | 2115 | printk("Call Trace:\n"); |
| 2115 | #ifdef CONFIG_KALLSYMS | ||
| 2116 | printk("\n"); | ||
| 2117 | #endif | ||
| 2118 | do { | 2116 | do { |
| 2119 | struct sparc_stackf *sf; | 2117 | struct sparc_stackf *sf; |
| 2120 | struct pt_regs *regs; | 2118 | struct pt_regs *regs; |
| @@ -2137,12 +2135,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
| 2137 | fp = (unsigned long)sf->fp + STACK_BIAS; | 2135 | fp = (unsigned long)sf->fp + STACK_BIAS; |
| 2138 | } | 2136 | } |
| 2139 | 2137 | ||
| 2140 | printk(" [%016lx] ", pc); | 2138 | printk(" [%016lx] %pS\n", pc, (void *) pc); |
| 2141 | print_symbol("%s\n", pc); | ||
| 2142 | } while (++count < 16); | 2139 | } while (++count < 16); |
| 2143 | #ifndef CONFIG_KALLSYMS | ||
| 2144 | printk("\n"); | ||
| 2145 | #endif | ||
| 2146 | } | 2140 | } |
| 2147 | 2141 | ||
| 2148 | void dump_stack(void) | 2142 | void dump_stack(void) |
| @@ -2211,9 +2205,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
| 2211 | while (rw && | 2205 | while (rw && |
| 2212 | count++ < 30&& | 2206 | count++ < 30&& |
| 2213 | is_kernel_stack(current, rw)) { | 2207 | is_kernel_stack(current, rw)) { |
| 2214 | printk("Caller[%016lx]", rw->ins[7]); | 2208 | printk("Caller[%016lx]: %pS\n", rw->ins[7], |
| 2215 | print_symbol(": %s", rw->ins[7]); | 2209 | (void *) rw->ins[7]); |
| 2216 | printk("\n"); | ||
| 2217 | 2210 | ||
| 2218 | rw = kernel_stack_up(rw); | 2211 | rw = kernel_stack_up(rw); |
| 2219 | } | 2212 | } |
