diff options
Diffstat (limited to 'arch/sparc64/kernel/traps.c')
-rw-r--r-- | arch/sparc64/kernel/traps.c | 40 |
1 files changed, 15 insertions, 25 deletions
diff --git a/arch/sparc64/kernel/traps.c b/arch/sparc64/kernel/traps.c index 369749262653..bd30ecba5630 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> |
@@ -37,9 +36,6 @@ | |||
37 | #include <asm/processor.h> | 36 | #include <asm/processor.h> |
38 | #include <asm/timer.h> | 37 | #include <asm/timer.h> |
39 | #include <asm/head.h> | 38 | #include <asm/head.h> |
40 | #ifdef CONFIG_KMOD | ||
41 | #include <linux/kmod.h> | ||
42 | #endif | ||
43 | #include <asm/prom.h> | 39 | #include <asm/prom.h> |
44 | 40 | ||
45 | #include "entry.h" | 41 | #include "entry.h" |
@@ -74,7 +70,7 @@ static void dump_tl1_traplog(struct tl1_traplog *p) | |||
74 | i + 1, | 70 | i + 1, |
75 | p->trapstack[i].tstate, p->trapstack[i].tpc, | 71 | p->trapstack[i].tstate, p->trapstack[i].tpc, |
76 | p->trapstack[i].tnpc, p->trapstack[i].tt); | 72 | p->trapstack[i].tnpc, p->trapstack[i].tt); |
77 | print_symbol("TRAPLOG: TPC<%s>\n", p->trapstack[i].tpc); | 73 | printk("TRAPLOG: TPC<%pS>\n", (void *) p->trapstack[i].tpc); |
78 | } | 74 | } |
79 | } | 75 | } |
80 | 76 | ||
@@ -1081,7 +1077,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); | 1077 | regs->tpc, regs->tnpc, regs->u_regs[UREG_I7], regs->tstate); |
1082 | printk("%s" "ERROR(%d): ", | 1078 | printk("%s" "ERROR(%d): ", |
1083 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); | 1079 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id()); |
1084 | print_symbol("TPC<%s>\n", regs->tpc); | 1080 | printk("TPC<%pS>\n", (void *) regs->tpc); |
1085 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", | 1081 | printk("%s" "ERROR(%d): M_SYND(%lx), E_SYND(%lx)%s%s\n", |
1086 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), | 1082 | (recoverable ? KERN_WARNING : KERN_CRIT), smp_processor_id(), |
1087 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, | 1083 | (afsr & CHAFSR_M_SYNDROME) >> CHAFSR_M_SYNDROME_SHIFT, |
@@ -1689,7 +1685,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1689 | smp_processor_id(), | 1685 | smp_processor_id(), |
1690 | (type & 0x1) ? 'I' : 'D', | 1686 | (type & 0x1) ? 'I' : 'D', |
1691 | regs->tpc); | 1687 | regs->tpc); |
1692 | print_symbol(KERN_EMERG "TPC<%s>\n", regs->tpc); | 1688 | printk(KERN_EMERG "TPC<%pS>\n", (void *) regs->tpc); |
1693 | panic("Irrecoverable Cheetah+ parity error."); | 1689 | panic("Irrecoverable Cheetah+ parity error."); |
1694 | } | 1690 | } |
1695 | 1691 | ||
@@ -1697,7 +1693,7 @@ void cheetah_plus_parity_error(int type, struct pt_regs *regs) | |||
1697 | smp_processor_id(), | 1693 | smp_processor_id(), |
1698 | (type & 0x1) ? 'I' : 'D', | 1694 | (type & 0x1) ? 'I' : 'D', |
1699 | regs->tpc); | 1695 | regs->tpc); |
1700 | print_symbol(KERN_WARNING "TPC<%s>\n", regs->tpc); | 1696 | printk(KERN_WARNING "TPC<%pS>\n", (void *) regs->tpc); |
1701 | } | 1697 | } |
1702 | 1698 | ||
1703 | struct sun4v_error_entry { | 1699 | struct sun4v_error_entry { |
@@ -1904,9 +1900,10 @@ void sun4v_itlb_error_report(struct pt_regs *regs, int tl) | |||
1904 | 1900 | ||
1905 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", | 1901 | printk(KERN_EMERG "SUN4V-ITLB: Error at TPC[%lx], tl %d\n", |
1906 | regs->tpc, tl); | 1902 | regs->tpc, tl); |
1907 | print_symbol(KERN_EMERG "SUN4V-ITLB: TPC<%s>\n", regs->tpc); | 1903 | 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]); | 1904 | 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]); | 1905 | printk(KERN_EMERG "SUN4V-ITLB: O7<%pS>\n", |
1906 | (void *) regs->u_regs[UREG_I7]); | ||
1910 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " | 1907 | printk(KERN_EMERG "SUN4V-ITLB: vaddr[%lx] ctx[%lx] " |
1911 | "pte[%lx] error[%lx]\n", | 1908 | "pte[%lx] error[%lx]\n", |
1912 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, | 1909 | sun4v_err_itlb_vaddr, sun4v_err_itlb_ctx, |
@@ -1927,9 +1924,10 @@ void sun4v_dtlb_error_report(struct pt_regs *regs, int tl) | |||
1927 | 1924 | ||
1928 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", | 1925 | printk(KERN_EMERG "SUN4V-DTLB: Error at TPC[%lx], tl %d\n", |
1929 | regs->tpc, tl); | 1926 | regs->tpc, tl); |
1930 | print_symbol(KERN_EMERG "SUN4V-DTLB: TPC<%s>\n", regs->tpc); | 1927 | 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]); | 1928 | 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]); | 1929 | printk(KERN_EMERG "SUN4V-DTLB: O7<%pS>\n", |
1930 | (void *) regs->u_regs[UREG_I7]); | ||
1933 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " | 1931 | printk(KERN_EMERG "SUN4V-DTLB: vaddr[%lx] ctx[%lx] " |
1934 | "pte[%lx] error[%lx]\n", | 1932 | "pte[%lx] error[%lx]\n", |
1935 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, | 1933 | sun4v_err_dtlb_vaddr, sun4v_err_dtlb_ctx, |
@@ -2111,10 +2109,7 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2111 | fp = ksp + STACK_BIAS; | 2109 | fp = ksp + STACK_BIAS; |
2112 | thread_base = (unsigned long) tp; | 2110 | thread_base = (unsigned long) tp; |
2113 | 2111 | ||
2114 | printk("Call Trace:"); | 2112 | printk("Call Trace:\n"); |
2115 | #ifdef CONFIG_KALLSYMS | ||
2116 | printk("\n"); | ||
2117 | #endif | ||
2118 | do { | 2113 | do { |
2119 | struct sparc_stackf *sf; | 2114 | struct sparc_stackf *sf; |
2120 | struct pt_regs *regs; | 2115 | struct pt_regs *regs; |
@@ -2137,12 +2132,8 @@ void show_stack(struct task_struct *tsk, unsigned long *_ksp) | |||
2137 | fp = (unsigned long)sf->fp + STACK_BIAS; | 2132 | fp = (unsigned long)sf->fp + STACK_BIAS; |
2138 | } | 2133 | } |
2139 | 2134 | ||
2140 | printk(" [%016lx] ", pc); | 2135 | printk(" [%016lx] %pS\n", pc, (void *) pc); |
2141 | print_symbol("%s\n", pc); | ||
2142 | } while (++count < 16); | 2136 | } while (++count < 16); |
2143 | #ifndef CONFIG_KALLSYMS | ||
2144 | printk("\n"); | ||
2145 | #endif | ||
2146 | } | 2137 | } |
2147 | 2138 | ||
2148 | void dump_stack(void) | 2139 | void dump_stack(void) |
@@ -2211,9 +2202,8 @@ void die_if_kernel(char *str, struct pt_regs *regs) | |||
2211 | while (rw && | 2202 | while (rw && |
2212 | count++ < 30&& | 2203 | count++ < 30&& |
2213 | is_kernel_stack(current, rw)) { | 2204 | is_kernel_stack(current, rw)) { |
2214 | printk("Caller[%016lx]", rw->ins[7]); | 2205 | printk("Caller[%016lx]: %pS\n", rw->ins[7], |
2215 | print_symbol(": %s", rw->ins[7]); | 2206 | (void *) rw->ins[7]); |
2216 | printk("\n"); | ||
2217 | 2207 | ||
2218 | rw = kernel_stack_up(rw); | 2208 | rw = kernel_stack_up(rw); |
2219 | } | 2209 | } |