summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2008-07-30 22:35:00 -0700
committerDavid S. Miller <davem@davemloft.net>2008-07-30 22:35:00 -0700
commit09ee167cbf3b7390c993c6699ce9fa84e55422bf (patch)
treefc2668ee152a8d97bce36c37cce578cbab9b1698 /arch
parent5afe27380bc42454254c9c83c045240249c15e35 (diff)
downloadlinux-09ee167cbf3b7390c993c6699ce9fa84e55422bf.tar.bz2
sparc64: Hook up trigger_all_cpu_backtrace().
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>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/irq_64.h3
-rw-r--r--arch/sparc64/kernel/process.c10
2 files changed, 11 insertions, 2 deletions
diff --git a/arch/sparc/include/asm/irq_64.h b/arch/sparc/include/asm/irq_64.h
index 0bb9bf531745..3473e25231d9 100644
--- a/arch/sparc/include/asm/irq_64.h
+++ b/arch/sparc/include/asm/irq_64.h
@@ -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
diff --git a/arch/sparc64/kernel/process.c b/arch/sparc64/kernel/process.c
index fc8137a21ced..e1eff41809cc 100644
--- a/arch/sparc64/kernel/process.c
+++ b/arch/sparc64/kernel/process.c
@@ -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",