aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-11 16:15:55 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-11 16:15:55 -0400
commit989aa44a5f215427085ccfe65c1e378e3399c9eb (patch)
treecd1993f2187e17e0e8d46d4fe12848e7be21fe96 /drivers/char
parent4004f02d7af9bb1f5fd993fba60ed5bd0f5397a9 (diff)
parent47cab6a722d44c71c4f8224017ef548522243cf4 (diff)
Merge branch 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-debug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: debug lockups: Improve lockup detection, fix generic arch fallback debug lockups: Improve lockup detection
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/sysrq.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/char/sysrq.c b/drivers/char/sysrq.c
index 5d7a02f63e1c..50eecfe1d724 100644
--- a/drivers/char/sysrq.c
+++ b/drivers/char/sysrq.c
@@ -24,6 +24,7 @@
24#include <linux/sysrq.h> 24#include <linux/sysrq.h>
25#include <linux/kbd_kern.h> 25#include <linux/kbd_kern.h>
26#include <linux/proc_fs.h> 26#include <linux/proc_fs.h>
27#include <linux/nmi.h>
27#include <linux/quotaops.h> 28#include <linux/quotaops.h>
28#include <linux/perf_counter.h> 29#include <linux/perf_counter.h>
29#include <linux/kernel.h> 30#include <linux/kernel.h>
@@ -222,12 +223,20 @@ static DECLARE_WORK(sysrq_showallcpus, sysrq_showregs_othercpus);
222 223
223static void sysrq_handle_showallcpus(int key, struct tty_struct *tty) 224static void sysrq_handle_showallcpus(int key, struct tty_struct *tty)
224{ 225{
225 struct pt_regs *regs = get_irq_regs(); 226 /*
226 if (regs) { 227 * Fall back to the workqueue based printing if the
227 printk(KERN_INFO "CPU%d:\n", smp_processor_id()); 228 * backtrace printing did not succeed or the
228 show_regs(regs); 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);
229 } 239 }
230 schedule_work(&sysrq_showallcpus);
231} 240}
232 241
233static struct sysrq_key_op sysrq_showallcpus_op = { 242static struct sysrq_key_op sysrq_showallcpus_op = {