]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/i386/kernel/traps.c
[PATCH] Check if cpu can be onlined before calling smp_prepare_cpu()
[linux-2.6-omap-h63xx.git] / arch / i386 / kernel / traps.c
index d510de7e4f2a8a9d0e9998dbc548f264202adc33..de5386b01d389bb795626e61e882d40eafd3b29d 100644 (file)
@@ -217,19 +217,17 @@ static void show_stack_log_lvl(struct task_struct *task, unsigned long *esp,
        for(i = 0; i < kstack_depth_to_print; i++) {
                if (kstack_end(stack))
                        break;
-               if (i && ((i % 8) == 0)) {
-                       printk("\n");
-                       printk("%s       ", log_lvl);
-               }
+               if (i && ((i % 8) == 0))
+                       printk("\n%s       ", log_lvl);
                printk("%08lx ", *stack++);
        }
-       printk("\n");
-       printk("%sCall Trace:\n", log_lvl);
+       printk("\n%sCall Trace:\n", log_lvl);
        show_trace_log_lvl(task, esp, log_lvl);
 }
 
 void show_stack(struct task_struct *task, unsigned long *esp)
 {
+       printk("       ");
        show_stack_log_lvl(task, esp, "");
 }
 
@@ -254,7 +252,7 @@ void show_registers(struct pt_regs *regs)
 
        esp = (unsigned long) (&regs->esp);
        savesegment(ss, ss);
-       if (user_mode(regs)) {
+       if (user_mode_vm(regs)) {
                in_kernel = 0;
                esp = regs->esp;
                ss = regs->xss & 0xffff;
@@ -354,6 +352,8 @@ void die(const char * str, struct pt_regs * regs, long err)
        static int die_counter;
        unsigned long flags;
 
+       oops_enter();
+
        if (die.lock_owner != raw_smp_processor_id()) {
                console_verbose();
                spin_lock_irqsave(&die.lock, flags);
@@ -406,6 +406,7 @@ void die(const char * str, struct pt_regs * regs, long err)
                ssleep(5);
                panic("Fatal exception");
        }
+       oops_exit();
        do_exit(SIGSEGV);
 }
 
@@ -644,7 +645,7 @@ void die_nmi (struct pt_regs *regs, const char *msg)
        /* If we are in kernel we are probably nested up pretty bad
         * and might aswell get out now while we still can.
        */
-       if (!user_mode(regs)) {
+       if (!user_mode_vm(regs)) {
                current->thread.trap_no = 2;
                crash_kexec(regs);
        }