]> err.no Git - linux-2.6/blobdiff - arch/powerpc/xmon/xmon.c
Merge branch 'for-linus' of git://git.kernel.dk/data/git/linux-2.6-block
[linux-2.6] / arch / powerpc / xmon / xmon.c
index a34ed49e0356c418a81fa5cfc85e0f47c0cd84a3..b481db1dacb4a7b3f2c35e49a0789612bbc591a7 100644 (file)
@@ -22,6 +22,7 @@
 #include <linux/sysrq.h>
 #include <linux/interrupt.h>
 #include <linux/irq.h>
+#include <linux/bug.h>
 
 #include <asm/ptrace.h>
 #include <asm/string.h>
@@ -35,7 +36,6 @@
 #include <asm/cputable.h>
 #include <asm/rtas.h>
 #include <asm/sstep.h>
-#include <asm/bug.h>
 #include <asm/irq_regs.h>
 #include <asm/spu.h>
 #include <asm/spu_priv1.h>
@@ -218,7 +218,7 @@ Commands:\n\
 "  ss  stop execution on all spus\n\
   sr   restore execution on stopped spus\n\
   sf  #        dump spu fields for spu # (in hex)\n\
-  sd  #        dump spu local store for spu # (in hex)\
+  sd  #        dump spu local store for spu # (in hex)\n\
   sdi #        disassemble spu local store for spu # (in hex)\n"
 #endif
 "  S   print special registers\n\
@@ -330,18 +330,17 @@ static void release_output_lock(void)
 static int xmon_core(struct pt_regs *regs, int fromipi)
 {
        int cmd = 0;
-       unsigned long msr;
        struct bpt *bp;
        long recurse_jmp[JMP_BUF_LEN];
        unsigned long offset;
+       unsigned long flags;
 #ifdef CONFIG_SMP
        int cpu;
        int secondary;
        unsigned long timeout;
 #endif
 
-       msr = mfmsr();
-       mtmsr(msr & ~MSR_EE);   /* disable interrupts */
+       local_irq_save(flags);
 
        bp = in_breakpoint_table(regs->nip, &offset);
        if (bp != NULL) {
@@ -516,7 +515,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
 
        insert_cpu_bpts();
 
-       mtmsr(msr);             /* restore interrupt enable */
+       local_irq_restore(flags);
 
        return cmd != 'X' && cmd != EOF;
 }
@@ -1346,7 +1345,7 @@ static void backtrace(struct pt_regs *excp)
 
 static void print_bug_trap(struct pt_regs *regs)
 {
-       struct bug_entry *bug;
+       const struct bug_entry *bug;
        unsigned long addr;
 
        if (regs->msr & MSR_PR)
@@ -1357,11 +1356,15 @@ static void print_bug_trap(struct pt_regs *regs)
        bug = find_bug(regs->nip);
        if (bug == NULL)
                return;
-       if (bug->line & BUG_WARNING_TRAP)
+       if (is_warning_bug(bug))
                return;
 
-       printf("kernel BUG in %s at %s:%d!\n",
-              bug->function, bug->file, (unsigned int)bug->line);
+#ifdef CONFIG_DEBUG_BUGVERBOSE
+       printf("kernel BUG at %s:%u!\n",
+              bug->file, bug->line);
+#else
+       printf("kernel BUG at %p!\n", (void *)bug->bug_addr);
+#endif
 }
 
 void excprint(struct pt_regs *fp)
@@ -2811,7 +2814,6 @@ static void dump_spu_fields(struct spu *spu)
        DUMP_FIELD(spu, "0x%lx", irqs[2]);
        DUMP_FIELD(spu, "0x%x", slb_replace);
        DUMP_FIELD(spu, "%d", pid);
-       DUMP_FIELD(spu, "%d", prio);
        DUMP_FIELD(spu, "0x%p", mm);
        DUMP_FIELD(spu, "0x%p", ctx);
        DUMP_FIELD(spu, "0x%p", rq);