]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
sparc64: Hook up trigger_all_cpu_backtrace().
authorDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2008 05:35:00 +0000 (22:35 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Jul 2008 05:35:00 +0000 (22:35 -0700)
We already have code that does this, but it is only currently attached
to sysrq-'y'.

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc/include/asm/irq_64.h
arch/sparc64/kernel/process.c

index 0bb9bf531745e8caf587135f3cf3063f31d24a4c..3473e25231d96e3fe63a0227cf3103d409074cf4 100644 (file)
@@ -90,4 +90,7 @@ static inline unsigned long get_softint(void)
        return retval;
 }
 
+void __trigger_all_cpu_backtrace(void);
+#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
+
 #endif
index fc8137a21ced90718e30d51c4335fb354d95e983..e1eff41809cc6cb3cfe82a49b02165e138847cbf 100644 (file)
@@ -300,7 +300,6 @@ void show_regs(struct pt_regs *regs)
 #endif
 }
 
-#ifdef CONFIG_MAGIC_SYSRQ
 struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
 static DEFINE_SPINLOCK(global_reg_snapshot_lock);
 
@@ -362,7 +361,7 @@ static void __global_reg_poll(struct global_reg_snapshot *gp)
        }
 }
 
-static void sysrq_handle_globreg(int key, struct tty_struct *tty)
+void __trigger_all_cpu_backtrace(void)
 {
        struct thread_info *tp = current_thread_info();
        struct pt_regs *regs = get_irq_regs();
@@ -412,6 +411,13 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty)
        spin_unlock_irqrestore(&global_reg_snapshot_lock, flags);
 }
 
+#ifdef CONFIG_MAGIC_SYSRQ
+
+static void sysrq_handle_globreg(int key, struct tty_struct *tty)
+{
+       __trigger_all_cpu_backtrace();
+}
+
 static struct sysrq_key_op sparc_globalreg_op = {
        .handler        = sysrq_handle_globreg,
        .help_msg       = "Globalregs",