Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq
[pandora-kernel.git] / arch / powerpc / xmon / xmon.c
index 0741df8..8adad14 100644 (file)
@@ -8,7 +8,6 @@
  *      as published by the Free Software Foundation; either version
  *      2 of the License, or (at your option) any later version.
  */
-#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/smp.h>
@@ -138,10 +137,14 @@ static void bootcmds(void);
 static void proccall(void);
 void dump_segments(void);
 static void symbol_lookup(void);
+static void xmon_show_stack(unsigned long sp, unsigned long lr,
+                           unsigned long pc);
 static void xmon_print_symbol(unsigned long address, const char *mid,
                              const char *after);
 static const char *getvecname(unsigned long vec);
 
+int xmon_no_auto_backtrace;
+
 extern int print_insn_powerpc(unsigned long, unsigned long, int);
 
 extern void xmon_enter(void);
@@ -737,6 +740,12 @@ cmds(struct pt_regs *excp)
 
        last_cmd = NULL;
        xmon_regs = excp;
+
+       if (!xmon_no_auto_backtrace) {
+               xmon_no_auto_backtrace = 1;
+               xmon_show_stack(excp->gpr[1], excp->link, excp->nip);
+       }
+
        for(;;) {
 #ifdef CONFIG_SMP
                printf("%x:", smp_processor_id());