aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/kernel/traps.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/kernel/traps.c')
-rw-r--r--arch/mips/kernel/traps.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c
index cb8b0e2c7954..b8ea4e9d0d87 100644
--- a/arch/mips/kernel/traps.c
+++ b/arch/mips/kernel/traps.c
@@ -71,7 +71,6 @@ extern asmlinkage void handle_reserved(void);
71extern int fpu_emulator_cop1Handler(struct pt_regs *xcp, 71extern int fpu_emulator_cop1Handler(struct pt_regs *xcp,
72 struct mips_fpu_struct *ctx, int has_fpu); 72 struct mips_fpu_struct *ctx, int has_fpu);
73 73
74void (*board_watchpoint_handler)(struct pt_regs *regs);
75void (*board_be_init)(void); 74void (*board_be_init)(void);
76int (*board_be_handler)(struct pt_regs *regs, int is_fixup); 75int (*board_be_handler)(struct pt_regs *regs, int is_fixup);
77void (*board_nmi_handler_setup)(void); 76void (*board_nmi_handler_setup)(void);
@@ -88,15 +87,17 @@ static void show_raw_backtrace(unsigned long reg29)
88#ifdef CONFIG_KALLSYMS 87#ifdef CONFIG_KALLSYMS
89 printk("\n"); 88 printk("\n");
90#endif 89#endif
91#define IS_KVA01(a) ((((unsigned int)a) & 0xc0000000) == 0x80000000) 90 while (!kstack_end(sp)) {
92 if (IS_KVA01(sp)) { 91 unsigned long __user *p =
93 while (!kstack_end(sp)) { 92 (unsigned long __user *)(unsigned long)sp++;
94 addr = *sp++; 93 if (__get_user(addr, p)) {
95 if (__kernel_text_address(addr)) 94 printk(" (Bad stack address)");
96 print_ip_sym(addr); 95 break;
97 } 96 }
98 printk("\n"); 97 if (__kernel_text_address(addr))
98 print_ip_sym(addr);
99 } 99 }
100 printk("\n");
100} 101}
101 102
102#ifdef CONFIG_KALLSYMS 103#ifdef CONFIG_KALLSYMS
@@ -247,11 +248,11 @@ static void __show_regs(const struct pt_regs *regs)
247 /* 248 /*
248 * Saved cp0 registers 249 * Saved cp0 registers
249 */ 250 */
250 printk("epc : %0*lx ", field, regs->cp0_epc); 251 printk("epc : %0*lx %pS\n", field, regs->cp0_epc,
251 print_symbol("%s ", regs->cp0_epc); 252 (void *) regs->cp0_epc);
252 printk(" %s\n", print_tainted()); 253 printk(" %s\n", print_tainted());
253 printk("ra : %0*lx ", field, regs->regs[31]); 254 printk("ra : %0*lx %pS\n", field, regs->regs[31],
254 print_symbol("%s\n", regs->regs[31]); 255 (void *) regs->regs[31]);
255 256
256 printk("Status: %08x ", (uint32_t) regs->cp0_status); 257 printk("Status: %08x ", (uint32_t) regs->cp0_status);
257 258
@@ -890,11 +891,6 @@ asmlinkage void do_mdmx(struct pt_regs *regs)
890 891
891asmlinkage void do_watch(struct pt_regs *regs) 892asmlinkage void do_watch(struct pt_regs *regs)
892{ 893{
893 if (board_watchpoint_handler) {
894 (*board_watchpoint_handler)(regs);
895 return;
896 }
897
898 /* 894 /*
899 * We use the watch exception where available to detect stack 895 * We use the watch exception where available to detect stack
900 * overflows. 896 * overflows.