MIPS: traps: Fix output of show_stacktrace
[linux-2.6-block.git] / arch / mips / kernel / traps.c
index 0c0270c29cd1f7238ec49b270f438689ebc1bc28..25ce866b289589a21768ff767227f442f3d588ac 100644 (file)
@@ -49,6 +49,7 @@
 #include <asm/fpu.h>
 #include <asm/fpu_emulator.h>
 #include <asm/idle.h>
+#include <asm/mips-cm.h>
 #include <asm/mips-r2-to-r6-emul.h>
 #include <asm/mipsregs.h>
 #include <asm/mipsmtregs.h>
@@ -155,7 +156,7 @@ static void show_backtrace(struct task_struct *task, const struct pt_regs *regs)
                print_ip_sym(pc);
                pc = unwind_stack(task, &sp, pc, &ra);
        } while (pc);
-       printk("\n");
+       pr_cont("\n");
 }
 
 /*
@@ -173,22 +174,24 @@ static void show_stacktrace(struct task_struct *task,
        printk("Stack :");
        i = 0;
        while ((unsigned long) sp & (PAGE_SIZE - 1)) {
-               if (i && ((i % (64 / field)) == 0))
-                       printk("\n       ");
+               if (i && ((i % (64 / field)) == 0)) {
+                       pr_cont("\n");
+                       printk("       ");
+               }
                if (i > 39) {
-                       printk(" ...");
+                       pr_cont(" ...");
                        break;
                }
 
                if (__get_user(stackdata, sp++)) {
-                       printk(" (Bad stack address)");
+                       pr_cont(" (Bad stack address)");
                        break;
                }
 
-               printk(" %0*lx", field, stackdata);
+               pr_cont(" %0*lx", field, stackdata);
                i++;
        }
-       printk("\n");
+       pr_cont("\n");
        show_backtrace(task, regs);
 }
 
@@ -445,6 +448,8 @@ asmlinkage void do_be(struct pt_regs *regs)
 
        if (board_be_handler)
                action = board_be_handler(regs, fixup != NULL);
+       else
+               mips_cm_error_report();
 
        switch (action) {
        case MIPS_BE_DISCARD: