aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
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)
90 return retval; 90 return retval;
91} 91}
92 92
93void __trigger_all_cpu_backtrace(void);
94#define trigger_all_cpu_backtrace() __trigger_all_cpu_backtrace()
95
93#endif 96#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)
300#endif 300#endif
301} 301}
302 302
303#ifdef CONFIG_MAGIC_SYSRQ
304struct global_reg_snapshot global_reg_snapshot[NR_CPUS]; 303struct global_reg_snapshot global_reg_snapshot[NR_CPUS];
305static DEFINE_SPINLOCK(global_reg_snapshot_lock); 304static DEFINE_SPINLOCK(global_reg_snapshot_lock);
306 305
@@ -362,7 +361,7 @@ static void __global_reg_poll(struct global_reg_snapshot *gp)
362 } 361 }
363} 362}
364 363
365static void sysrq_handle_globreg(int key, struct tty_struct *tty) 364void __trigger_all_cpu_backtrace(void)
366{ 365{
367 struct thread_info *tp = current_thread_info(); 366 struct thread_info *tp = current_thread_info();
368 struct pt_regs *regs = get_irq_regs(); 367 struct pt_regs *regs = get_irq_regs();
@@ -412,6 +411,13 @@ static void sysrq_handle_globreg(int key, struct tty_struct *tty)
412 spin_unlock_irqrestore(&global_reg_snapshot_lock, flags); 411 spin_unlock_irqrestore(&global_reg_snapshot_lock, flags);
413} 412}
414 413
414#ifdef CONFIG_MAGIC_SYSRQ
415
416static void sysrq_handle_globreg(int key, struct tty_struct *tty)
417{
418 __trigger_all_cpu_backtrace();
419}
420
415static struct sysrq_key_op sparc_globalreg_op = { 421static struct sysrq_key_op sparc_globalreg_op = {
416 .handler = sysrq_handle_globreg, 422 .handler = sysrq_handle_globreg,
417 .help_msg = "Globalregs", 423 .help_msg = "Globalregs",