diff options
Diffstat (limited to 'drivers/char/sysrq.c')
-rw-r--r-- | drivers/char/sysrq.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c index 165f307f30e8..50eecfe1d724 100644 --- a/drivers/char/sysrq.c +++ b/drivers/char/sysrq.c | |||
@@ -223,7 +223,20 @@ static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus); | |||
223 | 223 | ||
224 | static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) | 224 | static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) |
225 | { | 225 | { |
226 | trigger_all_cpu_backtrace(); | 226 | /* |
227 | * Fall back to the workqueue based printing if the | ||
228 | * backtrace printing did not succeed or the | ||
229 | * architecture has no support for it: | ||
230 | */ | ||
231 | if (!trigger_all_cpu_backtrace()) { | ||
232 | struct pt_regs *regs = get_irq_regs(); | ||
233 | |||
234 | if (regs) { | ||
235 | printk(KERN_INFO "CPU%d:\n", smp_processor_id()); | ||
236 | show_regs(regs); | ||
237 | } | ||
238 | schedule_work(&sysrq_showallcpus); | ||
239 | } | ||
227 | } | 240 | } |
228 | 241 | ||
229 | static struct sysrq_key_op sysrq_showallcpus_op = { | 242 | static struct sysrq_key_op sysrq_showallcpus_op = { |