]> Pileus Git - ~andy/linux/blobdiff - arch/parisc/kernel/traps.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
[~andy/linux] / arch / parisc / kernel / traps.c
index ea0eff91db4e84ed846a69c7f6cb1b855ee02d58..55bc1471967d2221badf806b78aada441760f0c7 100644 (file)
@@ -64,7 +64,7 @@ static int printbinary(char *buf, unsigned long x, int nbits)
        return nbits;
 }
 
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
 #define RFMT "%016lx"
 #else
 #define RFMT "%08lx"
@@ -163,13 +163,13 @@ static void do_show_stack(struct unwind_frame_info *info)
 {
        int i = 1;
 
-       printk("Backtrace:\n");
+       printk(KERN_CRIT "Backtrace:\n");
        while (i <= 16) {
                if (unwind_once(info) < 0 || info->ip == 0)
                        break;
 
                if (__kernel_text_address(info->ip)) {
-                       printk(" [<" RFMT ">] ", info->ip);
+                       printk("%s [<" RFMT ">] ", (i&0x3)==1 ? KERN_CRIT : "", info->ip);
 #ifdef CONFIG_KALLSYMS
                        print_symbol("%s\n", info->ip);
 #else
@@ -232,14 +232,14 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
 
        /* Amuse the user in a SPARC fashion */
        if (err) printk(
-"      _______________________________ \n"
-"     < Your System ate a SPARC! Gah! >\n"
-"      ------------------------------- \n"
-"             \\   ^__^\n"
-"              \\  (xx)\\_______\n"
-"                 (__)\\       )\\/\\\n"
-"                  U  ||----w |\n"
-"                     ||     ||\n");
+KERN_CRIT "      _______________________________ \n"
+KERN_CRIT "     < Your System ate a SPARC! Gah! >\n"
+KERN_CRIT "      ------------------------------- \n"
+KERN_CRIT "             \\   ^__^\n"
+KERN_CRIT "              \\  (xx)\\_______\n"
+KERN_CRIT "                 (__)\\       )\\/\\\n"
+KERN_CRIT "                  U  ||----w |\n"
+KERN_CRIT "                     ||     ||\n");
        
        /* unlock the pdc lock if necessary */
        pdc_emergency_unlock();
@@ -254,7 +254,17 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
        if (err)
                printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
                        current->comm, current->pid, str, err);
+
+       /* Wot's wrong wif bein' racy? */
+       if (current->thread.flags & PARISC_KERNEL_DEATH) {
+               printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
+               local_irq_enable();
+               while (1);
+       }
+       current->thread.flags |= PARISC_KERNEL_DEATH;
+
        show_regs(regs);
+       dump_stack();
 
        if (in_interrupt())
                panic("Fatal exception in interrupt");
@@ -265,14 +275,6 @@ void die_if_kernel(char *str, struct pt_regs *regs, long err)
                panic("Fatal exception");
        }
 
-       /* Wot's wrong wif bein' racy? */
-       if (current->thread.flags & PARISC_KERNEL_DEATH) {
-               printk(KERN_CRIT "%s() recursion detected.\n", __FUNCTION__);
-               local_irq_enable();
-               while (1);
-       }
-
-       current->thread.flags |= PARISC_KERNEL_DEATH;
        do_exit(SIGSEGV);
 }
 
@@ -314,7 +316,7 @@ static void handle_break(struct pt_regs *regs)
 #ifdef PRINT_USER_FAULTS
        if (unlikely(iir != GDB_BREAK_INSN)) {
                printk(KERN_DEBUG "break %d,%d: pid=%d command='%s'\n",
-                       (iir>>13) & ((1<<13)-1), iir & 31,
+                       iir & 31, (iir>>13) & ((1<<13)-1),
                        current->pid, current->comm);
                show_regs(regs);
        }
@@ -835,7 +837,7 @@ int __init check_ivt(void *iva)
        return 0;
 }
        
-#ifndef __LP64__
+#ifndef CONFIG_64BIT
 extern const void fault_vector_11;
 #endif
 extern const void fault_vector_20;
@@ -847,7 +849,7 @@ void __init trap_init(void)
        if (boot_cpu_data.cpu_type >= pcxu)
                iva = (void *) &fault_vector_20;
        else
-#ifdef __LP64__
+#ifdef CONFIG_64BIT
                panic("Can't boot 64-bit OS on PA1.1 processor!");
 #else
                iva = (void *) &fault_vector_11;